borland Packages Class Hierarchy jbcl.model Package Index
borland.jbcl.model.SingletonModel +----borland.jbcl.model.WritableSingletonModel
Methods Event Listeners
Implemented by CheckboxControl, ChoiceControl, FieldControl, ImageControl, LocatorControl, TextAreaControl, TextFieldControl, SingletonDataSetManager, BasicSingletonContainer
Contains the methods required for a read-and-write component that accesses a single data item only, such as a check box control. Usually you extend a class that implements this interface, such as BasicSingletonContainer. You can, however, implement the interface directly.
If you are developing a read-only component that accesses a single data item, you can implement the SingletonModel interface instead.
To set the data object, call the set() method. If canset() returns true, the data can be changed; otherwise, it cannot. The touched() method notifies all listeners whenever the data object is manipulated.
public boolean canSet(boolean startEditing)Returns true if model can set data object.
Parameters:
public void enableModelEvents(boolean enable)Enables and disables event broadcasting.
Parameters:
public void set(java.lang.Object data)Changes the value of the singleton data item to a new value.
Parameters:
public void touched()Notifies all the model listeners that the data object has been manipulated.
public void addModelListener(borland.jbcl.model.SingletonModelListener listener) public void removeModelListener(borland.jbcl.model.SingletonModelListener listener)