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
-
beginDeletionOperation()
-
Will be called when the user begins a deletion from the Container,
so the ElementSelector can take any appropriate action.
-
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).
-
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.
-
beginReadOperation()
-
Will be called when the user begins a read-only operation on the
Container, so the ElementSelector can take any appropriate action.
-
endOperation()
-
Will be called when a Container operation returns, so the
ElementSelector can take any appropriate action (randomly generating a
new element, for example).
-
endReadOperation()
-
-
paramElement()
-
ElementSelectors give the user a choice from a universe of data elements.
-
paramKey()
-
-
paramPosition1()
-
ElementSelectors have to report Locators to be used in Container operations.
-
paramPosition2()
-
A few Container operations require two locators.
-
setParamPosition1(Position)
-
Stores a Locator in the ElementSelector, to be reported later, when
paramLocator1() or paramLocator2() is called.
-
setParamPosition2(Position)
-
-
setReturnElement(Object)
-
Displays the result of a method call (one which returns user elements,
not Locators, e.g., remove or replace) in the ElementSelector.
-
setReturnLocator(Locator)
-
Displays the result of a method call (one which returns Locators)
in the ElementSelector.
-
setReturnPosition(Position)
-
Displays the result of a method call (one which returns Positions)
in the ElementSelector.
-
timelineEffect()
- The structure displayed has moved in history
and the element panel must respond accordingly
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
paramKey
public abstract Object paramKey()
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
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
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
setParamPosition2
public abstract void setParamPosition2(Position position) throws InvalidElementException, InvalidPositionException
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
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
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
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).
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.
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.
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.
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).
endReadOperation
public abstract void endReadOperation()
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