Class PsBox

  • All Implemented Interfaces:
    ExpressionConstants, PicObjectConstants

    public class PsBox
    extends SequenceExpression
    implements PicObjectConstants, ExpressionConstants
    Parses PsTricks boxes, i.e. (depending on the "type" parameter of the constructor)
    • \\psframebox[param]{text}}
    • \\psovalbox[param]{text}}
    • \\pscirclebox[param]{text}}
    This expression is to be used as a child expression of either {@link #jpicedt.format.input.latex.LaTeXPutExpression jpicedt.format.input.latex.LaTeXPutExpression} or {@link #jpicedt.format.input.pstricks.PsRPutExpression PsRPutExpression}.

    The parsing code makes use of the following Pool's key/value pairs (as set by the enclosing XXXPutExpression beforehands):

    • KEY_RPUT_VALIGN: \\rput's [bBt] vertical alignment parameter
    • KEY_RPUT_HALIGN: \\rput's [lr] horizontal alignment parameter
    • KEY_RPUT_POINT: \\rput's (x,y) KEY_RPUT_VALIGNparameter
    • KEY_RPUT_ROTATION: \\rput's {rotation} parameter
    For each of these four keys, permitted values are the same as in PicAttributeSet. For instance, the value associated with KEY_RPUT_VALIGN may be TEXT_VALIGN_BOTTOM, TEXT_VALIGN_BASELINE, ...

    Since:
    jpicedt 1.4pre2
    Version:
    $Id: PsBox.java,v 1.3.2.1 2007/09/02 11:56:12 reynal Exp $
    Author:
    Sylvain Reynal
    • Field Detail

      • RECTANGLE_BOX

        public static final java.lang.String RECTANGLE_BOX
        expects a \\psframebox macro
        See Also:
        Constant Field Values
      • CIRCLE_BOX

        public static final java.lang.String CIRCLE_BOX
        expects a \\pscirclebox macro
        See Also:
        Constant Field Values
      • OVAL_BOX

        public static final java.lang.String OVAL_BOX
        expects a \\psovalbox macro
        See Also:
        Constant Field Values
    • Constructor Detail

      • PsBox

        public PsBox​(Pool pl,
                     java.lang.String type)
        Parameters:
        type - RECTANGLE_BOX, CIRCLE_BOX or OVAL_BOX depending on the expected box type.
    • Method Detail

      • action

        public void action​(ParserEvent e)
        Description copied from class: AbstractRegularExpression
        Called in the course of the interpret operation at the end of a SUCCESSFUL interpret operation. Should be overriden by daughter classes to process proper action, e.g. set Element's attributes... Current implementation does nothing, but sending a debugging string.
        Overrides:
        action in class AbstractRegularExpression