Class tred.EditorObject
All Packages Class Hierarchy This Package Previous Next Index
Class tred.EditorObject
java.lang.Object
|
+----tred.EditorObject
- public class EditorObject
- extends Object
- implements Cloneable, Animated
abstract root class EditorObject for all objects.
-
addStr
- String to add to the beginning of the answer when object is exported.
-
animated
-
-
animImpl
- Here is the reference to implementation of the interface Animated.
-
DEBUG
- debug information is printed while debug flag is on
-
dstr
- String to mark null items when object is exported.
-
dx
-
-
dy
-
-
fixed
- This flag indicates that this object is currently picked up by mouse.
-
fontMetrics
- static fontMetrics
-
getBounds
-
-
graphPanel
- This field contains the GraphPanel where this object belongs.
-
height
- Every editorObject has size (width x height).
-
itemsize
-
This is the static itemsize value.
-
lbl
- Every editorObject has a label.
-
outputStateList
- Table of Strs to indicate which state (before some obj) is exported.
-
touched
-
This field indicates wheter this object should recalculate
it's position.
-
trash
-
-
WARNINGS
-
-
width
- Every editorObject has size (width x height).
-
x
- Every editorObject has a upper left corner (x,y).
-
y
- Every editorObject has a upper left corner (x,y).
-
EditorObject()
-
-
animatorMove(EditorObject)
-
-
click()
-
This method is implemented to be overridden.
-
contains(int, int)
-
-
delete(int, int)
- This methid is implemented to be overridden.
-
disable()
- This method disables the object.
-
disabled()
-
-
element(int, int)
- Non movable panels which have movable elements should override
this method to return the element which should be moved when picked.
-
enable()
- This method enables the object.
-
export(MyPrintStream)
-
This method is forwarded to animImpl object.
-
getBounds()
-
-
getGraphPanel()
-
-
getItemSize()
-
-
getTrash()
-
-
hide(boolean)
-
This method sets the hidden flag which determines if this object
is visible or not.
-
inside(int, int)
- This is the general method for inside.
-
invoked(String)
-
-
isVisible()
-
-
markMovement()
-
-
move(EditorObject, int, int)
-
These methods (move()) are implemented to be overridden.
-
move(int, int)
-
This method is implemented to be subclassed.
-
moveBackward()
-
This method is forwarded to animImpl object.
-
moveBegin()
-
This method is forwarded to animImpl object.
-
moveEnd()
-
This method is forwarded to animImpl object.
-
moveForward()
-
This method is forwarded to animImpl object.
-
moveObject(EditorObject, EditorObject, EditorObject)
-
-
nameOf()
- Unsupported method.
-
paint(Graphics, Rectangle)
-
For speeding up the update procedure one might override this
method in order to update only the given area of the object.
-
resetBuffers()
-
This method is forwarded to animImpl object.
-
setFont(Font)
-
This method should be overridden in order to invoke setFont
for every subComponent
-
setFontMetrics(FontMetrics)
- This method is invoked in order to set the fontMetrics for
all objects.
-
setGraphPanel(GraphPanel)
-
-
setItemSize(int)
- This method initializes the itemsize field.
-
setOrder(String)
-
-
setOutput(String, String, EditorObject, EditorObject)
-
This method sets the object to be exportable.
-
setTrash(Trash)
-
-
size()
- This method is invoked to get the size of this object.
-
split(int, int)
- This methid is implemented to be overridden.
-
toString()
-
-
touch()
- Informs this object to recalculate it's position.
-
touch(boolean)
- Sets or unsets the touched field.
-
touchAll()
-
This method is forwarded to animImpl object and sets touched field
for every object.
-
touched()
-
-
Warning(String)
-
DEBUG
public boolean DEBUG
- debug information is printed while debug flag is on
WARNINGS
public boolean WARNINGS
fixed
public boolean fixed
- This flag indicates that this object is currently picked up by mouse.
dx
public int dx
dy
public int dy
getBounds
public boolean getBounds
itemsize
protected static int itemsize
- This is the static itemsize value. Size of all objects is proportional
to this value.
trash
protected static Trash trash
fontMetrics
protected static FontMetrics fontMetrics
- static fontMetrics
x
protected int x
- Every editorObject has a upper left corner (x,y).
y
protected int y
- Every editorObject has a upper left corner (x,y).
width
protected int width
- Every editorObject has size (width x height).
height
protected int height
- Every editorObject has size (width x height).
lbl
protected String lbl
- Every editorObject has a label.
graphPanel
protected GraphPanel graphPanel
- This field contains the GraphPanel where this object belongs.
touched
protected boolean touched
- This field indicates wheter this object should recalculate
it's position.
dstr
protected String dstr
- String to mark null items when object is exported.
addStr
protected String addStr
- String to add to the beginning of the answer when object is exported.
outputStateList
protected ListObject outputStateList
- Table of Strs to indicate which state (before some obj) is exported.
animImpl
protected static AnimatedImpl animImpl
- Here is the reference to implementation of the interface Animated.
animated
protected static boolean animated
EditorObject
public EditorObject()
setFontMetrics
public final static void setFontMetrics(FontMetrics fm)
- This method is invoked in order to set the fontMetrics for
all objects.
setTrash
public final static void setTrash(Trash t)
getTrash
public final Trash getTrash()
touchAll
public final static void touchAll()
- This method is forwarded to animImpl object and sets touched field
for every object.
setItemSize
public final static void setItemSize(int size)
- This method initializes the itemsize field.
getItemSize
public final static int getItemSize()
resetBuffers
public final static void resetBuffers()
- This method is forwarded to animImpl object.
- See Also:
- AnimatedImpl
moveObject
public final static void moveObject(EditorObject obj,
EditorObject fromObj,
EditorObject toObj)
markMovement
public final static void markMovement()
moveBackward
public final static void moveBackward()
- This method is forwarded to animImpl object.
- See Also:
- AnimatedImpl
moveForward
public final static void moveForward()
- This method is forwarded to animImpl object.
- See Also:
- AnimatedImpl
moveBegin
public final static void moveBegin()
- This method is forwarded to animImpl object.
- See Also:
- AnimatedImpl
moveEnd
public final static void moveEnd()
- This method is forwarded to animImpl object.
- See Also:
- AnimatedImpl
export
public final void export(MyPrintStream printStream)
- This method is forwarded to animImpl object.
- See Also:
- AnimatedImpl
paint
public boolean paint(Graphics g,
Rectangle rect)
- For speeding up the update procedure one might override this
method in order to update only the given area of the object.
The generic method just invokes the paint(Graphics g) method.
- Parameters:
- g - - Graphics
- rect - - Rectangle which is updated
setFont
public void setFont(Font font)
- This method should be overridden in order to invoke setFont
for every subComponent
getBounds
public Rectangle getBounds()
contains
public boolean contains(int px,
int py)
getGraphPanel
public final GraphPanel getGraphPanel()
- Returns:
- GraphPanel graphPanel
setGraphPanel
public final void setGraphPanel(GraphPanel gp)
size
public final Dimension size()
- This method is invoked to get the size of this object. Subclasses
which do not have generic size (width * height) should override this
method.
- Returns:
- the current size of this object.
element
public EditorObject element(int x,
int y)
- Non movable panels which have movable elements should override
this method to return the element which should be moved when picked.
move
public void move(EditorObject to,
int x,
int y)
- These methods (move()) are implemented to be overridden.
Every editorObject should implement it's own move methods. These generic
methods simply do nothing.
animatorMove
public void animatorMove(EditorObject to)
split
public boolean split(int x,
int y)
- This methid is implemented to be overridden.
This method is invoked when a user sends a split event to an object.
This generic split method simply do nothing
delete
public boolean delete(int x,
int y)
- This methid is implemented to be overridden.
This method is invoked when a user sends a delete event to an object.
This generic delete method simply do nothing
click
public void click()
- This method is implemented to be overridden.
Every editorObject should implement it's own click method. This generic
method simply do nothing.
setOrder
protected void setOrder(String order)
move
public void move(int x,
int y)
- This method is implemented to be subclassed.
Every editorObject should implement it's own move method. This generic
method simply do nothing.
setOutput
public final void setOutput(String dstr,
String addStr,
EditorObject before,
EditorObject after)
- This method sets the object to be exportable.
- See Also:
- AnimatedImpl
disable
public final void disable()
- This method disables the object.
enable
public final void enable()
- This method enables the object.
disabled
public final boolean disabled()
- Returns:
- true if object is disabled.
hide
public final void hide(boolean flag)
- This method sets the hidden flag which determines if this object
is visible or not.
- Parameters:
- flag; - true = hidden, false = visible.
isVisible
public final boolean isVisible()
- Returns:
- true if this slot is visible; false if this slot is hidden.
touch
public final void touch(boolean value)
- Sets or unsets the touched field.
touch
public final void touch()
- Informs this object to recalculate it's position.
touched
public final boolean touched()
- Returns:
- True if this object has been touched. False otherwise.
inside
public boolean inside(int x,
int y)
- This is the general method for inside. Special classes should override
this method if upper left corner is not (x,y) and/or object doesn't
have width and height fields properly initialized.
- Returns:
- true if point (x,y) is inside this component.
nameOf
public final String nameOf()
- Unsupported method. Use toString()
toString
public String toString()
- Returns:
- String getClass().toString().
- Overrides:
- toString in class Object
invoked
public void invoked(String str)
Warning
public void Warning(String str)
All Packages Class Hierarchy This Package Previous Next Index