jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.TypedViewManager
Properties Methods
Implements GraphViewManager, MatrixViewManager, SingletonViewManager, VectorViewManager, Serializable
A view manager that selects the appropriate item painter and item editor based on the type of the data object.
Internally the component 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.
public boolean add(Class itemClass, ItemPainter painter, 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
painter
editor