All Packages Class Hierarchy This Package Previous Next Index
Class jdsltools.visualization.ContainerVisualizers.TreeVisualizer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----jdsltools.visualization.ContainerVisualizer
|
+----jdsltools.visualization.ContainerVisualizers.TreeVisualizer
- public class TreeVisualizer
- extends ContainerVisualizer
Displays a BinaryTree in the visualizer window
- Author:
- Lubomir Bourdev,Ryan Shaun Baker
-
EDGE_COLOR
-
-
INTERNAL_COLOR
-
-
INTERNAL_PERIPHERY_COLOR
-
-
LEAF_COLOR
-
-
LOCATOR_COLOR
-
-
SELECTED2_COLOR
-
-
SELECTED_COLOR
-
-
sp_
-
-
X_GROW
-
-
X_MINDISTANCE
-
-
Y_FRAME
-
-
Y_STEP
-
-
TreeVisualizer(int, int, ElementVisualizer, Container, VisualizationController)
-
-
convertToStandard(Container)
-
-
duplicator()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
getTree()
-
-
mousePressed(MouseEvent)
-
-
orderPositions(Position, Hashtable)
-
-
paint(Graphics)
-
-
repaint()
-
-
screenLoc(Container, Position)
-
Returns the coordinates that the given locator would have
if the given container were visualized.
-
setScroller(ScrollPane)
-
-
setSelectedPosition(Position)
-
selects the given locator and redisplays the container
-
showString(String)
-
Display the given string.
-
spaint(Graphics)
-
-
treeNodeHeight(Position)
-
-
visualize(Container)
-
Display the contents of the container, with no
highlighted element.
-
visualize(Container, Position, boolean)
-
Display the contents of the container, with the
element corresponding to the given locator highlighted.
Y_STEP
public static final int Y_STEP
Y_FRAME
public static final int Y_FRAME
X_MINDISTANCE
public static final int X_MINDISTANCE
X_GROW
public static final double X_GROW
SELECTED_COLOR
public static final Color SELECTED_COLOR
LEAF_COLOR
public static final Color LEAF_COLOR
EDGE_COLOR
public static final Color EDGE_COLOR
INTERNAL_COLOR
public static final Color INTERNAL_COLOR
INTERNAL_PERIPHERY_COLOR
public static final Color INTERNAL_PERIPHERY_COLOR
LOCATOR_COLOR
public static final Color LOCATOR_COLOR
SELECTED2_COLOR
public static final Color SELECTED2_COLOR
sp_
public ScrollPane sp_
TreeVisualizer
public TreeVisualizer(int width,
int height,
ElementVisualizer ev,
Container initialContainer,
VisualizationController client)
- Parameters:
- width - the width of the display window
- height - the height of the display window
- ev - the visualizer for the elements of the enumeration
- initialContainer - the initial enumeration displayed
- client - the visualization controller using this
showString
public void showString(String text)
- Display the given string.
- Overrides:
- showString in class ContainerVisualizer
getTree
public BinaryTree getTree()
setSelectedPosition
public void setSelectedPosition(Position selected)
- selects the given locator and redisplays the container
- Overrides:
- setSelectedPosition in class ContainerVisualizer
duplicator
public ContainerDuplicator duplicator()
- Overrides:
- duplicator in class ContainerVisualizer
screenLoc
public Point screenLoc(Container tree,
Position target)
- Returns the coordinates that the given locator would have
if the given container were visualized.
- Overrides:
- screenLoc in class ContainerVisualizer
visualize
public void visualize(Container c)
- Display the contents of the container, with no
highlighted element.
- Overrides:
- visualize in class ContainerVisualizer
visualize
public void visualize(Container c,
Position selected,
boolean active)
- Display the contents of the container, with the
element corresponding to the given locator highlighted.
- Overrides:
- visualize in class ContainerVisualizer
repaint
public void repaint()
- Overrides:
- repaint in class Component
spaint
public void spaint(Graphics g)
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
getPreferredSize
public Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class Component
getMinimumSize
public Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class Component
convertToStandard
public Container convertToStandard(Container s)
- Overrides:
- convertToStandard in class ContainerVisualizer
mousePressed
public void mousePressed(MouseEvent e)
- Overrides:
- mousePressed in class ContainerVisualizer
treeNodeHeight
public int treeNodeHeight(Position cur)
setScroller
public void setScroller(ScrollPane sp)
- Overrides:
- setScroller in class ContainerVisualizer
orderPositions
public void orderPositions(Position lookat,
Hashtable hash) throws Exception
All Packages Class Hierarchy This Package Previous Next Index