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

GraphView interface

borland.jbcl.view.GraphView

About the GraphView interface

Properties  Event Listeners

Implemented by TreeControl, TreeView

Defines the behavior required of components that use a graph model, for accessing data items that are stored in a tree structure. Implementers of GraphView have the simple properties that exist on all views of a borland.jbcl.model.GraphModel model object.

If you are writing a new graph-type component, implement GraphView in the view class to ensure that the component has all expected functionality.


GraphView properties

*Read-only properties **Write-only properties

Properties defined in this interface

GraphView event listeners


GraphView properties

model

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

See also: Graph interfaces and classes in the Component Writer's Guide.

readOnly

 public boolean isReadOnly()
 public void setReadOnly(boolean readOnly)
The readOnly property overrides the existence 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.

selection

 public WritableGraphSelection getSelection()
 public void setSelection(borland.jbcl.model.WritableGraphSelection selection)
Specifies the editable selection object associated with this graph-type component. The selection object manages the selected items in the view.

See also: Selecting items in composite components in the Component Writer's Guide.

subfocus

 public GraphLocation getSubfocus()
 public void setSubfocus(borland.jbcl.model.GraphLocation subfocus)
The subfocus is the current position in the graph with focus. Specifies the node in the graph that has subfocus.

See also: Handling subfocus in the Component Writer's Guide.

viewManager

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

See also: View manager classes in the Component Writer's Guide.

writeModel

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

See also: Graph classes and interfaces in the Component Writer's Guide.


GraphView 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.GraphModelListener listener)
 public void removeModelListener(borland.jbcl.model.GraphModelListener listener)

selection

 public void addSelectionListener(borland.jbcl.model.GraphSelectionListener listener)
 public void removeSelectionListener(borland.jbcl.model.GraphSelectionListener listener)

subfocus

 public void addSubfocusListener(borland.jbcl.model.GraphSubfocusListener listener)
 public void removeSubfocusListener(borland.jbcl.model.GraphSubfocusListener listener)