All Packages Class Hierarchy This Package Previous Next Index
Class jdsltools.visualization.ElementPanels.ElementPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----jdsltools.visualization.ElementPanels.ElementPanel
- public abstract class ElementPanel
- extends Panel
- implements ElementSelector
Integration of the logical interface jdsltools.visualization.ElementSelector
with a visual Panel. All interface implementation
and all layout are left to subclasses.
- Author:
- Mark Handy
-
ElementPanel()
-
-
beginDeletionOperation()
-
Will be called when the user begins a deletion from the Container,
so the ElementPanel can take any appropriate action.
-
beginInsertionOperation()
-
Will be called when the user begins an insertion into the Container,
so the ElementPanel 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 ElementPanel can take any
appropriate action.
-
beginReadOperation()
-
Will be called when the user begins a read-only operation on the
Container, so the ElementPanel can take any appropriate action.
-
endOperation()
-
Will be called when a Container operation returns, so the
ElementPanel can take any appropriate action (randomly generating a
new element, for example).
-
endReadOperation()
-
-
loadState(ElementPanelState)
-
-
paramElement()
-
ElementPanels give the user a choice from a universe of data elements.
-
paramKey()
-
-
paramPosition1()
-
ElementPanels have to report Locators to be used in Container operations.
-
paramPosition2()
-
A few Container operations require two locators.
-
saveState()
-
-
setParamPosition(Position)
-
Stores a Locator in the ElementPanel, to be reported later, when
paramLocator1() or paramLocator2() is called.
-
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 ElementPanel.
-
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 Locators)
in the ElementPanel.
-
timelineEffect()
- The structure displayed has moved in history
and the element panel must respond accordingly
ElementPanel
public ElementPanel()
paramElement
public abstract Object paramElement()
- ElementPanels 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()
- ElementPanels 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
setParamPosition
public abstract void setParamPosition(Position position) throws InvalidElementException, InvalidPositionException
- Stores a Locator in the ElementPanel, to be reported later, when
paramLocator1() or paramLocator2() is called. (Whether to store
the Locator as loc1 or loc2 is up to the ElementPanel.)
- Parameters:
- locator - A Locator to be stored
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 ElementPanel.
- 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 Locators)
in the ElementPanel.
- 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 ElementPanel 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 ElementPanel 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 ElementPanel 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 ElementPanel can take any
appropriate action.
endOperation
public abstract void endOperation()
- Will be called when a Container operation returns, so the
ElementPanel can take any appropriate action (randomly generating a
new element, for example).
saveState
public abstract ElementPanelState saveState()
loadState
public abstract void loadState(ElementPanelState e)
All Packages Class Hierarchy This Package Previous Next Index