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.

Variable Index

 o addStr
String to add to the beginning of the answer when object is exported.
 o animated
 o animImpl
Here is the reference to implementation of the interface Animated.
 o DEBUG
debug information is printed while debug flag is on
 o dstr
String to mark null items when object is exported.
 o dx
 o dy
 o fixed
This flag indicates that this object is currently picked up by mouse.
 o fontMetrics
static fontMetrics
 o getBounds
 o graphPanel
This field contains the GraphPanel where this object belongs.
 o height
Every editorObject has size (width x height).
 o itemsize
This is the static itemsize value.
 o lbl
Every editorObject has a label.
 o outputStateList
Table of Strs to indicate which state (before some obj) is exported.
 o touched
This field indicates wheter this object should recalculate it's position.
 o trash
 o WARNINGS
 o width
Every editorObject has size (width x height).
 o x
Every editorObject has a upper left corner (x,y).
 o y
Every editorObject has a upper left corner (x,y).

Constructor Index

 o EditorObject()

Method Index

 o animatorMove(EditorObject)
 o click()
This method is implemented to be overridden.
 o contains(int, int)
 o delete(int, int)
This methid is implemented to be overridden.
 o disable()
This method disables the object.
 o disabled()
 o element(int, int)
Non movable panels which have movable elements should override this method to return the element which should be moved when picked.
 o enable()
This method enables the object.
 o export(MyPrintStream)
This method is forwarded to animImpl object.
 o getBounds()
 o getGraphPanel()
 o getItemSize()
 o getTrash()
 o hide(boolean)
This method sets the hidden flag which determines if this object is visible or not.
 o inside(int, int)
This is the general method for inside.
 o invoked(String)
 o isVisible()
 o markMovement()
 o move(EditorObject, int, int)
These methods (move()) are implemented to be overridden.
 o move(int, int)
This method is implemented to be subclassed.
 o moveBackward()
This method is forwarded to animImpl object.
 o moveBegin()
This method is forwarded to animImpl object.
 o moveEnd()
This method is forwarded to animImpl object.
 o moveForward()
This method is forwarded to animImpl object.
 o moveObject(EditorObject, EditorObject, EditorObject)
 o nameOf()
Unsupported method.
 o 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.
 o resetBuffers()
This method is forwarded to animImpl object.
 o setFont(Font)
This method should be overridden in order to invoke setFont for every subComponent
 o setFontMetrics(FontMetrics)
This method is invoked in order to set the fontMetrics for all objects.
 o setGraphPanel(GraphPanel)
 o setItemSize(int)
This method initializes the itemsize field.
 o setOrder(String)
 o setOutput(String, String, EditorObject, EditorObject)
This method sets the object to be exportable.
 o setTrash(Trash)
 o size()
This method is invoked to get the size of this object.
 o split(int, int)
This methid is implemented to be overridden.
 o toString()
 o touch()
Informs this object to recalculate it's position.
 o touch(boolean)
Sets or unsets the touched field.
 o touchAll()
This method is forwarded to animImpl object and sets touched field for every object.
 o touched()
 o Warning(String)

Variables

 o DEBUG
  public boolean DEBUG
debug information is printed while debug flag is on
 o WARNINGS
  public boolean WARNINGS
 o fixed
  public boolean fixed
This flag indicates that this object is currently picked up by mouse.
 o dx
  public int dx
 o dy
  public int dy
 o getBounds
  public boolean getBounds
 o itemsize
  protected static int itemsize
This is the static itemsize value. Size of all objects is proportional to this value.
 o trash
  protected static Trash trash
 o fontMetrics
  protected static FontMetrics fontMetrics
static fontMetrics
 o x
  protected int x
Every editorObject has a upper left corner (x,y).
 o y
  protected int y
Every editorObject has a upper left corner (x,y).
 o width
  protected int width
Every editorObject has size (width x height).
 o height
  protected int height
