borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.view 

SingletonView interface

borland.jbcl.view.SingletonView

About the SingletonView interface

Properties  Event Listeners

Implemented by ButtonControl, CheckboxControl, ChoiceControl, FieldControl, ImageControl, LabelControl, LocatorControl, TextAreaControl, TextFieldControl, ButtonView, CheckboxView, ChoiceView, FieldView, LabelView, TextAreaView, TextFieldView

This interface defines the basic behavior required of all components that use a singleton model to retrieve, display, and edit a single data item. Classes that implement SingletonView have the simple properties that exist on all views of a SingletonModel model.

If you are writing a new component that uses a singleton model, implement SingletonView in the view class to ensure that the component has all the expected functionality for a singleton component.

See also: Understanding model-view architecture, Models in the Java Beans Component Library,


SingletonView properties

*Read-only properties **Write-only properties

Properties defined in this interface

SingletonView event listeners


SingletonView properties

model

 public SingletonModel getModel()
 public void setModel(borland.jbcl.model.SingletonModel model)
Specifies the model object providing item access for this singleton-type component. The model provides read/write access to singleton data. Although getModel() returns a read-only model object, setModel() attempts a cast to WritableSingletonModel. If the cast is successful, it sets the writeModel property to the same object.

See also: Singleton model classes

readOnly

 public boolean isReadOnly()
 public void setReadOnly(boolean readOnly)
The readOnly property overrides the existance of a writeable model. When the property is set to true, isReadOnly() always returns true. When set to false, isReadOnly() still returns true if the model is not writeable.

viewManager

 public SingletonViewManager getViewManager()
 public void setViewManager(borland.jbcl.model.SingletonViewManager viewManager)
Specifies the view manager object associated with this singleton-type component. The viewManager provides item painters and item editors based on the model object's type.

See also: View manager classes

writeModel

 public WritableSingletonModel getWriteModel()
A read-only property that provides read/write access to the model object, if such is available.

See also: Singleton model classes


SingletonView event listeners

This interface 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)