borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.model 

BasicSingletonContainer component

java.lang.Object
   +----borland.jbcl.model.BasicSingletonContainer

About the BasicSingletonContainer component

Constructors  Properties  Methods  Event Listeners

Implements SingletonModel, WritableSingletonModel

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 canSet() method to control when the data object can be changed and use enableModelEvents() to control when model events can occur.


BasicSingletonContainer constructors

BasicSingletonContainer properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

BasicSingletonContainer methods

Methods implemented in this class

Methods implemented in java.lang.Object

BasicSingletonContainer event listeners


BasicSingletonContainer constructors

BasicSingletonContainer()

  public BasicSingletonContainer()
Constructs a BasicSingletonContainer with default property values.

BasicSingletonContainer(java.lang.Object)

  public BasicSingletonContainer(java.lang.Object data)
Constructs a BasicSingletonContainer and sets its data item to the value of the object passed as the data argument.

Parameters:

data
The data object that becomes the new value of the data item.

BasicSingletonContainer properties

copy

 public Object getCopy()
Returns a copy of the data item.

BasicSingletonContainer methods

processModelEvent(borland.jbcl.model.SingletonModelEvent)

  protected void processModelEvent(borland.jbcl.model.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
The singleton-model event object.

BasicSingletonContainer event listeners

This component is a source for the following event sets. For information on the JBCL event sets, see Events in JBCL.

model

 public void addModelListener(borland.jbcl.model.SingletonModelListener listener)
 public void removeModelListener(borland.jbcl.model.SingletonModelListener listener)