org.jgraph.graph.GraphSelectionModel Interface Reference

Inheritance diagram for org.jgraph.graph.GraphSelectionModel:

org.jgraph.graph.DefaultGraphSelectionModel org.jgraph.JGraph.EmptySelectionModel List of all members.

Public Member Functions

void setSelectionMode (int mode)
void setChildrenSelectable (boolean flag)
boolean isChildrenSelectable ()
int getSelectionMode ()
void setSelectionCell (Object cell)
void setSelectionCells (Object[] cells)
void addSelectionCell (Object cell)
void addSelectionCells (Object[] cells)
void removeSelectionCell (Object cell)
void removeSelectionCells (Object[] cells)
Object[] getSelectables ()
Object getSelectionCell ()
Object[] getSelectionCells ()
int getSelectionCount ()
boolean isCellSelected (Object cell)
boolean isChildrenSelected (Object cell)
boolean isSelectionEmpty ()
void clearSelection ()
void addPropertyChangeListener (PropertyChangeListener listener)
void removePropertyChangeListener (PropertyChangeListener listener)
void addGraphSelectionListener (GraphSelectionListener x)
void removeGraphSelectionListener (GraphSelectionListener x)

Static Public Attributes

static final int SINGLE_GRAPH_SELECTION = 1
static final int MULTIPLE_GRAPH_SELECTION = 4

Detailed Description

This interface represents the current state of the selection for the graph component.

A GraphSelectionModel can be configured to allow only one cell (SINGLE_GRAPH_SELECTION) or a number of cells (MULTIPLE_GRAPH_SELECTION).

Version:
0.1 1/1/02
Author:
Gaudenz Alder


Member Function Documentation

void org.jgraph.graph.GraphSelectionModel.addGraphSelectionListener GraphSelectionListener  x  ) 
 

Adds x to the list of listeners that are notified each time the set of selected Objects changes.

Parameters:
x the new listener to be added

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.addPropertyChangeListener PropertyChangeListener  listener  ) 
 

Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired when the selection mode changes.

Parameters:
listener the PropertyChangeListener to be added

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.addSelectionCell Object  cell  ) 
 

Adds cell to the current selection. If cell is not currently in the selection the GraphSelectionListeners are notified. This has no effect if cell is null.

Parameters:
cell the new cell to add to the current selection

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.addSelectionCells Object[]  cells  ) 
 

Adds cells to the current selection. If any of the cells are not currently in the selection the GraphSelectionListeners are notified. This has no effect if cells is null.

Parameters:
cells the new cells to add to the current selection

Implemented in org.jgraph.graph.DefaultGraphSelectionModel, and org.jgraph.JGraph.EmptySelectionModel.

void org.jgraph.graph.GraphSelectionModel.clearSelection  ) 
 

Empties the current selection. If this represents a change in the current selection, the selection listeners are notified.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

Object [] org.jgraph.graph.GraphSelectionModel.getSelectables  ) 
 

Returns the cells that are currently selectable.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

Object org.jgraph.graph.GraphSelectionModel.getSelectionCell  ) 
 

Returns the first cell in the selection. How first is defined is up to implementors.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

Object [] org.jgraph.graph.GraphSelectionModel.getSelectionCells  ) 
 

Returns the cells in the selection. This will return null (or an empty array) if nothing is currently selected.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

int org.jgraph.graph.GraphSelectionModel.getSelectionCount  ) 
 

Returns the number of cells that are selected.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

int org.jgraph.graph.GraphSelectionModel.getSelectionMode  ) 
 

Returns the current selection mode, either SINGLE_GRAPH_SELECTION or MULTIPLE_GRAPH_SELECTION.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

boolean org.jgraph.graph.GraphSelectionModel.isCellSelected Object  cell  ) 
 

Returns true if the cell, cell, is in the current selection.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

boolean org.jgraph.graph.GraphSelectionModel.isChildrenSelectable  ) 
 

Returns true if the selection model allows the selection of children.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

boolean org.jgraph.graph.GraphSelectionModel.isChildrenSelected Object  cell  ) 
 

Returns true if the cell, cell, has selected children.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

boolean org.jgraph.graph.GraphSelectionModel.isSelectionEmpty  ) 
 

Returns true if the selection is currently empty.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.removeGraphSelectionListener GraphSelectionListener  x  ) 
 

Removes x from the list of listeners that are notified each time the set of selected Objects changes.

Parameters:
x the listener to remove

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.removePropertyChangeListener PropertyChangeListener  listener  ) 
 

Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener the PropertyChangeListener to be removed

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.removeSelectionCell Object  cell  ) 
 

Removes cell from the selection. If cell is in the selection the GraphSelectionListeners are notified. This has no effect if cell is null.

Parameters:
cell the cell to remove from the selection

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.removeSelectionCells Object[]  cells  ) 
 

Removes cells from the selection. If any of the cells in cells are in the selection, the GraphSelectionListeners are notified. This method has no effect if cells is null.

Parameters:
cells the cells to remove from the selection

Implemented in org.jgraph.graph.DefaultGraphSelectionModel, and org.jgraph.JGraph.EmptySelectionModel.

void org.jgraph.graph.GraphSelectionModel.setChildrenSelectable boolean  flag  ) 
 

Sets if the selection model allows the selection of children.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.setSelectionCell Object  cell  ) 
 

Sets the selection to cell. If this represents a change, then the GraphSelectionListeners are notified. If cell is null, this has the same effect as invoking clearSelection.

Parameters:
cell new cell to select

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.

void org.jgraph.graph.GraphSelectionModel.setSelectionCells Object[]  cells  ) 
 

Sets the selection to cells. If this represents a change, then the GraphSelectionListeners are notified. If cells is null, this has the same effect as invoking clearSelection.

Parameters:
cells new selection

Implemented in org.jgraph.graph.DefaultGraphSelectionModel, and org.jgraph.JGraph.EmptySelectionModel.

void org.jgraph.graph.GraphSelectionModel.setSelectionMode int  mode  ) 
 

Sets the selection model, which must be either SINGLE_GRAPH_SELECTION or MULTIPLE_GRAPH_SELECTION.

This may change the selection if the current selection is not valid for the new mode.

Implemented in org.jgraph.graph.DefaultGraphSelectionModel.


Member Data Documentation

final int org.jgraph.graph.GraphSelectionModel.MULTIPLE_GRAPH_SELECTION = 4 [static]
 

Selection can contain any number of items.

final int org.jgraph.graph.GraphSelectionModel.SINGLE_GRAPH_SELECTION = 1 [static]
 

Selection can only contain one cell at a time.


The documentation for this interface was generated from the following file:
Generated on Sun May 28 19:13:16 2006 for Digimod by  doxygen 1.4.6-NO