http://www.jpicedt.org

jpicedt.format.input.pstricks
Class PsUnitLengthExpression

java.lang.Object
  extended by jpicedt.format.input.util.AbstractRegularExpression
      extended by jpicedt.format.input.util.SequenceExpression
          extended by jpicedt.format.input.pstricks.PsUnitLengthExpression

public class PsUnitLengthExpression
extends SequenceExpression

Used by PSTParamExpression to parse statement involving the 4 pstricks length registers, that is "unit=1mm,xunit=1mm,yunit=1mm,runit=1mm" (or pt or cm), where setting "unit" sets "xunit", "yunit" and "runit" simultaneously.

Parsed value are stored in Pool's hashtable using PstricksParser.KEY_X_UNIT and related keys.

Note that default PsTricks's unit is 1cm ! (whereas jPicEdt default unit is 1mm) hence no unit leads to pstXunit = 0.1, etc...

Allowed syntaxs are : "0.11" (i.e. cm), "0.11mm", "0.11cm", "0.11pt"

According to PsTricks's doc, whitespaces are allowed ONLY after the comma (see PsTricks doc. page 6), though here we use a StatementExpression which swallows them, which makes it less stringent.


Field Summary
static String RUNIT
           
static String UNIT
           
static String XUNIT
           
static String YUNIT
           
 
Constructor Summary
PsUnitLengthExpression(Pool pl, String type)
          unit actually sets the following three parameters : xunit, yunit, and runit.
 
Method Summary
 
Methods inherited from class jpicedt.format.input.util.SequenceExpression
add, interpret, toString
 
Methods inherited from class jpicedt.format.input.util.AbstractRegularExpression
action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

XUNIT

public static final String XUNIT
See Also:
Constant Field Values

YUNIT

public static final String YUNIT
See Also:
Constant Field Values

RUNIT

public static final String RUNIT
See Also:
Constant Field Values

UNIT

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

PsUnitLengthExpression

public PsUnitLengthExpression(Pool pl,
                              String type)
unit actually sets the following three parameters : xunit, yunit, and runit.

Parameters:
type - XUNIT, YUNIT,...

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org