physicon.graphLib
Class DrawerBase

java.lang.Object
  |
  +--physicon.graphLib.DrawerBase
Direct Known Subclasses:
ArrowDrawer, ChartDrawerBase, CurveDrawerBase, CurveHatchingDrawer, HatchingDrawer, LabelDrawer, LineDrawer, MarkerDrawerBase, NullDrawer, ScaleDrawerBase

public abstract class DrawerBase
extends java.lang.Object
implements physicon.GraphEngine.GEObject

Represents abstract Drawer object Drawers are responsible for painting GraphObjects

See Also:
GraphObjectBase

Constructor Summary
DrawerBase()
           
 
Method Summary
 boolean contains(java.awt.Point _pt)
          Returns true if the given point is in the local rough rect of the current object.
abstract  void drawLocal(java.awt.Graphics g)
          Must draw the current object to the given Graphics object.
 double getGlobalLevel()
          Returns global Z - level of the current object.
 java.awt.Point getGlobalRefPoint()
          Returns global reference point of the current object.
abstract  java.awt.Rectangle getLocalRoughRect()
          Must return local rough rect of the current object.
 void reset()
          Must clear the current object This function is called before the current object is to be updated
 void setGlobalLevel(double _d)
          Sets Z - level to the current object
 void setGlobalRefPoint(java.awt.Point _pt)
          Sets the global reference point to the current object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawerBase

public DrawerBase()
Method Detail

getGlobalLevel

public final double getGlobalLevel()
Returns global Z - level of the current object. Object with less Z - level are to be painted under the objects with grater Z - level.
Specified by:
getGlobalLevel in interface physicon.GraphEngine.GEObject

setGlobalLevel

public void setGlobalLevel(double _d)
Sets Z - level to the current object

getGlobalRefPoint

public final java.awt.Point getGlobalRefPoint()
Returns global reference point of the current object. This is the reference point relative to the container. Returned the field of the object. No objects created.
Specified by:
getGlobalRefPoint in interface physicon.GraphEngine.GEObject
See Also:
GraphContainerBase

setGlobalRefPoint

public final void setGlobalRefPoint(java.awt.Point _pt)
Sets the global reference point to the current object
Parameters:
_pt - - new global reference point

contains

public boolean contains(java.awt.Point _pt)
Returns true if the given point is in the local rough rect of the current object.
Parameters:
_pt - - given point. This point is in the coordinate system of the current object.

getLocalRoughRect

public abstract java.awt.Rectangle getLocalRoughRect()
Must return local rough rect of the current object. This rect is in the coordinate system of the current object
Specified by:
getLocalRoughRect in interface physicon.GraphEngine.GEObject

drawLocal

public abstract void drawLocal(java.awt.Graphics g)
Must draw the current object to the given Graphics object. The object draws itself in its coordinate system.
Specified by:
drawLocal in interface physicon.GraphEngine.GEObject
Parameters:
g - - given Graphics

reset

public void reset()
Must clear the current object This function is called before the current object is to be updated