org.kahina.core.visual.tree
Class KahinaListTreeView

java.lang.Object
  extended by org.kahina.core.visual.KahinaView<KahinaTree>
      extended by org.kahina.core.visual.tree.KahinaAbstractTreeView
          extended by org.kahina.core.visual.tree.KahinaListTreeView
All Implemented Interfaces:
KahinaListener, KahinaTreeChildAddListener

public class KahinaListTreeView
extends KahinaAbstractTreeView
implements KahinaTreeChildAddListener


Field Summary
 
Fields inherited from class org.kahina.core.visual.KahinaView
kahina, model
 
Constructor Summary
KahinaListTreeView(KahinaInstance<?,?,?> kahina, int... layers)
           
 
Method Summary
 void autospineLeft()
           
 void autospineRight()
           
 void childAdded(int nodeID)
           
 void displaySecondaryTree(KahinaTree treeModel)
           
protected  void doDisplay()
          Subclasses may override this method to take certain actions directly after KahinaView.model has changed.
 KahinaTreeViewConfiguration getConfig()
           
 int getEdgeStyle(int nodeID)
          Returns the edge style for the edge leading to a node.
 int getLatestOriginLayer()
           
 int getMarkedNode(int layer)
           
 Color getNodeBorderColor(int nodeID)
           
 Color getNodeColor(int nodeID)
           
 Font getNodeFont(int nodeID)
           
 int getPrimaryChildChoice(int parent)
           
 KahinaTree getSecondaryModel()
           
 KahinaTree getTreeModel()
           
 ArrayList<Integer> getVisibleVirtualChildren(KahinaTree treeModel, int nodeID, int treeLayer)
           
 boolean isSecondDimensionDisplayed()
           
 JComponent makePanel()
          Returns the panel that represents this view in the GUI.
 boolean nodeIsVisible(int nodeID)
           
protected  void processEvent(KahinaUpdateEvent e)
           
 void selectNode(int nodeID, int layer)
          Marks the selected node (or, if it is not visible on the respective layer, its best equivalent, i.e.
 void setConfig(KahinaTreeViewConfiguration config)
           
 void setNodeBorderColor(int nodeID, Color color)
           
 void setStatusColorEncoding(int status, Color color)
           
 void setStatusFontEncoding(int status, Font font)
           
 
Methods inherited from class org.kahina.core.visual.KahinaView
display, getModel, getTitle, isVisible, makeEditorPanel, processEvent, recalculate, setConfig, setTitle, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KahinaListTreeView

public KahinaListTreeView(KahinaInstance<?,?,?> kahina,
                          int... layers)
Method Detail

displaySecondaryTree

public void displaySecondaryTree(KahinaTree treeModel)
Specified by:
displaySecondaryTree in class KahinaAbstractTreeView

getConfig

public KahinaTreeViewConfiguration getConfig()
Overrides:
getConfig in class KahinaView<KahinaTree>

setConfig

public void setConfig(KahinaTreeViewConfiguration config)

isSecondDimensionDisplayed

public boolean isSecondDimensionDisplayed()

getNodeFont

public Font getNodeFont(int nodeID)

getNodeColor

public Color getNodeColor(int nodeID)

setNodeBorderColor

public void setNodeBorderColor(int nodeID,
                               Color color)

getNodeBorderColor

public Color getNodeBorderColor(int nodeID)

getEdgeStyle

public int getEdgeStyle(int nodeID)
Returns the edge style for the edge leading to a node. At the moment, this is a constant since dotted lines are not yet implemented.

Parameters:
nodeID -
Returns:
KahinaTreeViewOptions.COMPLETE_LINES

setStatusColorEncoding

public void setStatusColorEncoding(int status,
                                   Color color)
Specified by:
setStatusColorEncoding in class KahinaAbstractTreeView

setStatusFontEncoding

public void setStatusFontEncoding(int status,
                                  Font font)

getMarkedNode

public int getMarkedNode(int layer)

doDisplay

protected void doDisplay()
Description copied from class: KahinaView
Subclasses may override this method to take certain actions directly after KahinaView.model has changed. This default implementation does nothing.

Overrides:
doDisplay in class KahinaView<KahinaTree>

makePanel

public JComponent makePanel()
Description copied from class: KahinaView
Returns the panel that represents this view in the GUI. This method must be invoked from the event dispatch thread.

Specified by:
makePanel in class KahinaView<KahinaTree>
Returns:

nodeIsVisible

public boolean nodeIsVisible(int nodeID)

getVisibleVirtualChildren

public ArrayList<Integer> getVisibleVirtualChildren(KahinaTree treeModel,
                                                    int nodeID,
                                                    int treeLayer)

getTreeModel

public KahinaTree getTreeModel()

getSecondaryModel

public KahinaTree getSecondaryModel()
Specified by:
getSecondaryModel in class KahinaAbstractTreeView

processEvent

protected void processEvent(KahinaUpdateEvent e)
Overrides:
processEvent in class KahinaView<KahinaTree>

selectNode

public void selectNode(int nodeID,
                       int layer)
Marks the selected node (or, if it is not visible on the respective layer, its best equivalent, i.e. the lowest visible secondary ancestor) on every layer.

Parameters:
nodeID -

getPrimaryChildChoice

public int getPrimaryChildChoice(int parent)

autospineLeft

public void autospineLeft()

autospineRight

public void autospineRight()

childAdded

public void childAdded(int nodeID)
Specified by:
childAdded in interface KahinaTreeChildAddListener

getLatestOriginLayer

public int getLatestOriginLayer()
Returns:
The origin layer for the latest selection event received. -1 if there is no origin layer.