hades.utils
Class FigWriter

java.lang.Object
  extended byjfig.objects.FigWriter
      extended byhades.utils.FigWriter

public class FigWriter
extends FigWriter

export HADES circuits to FIG format and filter colors.

FigWriter - export JavaFIG drawings or HADES designs to FIG file format. This class supports several color options useful for HADES designs: full colors, black and white with colored I/O, and black and white only. See class hades.utils.ExportOptionsDialog for the list and numerical encoding of the available color options.

To get colored I/O the corresponding symbols must be subclasses of hades.symbols.ColoredCircle and ColoredPolyline. This class also has special support for hades.symbols.BboxRectangle objects, which are automatically filled with very light gray in all modes.

See Also:
FilteredFigWriter

Field Summary
static int BLACK_WHITE
           
protected  int colorOption
           
static int FULL_COLORS
           
static int IO_COLORS
           
 
Fields inherited from class jfig.objects.FigWriter
currentObject
 
Constructor Summary
FigWriter()
          construct an empty FigWriter.
 
Method Summary
 int getAreaFill(FigAttribs attribs)
           
 int getColorOption()
           
 int getFillColorIndex(FigAttribs attribs)
           
 int getLineColorIndex(FigAttribs attribs)
           
 void message(java.lang.String msg)
           
 void setColorOption(int c)
           
 java.lang.String toString()
          toString() - the usual info method
 int write_fig31_file(java.io.PrintWriter pw, boolean top_level, java.util.Enumeration OE)
           
 
Methods inherited from class jfig.objects.FigWriter
fake_fig32_controlpoints, fig_scale, fig_scale, getArcDirection, getBackwardArrowFlag, getCapStyle, getDepth, getEllipseAngle, getEllipseDirection, getFont, getFontAngle, getFontFlags, getFontSize, getForwardArrowFlag, getHexString, getJoinStyle, getLineStyle, getLineThickness, getLineThickness, getPenStyle, getRadius, getStyleVal, getTextHeight, getTextLength, reset_debug, set_debug, setResolution, write_arrow_line, write_fig31_arc, write_fig31_cpointline, write_fig31_ellipse, write_fig31_file, write_fig31_file, write_fig31_header, write_fig31_object_comment, write_fig31_pointline, write_fig31_polyline, write_fig31_pseudocolors, write_fig31_rectangle, write_fig31_spline, write_fig31_text, write_fig32_header, write_jfig_trigger, writeAsResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

colorOption

protected int colorOption

FULL_COLORS

public static final int FULL_COLORS
See Also:
Constant Field Values

IO_COLORS

public static final int IO_COLORS
See Also:
Constant Field Values

BLACK_WHITE

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

FigWriter

public FigWriter()
construct an empty FigWriter.

Method Detail

setColorOption

public void setColorOption(int c)

getColorOption

public int getColorOption()

getLineColorIndex

public int getLineColorIndex(FigAttribs attribs)
Overrides:
getLineColorIndex in class FigWriter

getFillColorIndex

public int getFillColorIndex(FigAttribs attribs)
Overrides:
getFillColorIndex in class FigWriter

getAreaFill

public int getAreaFill(FigAttribs attribs)
Overrides:
getAreaFill in class FigWriter

write_fig31_file

public int write_fig31_file(java.io.PrintWriter pw,
                            boolean top_level,
                            java.util.Enumeration OE)

message

public void message(java.lang.String msg)

toString

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