cz.cmc.tcgui
Class TCGraphSelectionModel

java.lang.Object
  extended byorg.jgraph.graph.DefaultGraphSelectionModel
      extended bycz.cmc.tcgui.TCGraphSelectionModel
All Implemented Interfaces:
Cloneable, org.jgraph.graph.GraphSelectionModel, Serializable

public class TCGraphSelectionModel
extends org.jgraph.graph.DefaultGraphSelectionModel

Title: Class TCGraphSelectionModel

Description: Cell selection model specific for the traffic control configurator

Copyright: Copyright (c) 2003

Company: CMC Computers

See Also:
Serialized Form

Nested Class Summary
static class TCGraphSelectionModel.TCHierarchyComparator
          Comparator comparing order of one (always the same) of in-depth searches of selected objects' class hierarchy
protected  class TCGraphSelectionModel.TCHierarchyHeapEntry
          Structure containing reference to the first cell of a partial selection object type and cell count of such type
 
Nested classes inherited from class org.jgraph.graph.DefaultGraphSelectionModel
org.jgraph.graph.DefaultGraphSelectionModel.CellPlaceHolder
 
Field Summary
protected  Vector cellHeap
           
protected  TreeMap cellMap
          Map where the selected objects are structurally stored
 
Fields inherited from class org.jgraph.graph.DefaultGraphSelectionModel
cellStates, graph, changeSupport, childrenSelectable, listenerList, SELECTED, selection, SELECTION_MODE_PROPERTY, selectionMode, UNSELECTED
 
Fields inherited from interface org.jgraph.graph.GraphSelectionModel
MULTIPLE_GRAPH_SELECTION, SINGLE_GRAPH_SELECTION
 
Constructor Summary
TCGraphSelectionModel(org.jgraph.JGraph graph)
          Creates a new TCGraphSelectionModel
 
Method Summary
 void addSelectionCell(Object cell)
          Overriden to update categorized list.
 void addSelectionCells(Object[] cells)
          Overriden to update categorized list.
protected  void addTCCell(Object cell)
          Adds a cell into TCGraphSelectionModel
protected  void addTCCells(Object[] cells)
          Add cells into the TCGraphSelectionModel
 void clearSelection()
          Overriden to update categorized list.
protected  void clearTCSelection()
          Clears categorized list in TCGraphSelectionModel
 Iterator hierarchyIterator(Class c)
          Gets Hierarchy iterator for hierarchy based on supplied class
 int hierarchySize(Class c)
          Gets hierarchy size (number of cells at)
 boolean isChildrenSelectable()
          Overriden to gain fine-grained control over stepping-into cells.
protected  boolean isChildrenSelectable(Object cell)
          Overriden to gain fine-grained control over stepping-into cells.
 void removeSelectionCell(Object cell)
          Overriden to update categorized list.
 void removeSelectionCells(Object[] cells)
          Overriden to update categorized list.
protected  boolean removeTCCell(Object cell)
          Removes a cell into TCGraphSelectionModel
protected  boolean removeTCCell(Object cell, int idx)
          Removes a cell from TCGraphSelectionModel
protected  void removeTCCells(Object[] cells)
          Removes cells from the TCGraphSelectionModel
 void setSelectionCell(Object cell)
          Overriden to update categorized list.
 void setSelectionCells(Object[] cells)
          Overriden to update categorized list.
 void setSelectionMode(int mode)
          Overriden to update categorized list.
 
Methods inherited from class org.jgraph.graph.DefaultGraphSelectionModel
addCellStateKeysToChange, addGraphSelectionListener, addPropertyChangeListener, clone, deselect, fireValueChanged, getListeners, getSelectables, getSelectedChildCount, getSelectionCell, getSelectionCells, getSelectionCount, getSelectionMode, isCellSelected, isChildrenSelected, isSelectionEmpty, notifyCellChange, removeGraphSelectionListener, removePropertyChangeListener, select, setChildrenSelectable, setSelectedChildCount
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cellMap

protected TreeMap cellMap
Map where the selected objects are structurally stored


cellHeap

protected Vector cellHeap
Constructor Detail

TCGraphSelectionModel

public TCGraphSelectionModel(org.jgraph.JGraph graph)
Creates a new TCGraphSelectionModel

Parameters:
graph - the graph to be selection model created for
Method Detail

hierarchyIterator

public Iterator hierarchyIterator(Class c)
Gets Hierarchy iterator for hierarchy based on supplied class

Parameters:
c - hierarchy class to return iterator for
Returns:
Iterator over hierarchy

hierarchySize

public int hierarchySize(Class c)
Gets hierarchy size (number of cells at)

Parameters:
c - hierarchy class to get cell count for
Returns:
hierarchy cell count

addSelectionCell

public void addSelectionCell(Object cell)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.addSelectionCell

addSelectionCells

public void addSelectionCells(Object[] cells)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.addSelectionCells

clearSelection

public void clearSelection()
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.clearSelection

removeSelectionCell

public void removeSelectionCell(Object cell)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.removeSelectionCell

removeSelectionCells

public void removeSelectionCells(Object[] cells)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.removeSelectionCells

setSelectionCell

public void setSelectionCell(Object cell)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.setSelectionCell

setSelectionCells

public void setSelectionCells(Object[] cells)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.setSelectionCells

setSelectionMode

public void setSelectionMode(int mode)
Overriden to update categorized list.

See Also:
DefaultGraphSelectionModel.setSelectionCells

isChildrenSelectable

public boolean isChildrenSelectable()
Overriden to gain fine-grained control over stepping-into cells.


isChildrenSelectable

protected boolean isChildrenSelectable(Object cell)
Overriden to gain fine-grained control over stepping-into cells.


addTCCell

protected void addTCCell(Object cell)
Adds a cell into TCGraphSelectionModel

Parameters:
cell - cell to add

addTCCells

protected void addTCCells(Object[] cells)
Add cells into the TCGraphSelectionModel

Parameters:
cells - cells to add

removeTCCell

protected boolean removeTCCell(Object cell)
Removes a cell into TCGraphSelectionModel

Parameters:
cell - cell to remove

removeTCCell

protected boolean removeTCCell(Object cell,
                               int idx)
Removes a cell from TCGraphSelectionModel

Parameters:
cell - cell to remove
idx - index of the cell at the heap

removeTCCells

protected void removeTCCells(Object[] cells)
Removes cells from the TCGraphSelectionModel

Parameters:
cells - cells to remove

clearTCSelection

protected void clearTCSelection()
Clears categorized list in TCGraphSelectionModel