http://www.jpicedt.org

jpicedt.graphic.io.formatter
Class JPICFormatter

java.lang.Object
  extended by jpicedt.graphic.io.formatter.JPICFormatter
All Implemented Interfaces:
FormatterFactory, JPICConstants, PicObjectConstants

public class JPICFormatter
extends Object
implements FormatterFactory, PicObjectConstants, JPICConstants

a FormatterFactory that produces formatters for the JPIC-XML native format

Syntax for common attributes, that is, attributes not specific to a given subclass of Element, is strongly inspired from the XML-SVG markup language, although it is restricted to a subset of SVG attributes supported by jPicEdt, i.e. mainly by pstricks. Hence attributes names and values strongly mimic those of PsTricks, except for some keyword changes. So far, default values are hardcoded in DefaultAttributeSet. This may be changed in the near future, once the language has stabilized and the DtD is ready for use.

Here is a list of supported attributes as of release 1.4-pre :

These syntax rules are only briefly laid out here as a reminder to end-users. The corresponding DtD, once it is set up, will be the only valid specification for that matter.

Since:
jpicedt 1.4
Version:
$Id: JPICFormatter.java,v 1.18.2.1 2007/09/02 11:56:19 reynal Exp $
Author:
Sylvain Reynal

Nested Class Summary
protected  class JPICFormatter.DrawingFormatter
          A Drawing's formatter for the JPIC-XML language.
 
Field Summary
static String STROKE_DASHARRAY
           
 
Fields inherited from interface jpicedt.graphic.io.formatter.FormatterFactory
MAKE_STANDALONE_FILE
 
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants
ARROW_GLOBAL_SCALE_LENGTH, ARROW_GLOBAL_SCALE_WIDTH, ARROW_INSET_SCALE, ARROW_LENGTH_SCALE, ARROW_WIDTH_LINEWIDTH_SCALE, ARROW_WIDTH_MINIMUM_MM, BRACKET_LENGTH_SCALE, 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, MIDDLE, NONE, OUTER, OVER_STRIKE, OVER_STRIKE_COLOR, OVER_STRIKE_WIDTH, POLYDOTS_ANGLE, POLYDOTS_CIRCLE, POLYDOTS_DISK, POLYDOTS_PENTAGON, POLYDOTS_PENTAGON_FILLED, POLYDOTS_PLUS, POLYDOTS_SCALE_H, POLYDOTS_SCALE_V, POLYDOTS_SIZE_LINEWIDTH_SCALE, POLYDOTS_SIZE_MINIMUM_MM, POLYDOTS_SQUARE, POLYDOTS_SQUARE_FILLED, POLYDOTS_STYLE, POLYDOTS_SUPERIMPOSE, POLYDOTS_TRIANGLE, POLYDOTS_TRIANGLE_FILLED, PS_POINT, PST_CUSTOM, RBRACKET_LENGTH_SCALE, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, TBAR_WIDTH_LINEWIDTH_SCALE, TBAR_WIDTH_MINIMUM_MM, TEXT_BOX_CIRCLE, TEXT_BOX_NO_FRAME, TEXT_BOX_OVAL, TEXT_BOX_RECTANGLE, TEXT_FRAME, TEXT_HALIGN_CENTER, TEXT_HALIGN_LEFT, TEXT_HALIGN_RIGHT, TEXT_HOR_ALIGN, TEXT_ROTATION, TEXT_VALIGN_BASELINE, TEXT_VALIGN_BOTTOM, TEXT_VALIGN_CENTER, TEXT_VALIGN_TOP, TEXT_VERT_ALIGN, VLINES, VLINES_FILLED
 
Fields inherited from interface jpicedt.graphic.io.formatter.JPICConstants
CR_LF, CR_LF_TAB
 
Constructor Summary
JPICFormatter()
           
 
Method Summary
static void configure(Properties preferences)
          Configure static fields using the given Properties object This implementation does nothing so far.
 Formatter createFormatter(Drawing d, Object outputConstraint)
          Return a Formatter able to format the given Drawing in the JPIC-XML language ;
 Formatter createFormatter(Element e)
          Return a Formatter able to format the given Element in the JPIC-XML format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STROKE_DASHARRAY

public static final String STROKE_DASHARRAY
See Also:
Constant Field Values
Constructor Detail

JPICFormatter

public JPICFormatter()
Method Detail

createFormatter

public Formatter createFormatter(Element e)
Return a Formatter able to format the given Element in the JPIC-XML format

Specified by:
createFormatter in interface FormatterFactory
Returns:
a Formatter able to format the given Element according to the format of this factory

configure

public static void configure(Properties preferences)
Configure static fields using the given Properties object This implementation does nothing so far.

Parameters:
properties - used to read shared parameters. If null, default values are used.

createFormatter

public Formatter createFormatter(Drawing d,
                                 Object outputConstraint)
Return a Formatter able to format the given Drawing in the JPIC-XML language ;

Specified by:
createFormatter in interface FormatterFactory
Parameters:
outputConstraint - constraint used by this factory to create a specific Formatter on-the-fly, with e.g. dynamic constraints on the output format. There are no constraints so far for this factory, and this parameter may safely be set to null.
Returns:
a Formatter able to format the given Drawing according to the format of this factory ; this may reliy on calls to createFormatter(Element e) on the elements of the drawing, plus creating auxiliary

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org