jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.BasicSingletonContainer
Constructors Properties Methods Event Listeners
Implements SingletonModel, WritableSingletonModel, Serializable
This singleton-model component provides read-write access to a single data item, such as that used by a check box. Use this container object in composing new model-view components that need need read-write access to a single data object.
Use the WritableSingletonModel.canSet()
method to control when the data object can be changed and use WritableSingletonModel.enableModelEvents()
to control when model events can occur.
public BasicSingletonContainer()Constructs a
BasicSingletonContainer
with default property values.
public BasicSingletonContainer(Object data)Constructs a
BasicSingletonContainer
and sets its data item to the value of the object passed as the data
argument.
Parameters:
data
public Object getCopy()Returns a copy of the data item.
protected void processModelEvent(SingletonModelEvent e)This method is called when a
contentChanged
event occurs in the BasicSingletonContainer
. It calls the contentChanged()
method in registered listener objects, passing a copy of the event object.
Parameters:
e
public void addModelListener(SingletonModelListener listener) public void removeModelListener(SingletonModelListener listener)