All Packages Class Hierarchy This Package Previous Next Index
Class jdsltools.visualization.ContainerVisualizer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----jdsltools.visualization.ContainerVisualizer
- public abstract class ContainerVisualizer
- extends Canvas
- implements MouseListener
An object that can visualize some kind of container.
- Author:
- Mark Handy
-
ContainerVisualizer()
-
-
convertToStandard(Container)
-
-
duplicator()
-
-
mouseClicked(MouseEvent)
-
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
-
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.
-
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.
ContainerVisualizer
public ContainerVisualizer()
duplicator
public abstract ContainerDuplicator duplicator()
- Returns:
- A ContainerDuplicator appropriate to the type of container
that this ContainerVisualizer implementation accepts.
setSelectedPosition
public abstract void setSelectedPosition(Position selected)
- selects the given locator and redisplays the container
showString
public abstract void showString(String text)
- Display the given string.
visualize
public abstract void visualize(Container c)
- Display the contents of the container, with no
highlighted element.
visualize
public abstract void visualize(Container c,
Position selected,
boolean active)
- Display the contents of the container, with the
element corresponding to the given locator highlighted.
- Parameters:
- active - -- allows mouse selection if true
screenLoc
public abstract Point screenLoc(Container c,
Position target) throws InvalidPositionException
- Returns the coordinates that the given locator would have
if the given container were visualized.
- Parameters:
- c - A Container that this visualizer can visualize
- target - A Locator from that Container
- Returns:
- Position of the Locator if the Container were,
hypothetically, visualized
- Throws: Note
- that jdsltools.visualization.Exceptions.InvalidLocatorException
is not the same as jdsl.core.api.InvalidLocatorException. The
visualizing exception indicates nothing bad about the locator
or its originating container; it indicates only that the locator was
not found in the container, contrary to expectations. It almost
certainly means that the container is buggy and either is not
invalidating locators that should be invalid or is losing locators
that should be inside it.
convertToStandard
public abstract Container convertToStandard(Container c)
setScroller
public abstract void setScroller(ScrollPane sp)
mouseClicked
public void mouseClicked(MouseEvent e)
mousePressed
public void mousePressed(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
mouseEntered
public void mouseEntered(MouseEvent e)
mouseExited
public void mouseExited(MouseEvent e)
All Packages Class Hierarchy This Package Previous Next Index