org.kahina.core.visual.tree
Class KahinaTreeView
java.lang.Object
org.kahina.core.visual.KahinaView<KahinaTree>
org.kahina.core.visual.tree.KahinaAbstractTreeView
org.kahina.core.visual.tree.KahinaTreeView
- All Implemented Interfaces:
- KahinaListener
- Direct Known Subclasses:
- FormulaTreeView
public class KahinaTreeView
- extends KahinaAbstractTreeView
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERBOSE
public static final boolean VERBOSE
- See Also:
- Constant Field Values
config
protected KahinaTreeViewConfiguration config
KahinaTreeView
public KahinaTreeView(KahinaInstance<?,?,?> kahina)
display
public void display(KahinaTree treeModel)
displaySecondaryTree
public void displaySecondaryTree(KahinaTree treeModel)
- Specified by:
displaySecondaryTree in class KahinaAbstractTreeView
display
public void display(KahinaTree layerModel,
int layerID,
int referenceNode)
getSecondaryModel
public KahinaTree getSecondaryModel()
- Specified by:
getSecondaryModel in class KahinaAbstractTreeView
getConfig
public KahinaTreeViewConfiguration getConfig()
- Overrides:
getConfig in class KahinaView<KahinaTree>
setConfig
public void setConfig(KahinaTreeViewConfiguration config)
isSecondDimensionDisplayed
public boolean isSecondDimensionDisplayed()
getDisplayWidth
public int getDisplayWidth()
getDisplayHeight
public int getDisplayHeight()
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
getNodeX
public Integer getNodeX(int nodeID)
getNodeY
public Integer getNodeY(int nodeID)
getNodeHeight
public int getNodeHeight(int nodeID)
getTreeLayer
public int getTreeLayer()
setTreeLayer
public void setTreeLayer(int treeLayer)
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()
setMarkedNode
public void setMarkedNode(int markedNode)
resetAllStructures
public void resetAllStructures()
calculateCoordinates
public void calculateCoordinates()
displaysNode
public boolean displaysNode(int nodeID)
nodeIsVisible
public boolean nodeIsVisible(int nodeID)
getFontMetrics
public FontMetrics getFontMetrics(Font f,
Stroke s,
int fontSize)
showLevels
public String showLevels()
swapDimensions
public void swapDimensions()
nodeAtCoordinates
public int nodeAtCoordinates(int x,
int y)
getTreeModel
public KahinaTree getTreeModel()
getContentfulTreeModel
public KahinaTree getContentfulTreeModel()
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:
recalculate
public void recalculate()
- Description copied from class:
KahinaView
- Override this method to define necessary operations after changes to the
model (coordinate recomputations etc.)
- Overrides:
recalculate in class KahinaView<KahinaTree>
avoidClashesByAdaptingHorizontalDistance
public void avoidClashesByAdaptingHorizontalDistance()
- tell the GUI to adapt horizontal distance in order to avoid clashes will
be overridden by manual distance adaptation
processEvent
protected void processEvent(KahinaUpdateEvent e)
- HACK: if an update listener is defined on the tree view, the selected node will be marked
- Overrides:
processEvent in class KahinaView<KahinaTree>