hades.models.fsm
Class FsmRenderer

java.lang.Object
  extended byjfig.objects.FigBaseobject
      extended byjfig.objects.FigRectangle
          extended byhades.models.fsm.FsmRenderer
All Implemented Interfaces:
FigDrawable, FigObject, java.io.Serializable

public class FsmRenderer
extends FigRectangle
implements java.io.Serializable

FsmRenderer - used to display the JavaFSM state machine icon in HADES

This class is realized as a subclass of JavaFIG FigRectangle with specific attributes: layer 60, color white and overrides paint() to do the actual painting

See Also:
Serialized Form

Field Summary
protected  FSM fsm
           
protected  java.lang.String label
           
protected  java.awt.Point position
           
 
Fields inherited from class jfig.objects.FigRectangle
pixel_width, radius, renderer, use_rounded_corners
 
Fields inherited from class jfig.objects.FigBaseobject
attribs, bbox, comment, debug, painter, printer, sc_bbox, sc_bbox_timestamp, selected, showPoints, syncRedrawFlag, timestamp, trafo, visible, x, y
 
Constructor Summary
FsmRenderer()
          construct an empty FsmRenderer.
 
Method Summary
 FigObject copy()
          make a copy of this object and return the reference to the copy.
 FSM getFSM()
           
 boolean initialize(java.lang.String s)
          initialize an FsmRenderer from a String.
 void paint(java.awt.Graphics g)
          paint() this object.
 void paint(java.awt.Graphics g, FigTrafo2D trafo)
          paint this object using the specified transformation and Graphics g
 void setFSM(FSM fsm)
           
 java.lang.String toString()
          toString() - the usual info method
 void writeAsResource(java.io.PrintWriter ps)
          default implementation of 'writeAsResource'.
 
Methods inherited from class jfig.objects.FigRectangle
appendPoint, canRotate, createRenderer, deletePoint, getMovePointNeighbors, getNearestPoint, getNeighborPoints, getPoints, insertPoint, isClosed, isRounded, minDistance, minDistanceEuclid, mirrorX, mirrorY, move, movePoint, paintSave, rebuild, setAttributes, setFillColor, setFillStyle, setLayer, setLineColor, setLineStyle, setLineWidth, setPoints, supportsPointOps, update
 
Methods inherited from class jfig.objects.FigBaseobject
build_sc_bbox, clonePoints, deselect, get_sc_bbox, getAttributes, getBbox, getComment, getLayer, getPosition, getSyncRedrawFlag, getText, getTimestamp, getTrafo, isSelected, isShowPoints, isVisible, isVisible, keyPressed, manhattan, message, numPoints, reset_debug, rotate, scale, select, set_debug, setComment, setConsole, setObjectPainter, setSyncRedrawFlag, setText, setTrafo, setVisible, showPoints, updateAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

position

protected java.awt.Point position

label

protected java.lang.String label

fsm

protected FSM fsm
Constructor Detail

FsmRenderer

public FsmRenderer()
construct an empty FsmRenderer.

Method Detail

initialize

public boolean initialize(java.lang.String s)
initialize an FsmRenderer from a String. The String contains the coordinates of the top left and the bottom right corner of this FsmRenderer: xl yt xr yb

Specified by:
initialize in interface FigObject
Overrides:
initialize in class FigBaseobject

getFSM

public FSM getFSM()

setFSM

public void setFSM(FSM fsm)

writeAsResource

public void writeAsResource(java.io.PrintWriter ps)
Description copied from class: FigBaseobject
default implementation of 'writeAsResource'. This will write a nearly xfig-compatible version of all basic FigObjects.

Specified by:
writeAsResource in interface FigObject
Overrides:
writeAsResource in class FigBaseobject

paint

public void paint(java.awt.Graphics g,
                  FigTrafo2D trafo)
Description copied from interface: FigDrawable
paint this object using the specified transformation and Graphics g

Specified by:
paint in interface FigObject
Overrides:
paint in class FigRectangle

paint

public void paint(java.awt.Graphics g)
Description copied from class: FigBaseobject
paint() this object. This function currently handles drawing the bounding box corners with emply rectangles for (showPoint) and with filled rectangles for (selected). Subclasses can therefore directly call this method to implement drawing of (showPoints) and (selected) objects.

Specified by:
paint in interface FigObject
Overrides:
paint in class FigRectangle

copy

public FigObject copy()
Description copied from class: FigRectangle
make a copy of this object and return the reference to the copy.

Specified by:
copy in interface FigObject
Overrides:
copy in class FigRectangle

toString

public java.lang.String toString()
toString() - the usual info method

Specified by:
toString in interface FigObject
Overrides:
toString in class FigRectangle