ix.iface.ui
Interface IFormModel

All Known Implementing Classes:
AbstractIFormModel

public interface IFormModel

An interface model to be used to fill an IFormPanel.


Method Summary
 void addModelListener(FormModelListener l)
           
 void clearData()
          Clears the model of its data;
 void endUpdate()
           
 java.util.List getDisplayFields()
          Gets the names of the object's fields that are to be displayed (exc.
 java.lang.Class getFieldClass(java.lang.String f)
          Gets the class of the object's given field name (e.g.
 java.lang.String getFieldName(java.lang.String f)
          Gets the title to use for the object's given field (e.g.
 double getFieldWeight(java.lang.String field)
          Gets the weight of the object's given field name to establish its portion of the display.
 java.util.List getNameFields()
          Gets the names of the object's fields that are to be shown as its name
 java.lang.Object getObject()
          Get the model's current base object
 java.lang.Class getObjectClass()
          Gets the class of the model's base object
 java.lang.Object getValue(java.lang.String field)
          Gets the current object's value for the given field name.
 void ignoreUpdate()
           
 boolean isEditable(java.lang.String field)
          Determines whether a field is editable (can be changed by the user) or not.
 void setDisplayFields(java.util.List nameFields)
          Sets the fields of the object that are to be displayed (exc.
 void setDisplayFields(java.lang.String[] nameFields)
          Sets the fields of the object that are to be shown as its name.
 void setNameFields(java.util.List nameFields)
          Sets the fields of the object that are to be shown as its name.
 void setNameFields(java.lang.String[] nameFields)
          Sets the fields of the object that are to be shown as its name.
 void setObject(java.lang.Object o)
          Set the model's base object
 void setValue(java.lang.Object object, java.lang.String field, java.lang.Object value)
          Sets the given object's given field to the given value.
 void setValue(java.lang.String field, java.lang.Object value)
          Sets the current object's given field to the given value.
 void startUpdate()
           
 

Method Detail

getNameFields

public java.util.List getNameFields()
Gets the names of the object's fields that are to be shown as its name

getDisplayFields

public java.util.List getDisplayFields()
Gets the names of the object's fields that are to be displayed (exc. names)

setNameFields

public void setNameFields(java.util.List nameFields)
Sets the fields of the object that are to be shown as its name.
Parameters:
nameFields - a list of strings; the field names

setNameFields

public void setNameFields(java.lang.String[] nameFields)
Sets the fields of the object that are to be shown as its name.
Parameters:
nameFields - an array of strings; the field names

setDisplayFields

public void setDisplayFields(java.util.List nameFields)
Sets the fields of the object that are to be displayed (exc. names)
Parameters:
nameFields - a list of strings; the field names

setDisplayFields

public void setDisplayFields(java.lang.String[] nameFields)
Sets the fields of the object that are to be shown as its name.
Parameters:
nameFields - an array of strings; the field names

getFieldName

public java.lang.String getFieldName(java.lang.String f)
Gets the title to use for the object's given field (e.g. "Name", "Id")

getFieldClass

public java.lang.Class getFieldClass(java.lang.String f)
Gets the class of the object's given field name (e.g. String.class, Object.class)

getFieldWeight

public double getFieldWeight(java.lang.String field)
Gets the weight of the object's given field name to establish its portion of the display.

setObject

public void setObject(java.lang.Object o)
Set the model's base object

getObject

public java.lang.Object getObject()
Get the model's current base object

getObjectClass

public java.lang.Class getObjectClass()
Gets the class of the model's base object

getValue

public java.lang.Object getValue(java.lang.String field)
Gets the current object's value for the given field name.

setValue

public void setValue(java.lang.String field,
                     java.lang.Object value)
Sets the current object's given field to the given value.

setValue

public void setValue(java.lang.Object object,
                     java.lang.String field,
                     java.lang.Object value)
Sets the given object's given field to the given value.

clearData

public void clearData()
Clears the model of its data;

isEditable

public boolean isEditable(java.lang.String field)
Determines whether a field is editable (can be changed by the user) or not.

startUpdate

public void startUpdate()

endUpdate

public void endUpdate()

ignoreUpdate

public void ignoreUpdate()

addModelListener

public void addModelListener(FormModelListener l)