http://www.jpicedt.org

jpicedt.graphic.io.formatter
Class JPICFormatter

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

public class JPICFormatter
extends AbstractFormatterFactory

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.30 2013/03/27 07:21:29 vincentb1 Exp $
Author:
Sylvain Reynal

Nested Class Summary
protected  class JPICFormatter.DrawingFormatter
          A Drawing's formatter for the JPIC-XML language.
 
Field Summary
protected  String lineSeparatorTab
           
static String STROKE_DASHARRAY
           
 
Fields inherited from class jpicedt.graphic.io.formatter.AbstractFormatterFactory
commentFormatter, factoryMap, lineSeparator
 
Fields inherited from interface jpicedt.graphic.io.formatter.FormatterFactory
MAKE_STANDALONE_FILE
 
Constructor Summary
JPICFormatter(CommentFormatting commentFormatter)
          Constructeur 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 ;
 CommentFormatting getCommentFormatter()
          Renvoie un formatteur de commentaire, ce formatteur sert à encapsuler le code JPIC-XML dans un autre type de contenu sous la forme de commentaires forts (pour la délimitation du début et de la fin du code JPIC-XML) et faibles (pour le code JPIC-XML lui-même)
 void setLineSeparator(String lineSeparator)
           
 
Methods inherited from class jpicedt.graphic.io.formatter.AbstractFormatterFactory
createFormatter, getFileWrapperEpilog, getFileWrapperProlog, getFormatterFactory, getLineSeparator, getMappedClass, map, revertedArrowsAttribute, setCommentFormatter, stringWriteMultiLine, textWriteMultiLine, toString, unmap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STROKE_DASHARRAY

public static final String STROKE_DASHARRAY
See Also:
Constant Field Values

lineSeparatorTab

protected String lineSeparatorTab
Constructor Detail

JPICFormatter

public JPICFormatter(CommentFormatting commentFormatter)
Constructeur JPICFormatter.

Method Detail

setLineSeparator

public void setLineSeparator(String lineSeparator)
Overrides:
setLineSeparator in class AbstractFormatterFactory

configure

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

Parameters:
preferences - 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 ;

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

getCommentFormatter

public CommentFormatting getCommentFormatter()
Description copied from class: AbstractFormatterFactory
Renvoie un formatteur de commentaire, ce formatteur sert à encapsuler le code JPIC-XML dans un autre type de contenu sous la forme de commentaires forts (pour la délimitation du début et de la fin du code JPIC-XML) et faibles (pour le code JPIC-XML lui-même)

Specified by:
getCommentFormatter in interface FormatterFactory
Overrides:
getCommentFormatter in class AbstractFormatterFactory
Returns:
le formatteur de commentaire correspondant au types de contenu LaTeX, Epic/Eepic, et PsTrick.

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org