All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jdsltools.visualization.ElementSelector

public interface ElementSelector
Interface to force objects that display locators and elements in animations to support certain methods. This interface is implemented by jdsltools.visualization.ElementPanels.ElementPanel, which is an abstract class descending from java.awt.Panel, and which will probably be the most frequently used expression of this interface.

Version:
Sat Dec 14 17:53:19 1996
Author:
Mark Handy

Method Index

 o beginDeletionOperation()
Will be called when the user begins a deletion from the Container, so the ElementSelector can take any appropriate action.

 o beginInsertionOperation()
Will be called when the user begins an insertion into the Container, so the ElementSelector can take any appropriate action (clearing the previous return value, for example).

 o beginOtherOperation()
Will be called when the user begins an operation on the Container that is not subsumed above, so the ElementSelector can take any appropriate action.

 o beginReadOperation()
Will be called when the user begins a read-only operation on the Container, so the ElementSelector can take any appropriate action.

 o endOperation()
Will be called when a Container operation returns, so the ElementSelector can take any appropriate action (randomly generating a new element, for example).

 o endReadOperation()
 o paramElement()
ElementSelectors give the user a choice from a universe of data elements.
 o paramKey()
 o paramPosition1()
ElementSelectors have to report Locators to be used in Container operations.
 o paramPosition2()
A few Container operations require two locators.
 o setParamPosition1(Position)
Stores a Locator in the ElementSelector, to be reported later, when paramLocator1() or paramLocator2() is called.
 o setParamPosition2(Position)
 o setReturnElement(Object)
Displays the result of a method call (one which returns user elements, not Locators, e.g., remove or replace) in the ElementSelector.

 o setReturnLocator(Locator)
Displays the result of a method call (one which returns Locators) in the ElementSelector.

 o setReturnPosition(Position)
Displays the result of a method call (one which returns Positions) in the ElementSelector.

 o timelineEffect()
The structure displayed has moved in history and the element panel must respond accordingly

Methods

 o paramElement
 public abstract Object paramElement()
ElementSelectors give the user a choice from a universe of data elements. This method reports the user's choice.

Returns:
The user's element
 o paramKey
 public abstract Object paramKey()
 o paramPosition1
 public abstract Position paramPosition1()
ElementSelectors have to report Locators to be used in Container operations. They might or might not be able to generate Locators themselves, but other objects can choose Locators and use the setParamLocator(.) method.

Returns:
The Locator parameter selected by the user
 o paramPosition2
 public abstract Position paramPosition2()
A few Container operations require two locators. This method is therefore necessary but rarely used.

Returns:
The additional Locator parameter selected by the user
 o setParamPosition1
 public abstract void setParamPosition1(Position position) throws InvalidElementException, InvalidPositionException
Stores a Locator in the ElementSelector, to be reported later, when paramLocator1() or paramLocator2() is called. (Whether to store the Locator as loc1 or loc2 is up to the ElementSelector.)

Parameters:
locator - A Locator to be stored
 o setParamPosition2
 public abstract void setParamPosition2(Position position) throws InvalidElementException, InvalidPositionException
 o setReturnElement
 public abstract void setReturnElement(Object element) throws InvalidElementException
Displays the result of a method call (one which returns user elements, not Locators, e.g., remove or replace) in the ElementSelector.

Parameters:
element - Returned element, to be displayed
 o setReturnPosition
 public abstract void setReturnPosition(Position position) throws InvalidElementException, InvalidPositionException
Displays the result of a method call (one which returns Positions) in the ElementSelector.

Parameters:
locator - Returned locator, to be displayed
 o setReturnLocator
 public abstract void setReturnLocator(Locator loc) throws InvalidElementException, InvalidLocatorException
Displays the result of a method call (one which returns Locators) in the ElementSelector.

Parameters:
locator - Returned locator, to be displayed
 o beginInsertionOperation
 public abstract void beginInsertionOperation()
Will be called when the user begins an insertion into the Container, so the ElementSelector can take any appropriate action (clearing the previous return value, for example).

 o beginDeletionOperation
 public abstract void beginDeletionOperation()
Will be called when the user begins a deletion from the Container, so the ElementSelector can take any appropriate action.

 o beginReadOperation
 public abstract void beginReadOperation()
Will be called when the user begins a read-only operation on the Container, so the ElementSelector can take any appropriate action.

 o beginOtherOperation
 public abstract void beginOtherOperation()
Will be called when the user begins an operation on the Container that is not subsumed above, so the ElementSelector can take any appropriate action.

 o endOperation
 public abstract void endOperation()
Will be called when a Container operation returns, so the ElementSelector can take any appropriate action (randomly generating a new element, for example).

 o endReadOperation
 public abstract void endReadOperation()
 o timelineEffect
 public abstract void timelineEffect()
The structure displayed has moved in history and the element panel must respond accordingly


All Packages  Class Hierarchy  This Package  Previous  Next  Index