Class tred.Stack
All Packages Class Hierarchy This Package Previous Next Index
Class tred.Stack
java.lang.Object
|
+----tred.EditorObject
|
+----tred.EditorPanel
|
+----tred.NodePanel
|
+----tred.Stack
- public class Stack
- extends NodePanel
implementation to Stack.
-
pop
-
-
getState(String)
-
This method is invoked in order to get the state of Stack for export.
-
move(EditorObject, int, int)
-
This is the special move method for Stack and is invoked by
AnimImpl in order to handle all the movements one stack movement
needs to do.
-
paint(Graphics)
- This method is invoked when this panel is draw into the screen.
-
pop()
-
This method is invoked when the pop-button is pushed.
-
setFont(Font)
-
This method should be overridden in order to invoke setFont
for every subComponent
pop
protected Button pop
setFont
public final void setFont(Font font)
- This method should be overridden in order to invoke setFont
for every subComponent
- Overrides:
- setFont in class EditorObject
pop
public void pop()
- This method is invoked when the pop-button is pushed. A new slot
(with stack pile) is created.
move
public void move(EditorObject object,
int x,
int y)
- This is the special move method for Stack and is invoked by
AnimImpl in order to handle all the movements one stack movement
needs to do. There could be several move operations (many items could
be moved) in one stack move operation. The pop-method marks the
beginning and end of the pop operation and when a backward/forward
button in pressed we have to make all the move operations between those
states as a one move operation. To make this method compatible with
all the other move methods, the animImpl class delivers also
parameters which are ignored.
- Parameters:
- object - move backward if object is null, move forward if not.
(this is the way pop-method marks the beginning/end)
- x - not needed
- y - not needed
- Overrides:
- move in class EditorObject
getState
protected String getState(String str)
- This method is invoked in order to get the state of Stack for export.
- Parameters:
- str - is the substitute string for empty slot.
- Returns:
- the current state (string of items in the slots) of this stack.
- Overrides:
- getState in class EditorPanel
- See Also:
- export
paint
public boolean paint(Graphics g)
- This method is invoked when this panel is draw into the screen.
- Overrides:
- paint in class NodePanel
All Packages Class Hierarchy This Package Previous Next Index