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

TypedViewManager class

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

About the TypedViewManager class

Properties  Methods  

Implements GraphViewManager, MatrixViewManager, SingletonViewManager, VectorViewManager

A view manager class that selects the appropriate item painter and item editor based on the type of the data object.

Internally the class manages a table of item painters and a table of item editors. Using the add() method, you add specialized item painters and item editors for new classes you create to the tables. Then you can call getPainter() passing the data object to the method and the correct painter for your data object is returned. In the same way, you can obtain an item editor with getEditor().

TypedViewManager provides getPainter() and getEditor() methods for each of the four model types: singleton , vector , matrix , and graph.


TypedViewManager properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

TypedViewManager methods

Methods implemented in this class

Methods implemented in java.lang.Object


TypedViewManager methods

add(java.lang.Class, borland.jbcl.model.ItemPainter, borland.jbcl.model.ItemEditor)

  public boolean add(java.lang.Class itemClass, borland.jbcl.model.ItemPainter painter, borland.jbcl.model.ItemEditor editor)
Adds the specified item painter and item editor to the set of item painters and item editors the TypedViewManager handles. The item painter and the item editor are used to paint and edit only the data objects of the type specified with the itemClass parameter.

If you specify the value of itemClass as null, a default painter and editor is used to paint and edit the items.

Parameters:

itemClass
The type of data object the new item painter and item editor can paint and edit. A value of null means a default painter and a default editor will paint the data items.
painter
The item painter that "knows" how to paint the new type of data object.
editor
The item editor that "knows" how to edit the new type of data object.