|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.gui.forms.Form
public class Form
A Form is a classic form-like GUI editor for data.
Generally, forms feature data entry fields, buttons, tabs, tables, etc. The Forms framework handles layout, data editing, events, and other tedious tasks.
Forms can be driven from a CogSchema, deriving much of their behavior from the schema and eliminating even more tedium.
Copyright 2005-2009 Partner Software, Inc.
| Constructor Summary | |
|---|---|
Form(java.awt.Container gui)
|
|
| Method Summary | |
|---|---|
void |
addField(java.lang.String name,
FormField field)
Add a field to the form, assigned to the given field name. |
void |
addFieldListener(FormFieldListener nosey)
Add a listener for field changes. |
void |
apply()
This applies the current values in the FormField objects to the underlying data model. |
ActionBureau |
getActionBureau()
|
Cog |
getEditedCog()
Gets the currently-edited Cog. |
java.lang.Object |
getEditedFieldValue(java.lang.String field)
This can be used to get things after editing without invoking a CogHeader or other object. |
java.lang.Object |
getEditedObject()
Converts the currently-edited Cog to an object and returns the result. |
CogType |
getEditedType()
Gets the edited CogType for the form. |
java.awt.Container |
getGui()
Return the top-level container for all components in this form. |
CogSchema |
getSchema()
Gets the CogSchema used by this Form. |
boolean |
isDisabled()
|
java.util.List<FormField> |
listFields()
Return a newly-constructed copy of the field list. |
Naming<FormField> |
nameFields()
Return a newly-constructed copy of the fields, indexed by name. |
void |
removeFieldListener(FormFieldListener nosey)
Remove a listener for field changes. |
FormField |
replaceField(java.lang.String name,
FormField field)
This swaps out the FormField assigned to the given field name, returning the FormField previously assigned to it. |
void |
reset()
Resets the form by putting the field values from the underlying model into the FormField objects, discarding any changes that have been made in the GUI since the last apply(). |
void |
setDisabled(boolean disabled)
If true, disables the form (no input allowed). |
void |
setEditedCog(Cog newEdited)
Set the currently-edited Cog. |
void |
setEditedFieldValue(java.lang.String field,
java.lang.Object value)
This can be used to set things to edit without creating a CogHeader or other object. |
void |
setEditedObject(java.lang.Object newEdited)
Sets an object to be edited. |
void |
setEditedType(CogType newType)
Sets the edited CogType for the form. |
void |
setSchema(CogSchema newSchema)
Sets a custom CogSchema for this Form. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Form(java.awt.Container gui)
| Method Detail |
|---|
public CogSchema getSchema()
public void setSchema(CogSchema newSchema)
public Cog getEditedCog()
public void setEditedCog(Cog newEdited)
newEdited - public java.lang.Object getEditedObject()
public void setEditedObject(java.lang.Object newEdited)
public void setEditedFieldValue(java.lang.String field,
java.lang.Object value)
field - value - public java.lang.Object getEditedFieldValue(java.lang.String field)
field - public void apply()
public void reset()
public ActionBureau getActionBureau()
public Naming<FormField> nameFields()
public java.util.List<FormField> listFields()
public java.awt.Container getGui()
public void addFieldListener(FormFieldListener nosey)
nosey - public void removeFieldListener(FormFieldListener nosey)
nosey -
public void addField(java.lang.String name,
FormField field)
name - field -
public FormField replaceField(java.lang.String name,
FormField field)
name - field -
public void setEditedType(CogType newType)
newType - public CogType getEditedType()
public void setDisabled(boolean disabled)
public boolean isDisabled()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||