Class FigWrapper

  extended byjfig.objects.FigBaseobject
      extended byjfig.objects.FigCompound
          extended byhades.symbols.FigWrapper
All Implemented Interfaces:
ConsoleMessage, FigDrawable, FigObject, java.io.Serializable

public class FigWrapper
extends FigCompound
implements java.io.Serializable, ConsoleMessage

FigWrapper: a class to include FIG (3.x) files into HADES symbols. This class is realized as a subclass of FigCompound, with default layer 85 (quite deep, but above the BboxRectangles).

See Also:
Serialized Form

Field Summary
 boolean debug
static int FIG_LAYER
Fields inherited from class jfig.objects.FigCompound
Fields inherited from class jfig.objects.FigBaseobject
attribs, bbox, comment, painter, printer, sc_bbox, sc_bbox_timestamp, selected, showPoints, syncRedrawFlag, timestamp, trafo, visible, x, y
Constructor Summary
          construct an empty FigWrapper.
Method Summary
 void consoleMessage(java.lang.String msg)
 FigObject copy()
          The copy() method for a compound object.
 boolean initialize(java.lang.String s)
          initialize an FigWrapper from a String.
 void parseFigFile(java.lang.String filename)
 void setLayer(int layer)
 void setSimObject(SimObject parent)
 java.lang.String toString()
          toString() - the usual info method
 void update_bbox()
          calculate a new bounding box for this compound object.
 void writeAsResource(java.io.PrintWriter ps)
          default implementation of 'writeAsResource'.
Methods inherited from class jfig.objects.FigCompound
addMember, canRotate, changeLayerRecursively, deleteAllMembers, deleteMember, fastAddMember, getMembers, isMember, minDistanceEuclid, mirrorX, mirrorY, move, paint, paint, paintInverse, paintSave, rebuild, rotate, scale, setObjectPainter, setTrafo, setVisible, update
Methods inherited from class jfig.objects.FigBaseobject
appendPoint, build_sc_bbox, clonePoints, deletePoint, deselect, get_sc_bbox, getAttributes, getBbox, getComment, getLayer, getMovePointNeighbors, getNearestPoint, getNeighborPoints, getPoints, getPosition, getSyncRedrawFlag, getText, getTimestamp, getTrafo, insertPoint, isClosed, isSelected, isShowPoints, isVisible, isVisible, keyPressed, manhattan, message, minDistance, movePoint, numPoints, paint, reset_debug, select, set_debug, setAttributes, setComment, setConsole, setPoints, setSyncRedrawFlag, setText, showPoints, supportsPointOps, updateAttributes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


public boolean debug


public static final int FIG_LAYER
See Also:
Constant Field Values
Constructor Detail


public FigWrapper()
construct an empty FigWrapper.

Method Detail


public void setLayer(int layer)


public void setSimObject(SimObject parent)


public boolean initialize(java.lang.String s)
initialize an FigWrapper from a String. The String contains the position of the left-top corner of this FigWrapper compound in the Symbol, and the Java resource name of the FIG 3.1 file. This method returns true if all required data could be read.

Specified by:
initialize in interface FigObject
initialize in class FigBaseobject


public void update_bbox()
Description copied from class: FigCompound
calculate a new bounding box for this compound object. It suffices to calculate the union of the bounding boxes of all member objects.

This method is public to allow the FIG3.1 parser efficient parsing of (possibly nested) compound objects.

update_bbox in class FigCompound
See Also:


public void parseFigFile(java.lang.String filename)


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
writeAsResource in class FigBaseobject


public FigObject copy()
Description copied from class: FigCompound
The copy() method for a compound object. We first create a new compound object. Then we create copies of all members of this compound and add them to the new one. Finally we return the new compound.

To get the xfig copy behaviour, the editor may combine copy() with a subsequent move().

Specified by:
copy in interface FigObject
copy in class FigCompound


public void consoleMessage(java.lang.String msg)
Specified by:
consoleMessage in interface ConsoleMessage


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

Specified by:
toString in interface FigObject
toString in class FigCompound