Every editorObject has size (width x height).
 o lbl
  protected String lbl
Every editorObject has a label.
 o graphPanel
  protected GraphPanel graphPanel
This field contains the GraphPanel where this object belongs.
 o touched
  protected boolean touched
This field indicates wheter this object should recalculate it's position.
 o dstr
  protected String dstr
String to mark null items when object is exported.
 o addStr
  protected String addStr
String to add to the beginning of the answer when object is exported.
 o outputStateList
  protected ListObject outputStateList
Table of Strs to indicate which state (before some obj) is exported.
 o animImpl
  protected static AnimatedImpl animImpl
Here is the reference to implementation of the interface Animated.
 o animated
  protected static boolean animated

Constructors

 o EditorObject
  public EditorObject()

Methods

 o setFontMetrics
  public final static void setFontMetrics(FontMetrics fm)
This method is invoked in order to set the fontMetrics for all objects.
 o setTrash
  public final static void setTrash(Trash t)
 o getTrash
  public final Trash getTrash()
 o touchAll
  public final static void touchAll()
This method is forwarded to animImpl object and sets touched field for every object.
 o setItemSize
  public final static void setItemSize(int size)
This method initializes the itemsize field.
 o getItemSize
  public final static int getItemSize()
 o resetBuffers
  public final static void resetBuffers()
This method is forwarded to animImpl object.
See Also:
AnimatedImpl
 o moveObject
  public final static void moveObject(EditorObject obj,
                                      EditorObject fromObj,
                                      EditorObject toObj)
 o markMovement
  public final static void markMovement()
 o moveBackward
  public final static void moveBackward()
This method is forwarded to animImpl object.
See Also:
AnimatedImpl
 o moveForward
  public final static void moveForward()
This method is forwarded to animImpl object.
See Also:
AnimatedImpl
 o moveBegin
  public final static void moveBegin()
This method is forwarded to animImpl object.
See Also:
AnimatedImpl
 o moveEnd
  public final static void moveEnd()
This method is forwarded to animImpl object.
See Also:
AnimatedImpl
 o export
  public final void export(MyPrintStream printStream)
This method is forwarded to animImpl object.
See Also:
AnimatedImpl
 o 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
 o setFont
  public void setFont(Font font)
This method should be overridden in order to invoke setFont for every subComponent
 o getBounds
  public Rectangle getBounds()
 o contains
  public boolean contains(int px,
                          int py)
 o getGraphPanel
  public final GraphPanel getGraphPanel()
Returns:
GraphPanel graphPanel
 o setGraphPanel
  public final void setGraphPanel(GraphPanel gp)
 o 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.
 o 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.
 o 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.
 o animatorMove
  public void animatorMove(EditorObject to)
 o 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
 o 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
 o 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.
 o setOrder
  protected void setOrder(String order)
 o 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.
 o setOutput
  public final void setOutput(String dstr,
                              String addStr,
                              EditorObject before,
                              EditorObject after)
This method sets the object to be exportable.
See Also:
AnimatedImpl
 o disable
  public final void disable()
This method disables the object.
 o enable
  public final void enable()
This method enables the object.
 o disabled
  public final boolean disabled()
Returns:
true if object is disabled.
 o 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.
 o isVisible
  public final boolean isVisible()
Returns:
true if this slot is visible; false if this slot is hidden.
 o touch
  public final void touch(boolean value)
Sets or unsets the touched field.
 o touch
  public final void touch()
Informs this object to recalculate it's position.
 o touched
  public final boolean touched()
Returns:
True if this object has been touched. False otherwise.
 o 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.
 o nameOf
  public final String nameOf()
Unsupported method. Use toString()
 o toString
  public String toString()
Returns:
String getClass().toString().
Overrides:
toString in class Object
 o invoked
  public void invoked(String str)
 o Warning
  public void Warning(String str)

All Packages  Class Hierarchy  This Package  Previous  Next  Index