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

Constructor Index

 o ContainerVisualizer()

Method Index

 o convertToStandard(Container)
 o duplicator()
 o mouseClicked(MouseEvent)
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)
 o screenLoc(Container, Position)
Returns the coordinates that the given locator would have if the given container were visualized.

 o setScroller(ScrollPane)
 o setSelectedPosition(Position)
selects the given locator and redisplays the container
 o showString(String)
Display the given string.

 o visualize(Container)
Display the contents of the container, with no highlighted element.

 o visualize(Container, Position, boolean)
Display the contents of the container, with the element corresponding to the given locator highlighted.

Constructors

 o ContainerVisualizer
 public ContainerVisualizer()

Methods

 o duplicator
 public abstract ContainerDuplicator duplicator()
Returns:
A ContainerDuplicator appropriate to the type of container that this ContainerVisualizer implementation accepts.

 o setSelectedPosition
 public abstract void setSelectedPosition(Position selected)
selects the given locator and redisplays the container

 o showString
 public abstract void showString(String text)
Display the given string.

 o visualize
 public abstract void visualize(Container c)
Display the contents of the container, with no highlighted element.

 o 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
 o 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.

 o convertToStandard
 public abstract Container convertToStandard(Container c)
 o setScroller
 public abstract void setScroller(ScrollPane sp)
 o mouseClicked
 public void mouseClicked(MouseEvent e)
 o mousePressed
 public void mousePressed(MouseEvent e)
 o mouseReleased
 public void mouseReleased(MouseEvent e)
 o mouseEntered
 public void mouseEntered(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)

All Packages  Class Hierarchy  This Package  Previous  Next  Index