Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.format.latex
Class PicPolygonFormatter  view PicPolygonFormatter download PicPolygonFormatter.java

java.lang.Object
  extended byjpicedt.format.latex.PicPolygonFormatter
All Implemented Interfaces:
jpicedt.graphic.io.formatter.Formatter, LatexConstants, jpicedt.graphic.model.PicObjectConstants

public class PicPolygonFormatter
extends java.lang.Object
implements jpicedt.graphic.io.formatter.Formatter, jpicedt.graphic.model.PicObjectConstants, LatexConstants

An interface that specifies common formatting behaviours for Drawable objects


Field Summary
protected  jpicedt.graphic.model.PicPolygon element
          the Element this formater acts upon
protected  LatexFormatter factory
           
 
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants
CROSSHATCH, CROSSHATCH_FILLED, DASH_OPAQUE, DASH_TRANSPARENT, DASH1, DASH2, DASH3, DASHED, DIMEN, DOT_SEP, DOT_SEP1, DOT_SEP2, DOT_SEP3, DOTTED, DOUBLE_COLOR, DOUBLE_LINE, DOUBLE_SEP, FILL_COLOR, FILL_STYLE, HATCH_ANGLE, HATCH_COLOR, HATCH_SEP, HATCH_WIDTH, HLINES, HLINES_FILLED, INNER, LEFT_ARROW, LINE_COLOR, LINE_STYLE, LINE_WIDTH, MaxAttributeNameIndex, MIDDLE, NONE, OUTER, POLYGON_DOTS, POLYGON_SOLID, POLYGON_STYLE, PS_POINT, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, VLINES, VLINES_FILLED
 
Fields inherited from interface jpicedt.format.latex.LatexConstants
CR_LF, DEFAULT_EM_LINE_LENGTH, DEFAULT_FILE_WRAPPER_EPILOG, DEFAULT_FILE_WRAPPER_PROLOG, DEFAULT_LINE_THICKNESS, DEFAULT_MAX_CIRCLE_DIAMETER, DEFAULT_MAX_DISK_DIAMETER, DEFAULT_MAX_EM_CIRCLE_SEGMENT_LENGTH, DEFAULT_MAX_EM_LINE_SLOPE, KEY_EM_LINE_LENGTH, KEY_FILE_WRAPPER_EPILOG, KEY_FILE_WRAPPER_PROLOG, KEY_LINE_THICKNESS, KEY_MAX_CIRCLE_DIAMETER, KEY_MAX_DISK_DIAMETER, KEY_MAX_EM_CIRCLE_SEGMENT_LENGTH, KEY_MAX_EM_LINE_SLOPE
 
Constructor Summary
PicPolygonFormatter(jpicedt.graphic.model.PicPolygon element, LatexFormatter factory)
           
 
Method Summary
protected  void appendPicedtStartingString(java.lang.StringBuffer buf)
          Create the PicEdt starting string (i.e.
 java.lang.String format()
          Return a string representation of a PicPolygon in the LaTeX format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected jpicedt.graphic.model.PicPolygon element
the Element this formater acts upon


factory

protected LatexFormatter factory
Constructor Detail

PicPolygonFormatter

public PicPolygonFormatter(jpicedt.graphic.model.PicPolygon element,
                           LatexFormatter factory)
Method Detail

format

public java.lang.String format()

Return a string representation of a PicPolygon in the LaTeX format.

Syntax :
%Polygon [arrows] (x1,y1)(x2,y2)...(xn,yn) blacken|shade|whiten
... (LaTeX or eepic commands)
%End Polygon
where [arrows]= "0 0", "0 1", "1 0" or "1 1".

Filling is only relevant if using eepic, but we must store these informations even though they may not be used in this format.

Specified by:
format in interface jpicedt.graphic.io.formatter.Formatter
Since:
PicEdt 1.0

appendPicedtStartingString

protected void appendPicedtStartingString(java.lang.StringBuffer buf)
Create the PicEdt starting string (i.e. %Polygon...) valid for both the LaTeX and the eepic format, and append it to the given StringBuffer. Appended string is CR-terminated.