|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.base.node.mine.decisiontree2.view.graph.HierarchicalGraphView<K>
K - The type of the nodes user objectspublic abstract class HierarchicalGraphView<K>
A widget for a tree.
| Nested Class Summary | |
|---|---|
static class |
HierarchicalGraphView.Align
The alignment of the graph. |
(package private) static class |
HierarchicalGraphView.LayoutSettings
Constants for the layout. |
| Constructor Summary | |
|---|---|
HierarchicalGraphView(K root)
Create a new instance. |
|
HierarchicalGraphView(K root,
HierarchicalGraphView.Align alignment)
Create a new instance. |
|
| Method Summary | |
|---|---|
(package private) void |
addGraphListener(GraphListener listener)
Registers a graph listener. |
void |
clearHilite()
Unhilite all nodes. |
JComponent |
createOutlineView()
Creates an outline view, which is a birds eye view on the graph. |
protected Set<K> |
getCollapsed()
Returns the collapsed nodes. |
(package private) HierarchicalGraphView.LayoutSettings |
getLayoutSettings()
Return an object width constants used for layout the graph. |
abstract NodeWidgetFactory<K> |
getNodeWidgetFactory()
Get the NodeWidgetFactory for this Graph. |
protected int |
getNodeWidth()
The common widht of the visible nodes. |
protected DefaultMutableTreeNode |
getRoot()
The root node. |
K |
getRootNode()
Get the root. |
float |
getScaleFactor()
Set the scale factor. |
K |
getSelected()
Get the selected node. |
String |
getToolTipText(MouseEvent event)
Returns the string to be used as the tooltip for event. |
(package private) Map<K,DefaultMutableTreeNode> |
getTreeMap()
The keys are retrieved from getNodeWidgetFactory().getChildren(...). |
JComponent |
getView()
Returns the JComponent for the HierarchicalGraphView. |
protected Map<K,Rectangle> |
getVisible()
Returns the visible nodes and their bounds. |
Map<K,NodeWidget<K>> |
getWidgets()
Returns the widgets for the nodes returned by getVisible() and getCollapsed(). |
void |
hiLite(Set<K> toHiLite)
HiLite the given nodes. |
protected void |
layoutGraph()
Re-layout the graph. |
void |
mouseClicked(MouseEvent e)
Handler for the mouse clicked event. |
void |
mousePressed(MouseEvent e)
Handler for the mouse pressed event. |
void |
mouseReleased(MouseEvent e)
Handler for the mouse released event. |
K |
nodeAtPoint(Point p)
Returns the node at a certain point. |
(package private) void |
paint(Component c,
Graphics2D g,
int x,
int y,
int width,
int height)
Paints the nodes, the connectors and the labels on the connectors to the given graphics object. |
(package private) void |
removeGraphListener(GraphListener listener)
Unregisters a graph listener. |
protected void |
setNodeWidth(int nodeWidth)
Changes the common width of the visible nodes. |
void |
setRootNode(K root)
Replace the root which is the model for this view. |
void |
setScaleFactor(float scale)
Get the scale factor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HierarchicalGraphView(K root)
root - the root of the graph
public HierarchicalGraphView(K root,
HierarchicalGraphView.Align alignment)
root - the root of the treealignment - the alignment of the graph| Method Detail |
|---|
public float getScaleFactor()
public void setScaleFactor(float scale)
scale - the scale factor to setpublic void setRootNode(K root)
root - the rootpublic K getRootNode()
public abstract NodeWidgetFactory<K> getNodeWidgetFactory()
NodeWidgetFactory for this Graph.
NodeWidgetFactoryfinal void addGraphListener(GraphListener listener)
OutlineView
listener - the graph listenerfinal void removeGraphListener(GraphListener listener)
OutlineView
listener - the graph listenerpublic final JComponent getView()
JComponent for the HierarchicalGraphView. This method
returns always the same instance.
public final JComponent createOutlineView()
protected void layoutGraph()
void paint(Component c,
Graphics2D g,
int x,
int y,
int width,
int height)
c - the component to paint ong - the graphics objectx - the x value of the top left cornery - the y value of the top left cornerwidth - The width to be paintheight - The height to be paintpublic String getToolTipText(MouseEvent event)
event - the mouse event
public void mouseClicked(MouseEvent e)
e - the mouse eventpublic void mouseReleased(MouseEvent e)
e - the mouse eventpublic void mousePressed(MouseEvent e)
e - the mouse eventpublic K getSelected()
public void hiLite(Set<K> toHiLite)
toHiLite - the nodes to HiLitepublic void clearHilite()
public K nodeAtPoint(Point p)
p - the point on screen
public Map<K,NodeWidget<K>> getWidgets()
protected Map<K,Rectangle> getVisible()
protected Set<K> getCollapsed()
protected void setNodeWidth(int nodeWidth)
nodeWidth - the nodeWidth to setprotected int getNodeWidth()
protected DefaultMutableTreeNode getRoot()
Map<K,DefaultMutableTreeNode> getTreeMap()
HierarchicalGraphView.LayoutSettings getLayoutSettings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||