Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jpicedt.format.output.pstricks
Class PstricksUtilities

    java.lang.Object
      jpicedt.format.output.pstricks.PstricksUtilities

All Implemented Interfaces:
  PicObjectConstants, PstricksConstants

public class PstricksUtilities
extends Object
implements PstricksConstants, PicObjectConstants

Collection of static methods for the PsTricks format

Since:
  jPicEdt 1.3.1
Version:
  $Id: PstricksUtilities.java,v 1.6.2.1 2007/09/02 11:55:14 reynal Exp $
Author:
  Sylvain Reynal

Field Summary

Fields inherited from interface jpicedt.format.output.pstricks.PstricksConstants
`CR_LF, DEFAULT_FILE_WRAPPER_EPILOG, DEFAULT_FILE_WRAPPER_PROLOG, KEY_FILE_WRAPPER_EPILOG, KEY_FILE_WRAPPER_PROLOG, PST_ARROWS, PST_ARROWS_LEFT, PST_ARROWS_RIGHT, PST_COLORNAMES, PST_COLORS, RESCALING_TEX_FUNCTION`

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`

Constructor Summary
`PstricksUtilities()`

Method Summary
`static Arrow[]` | `createArrowsFromPstricksString(String str)`
`static StringBuffer` | `createPstricksStringFromArrows(Element obj)`
`static Color` | `getPsTricksColor(String name)` Returns a Color object corresponding to the given PsTricks's colour name ; a null Color if none matches (in which case the caller might look up a table of user-defined colours to see if one matches)
`static String` | `getPsTricksColorName(Color c)` Returns PsTricks's colour name from the given Color object; a null String if none matches (in which case the caller might define a new colour by using a \\newrgbcolor or a \\newgray command...)
`static void` | `main(String[] arg)` Test
`static String` | `toPstricksString(Arrow arrow, boolean rightArrow)` Returns a String representing the given Arrow in the PsTricks syntax, e.g.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PstricksUtilities

    public PstricksUtilities()

Method Detail

### getPsTricksColorName

    public static String getPsTricksColorName(Color c)

  Returns PsTricks's colour name from the given Color object; a null String if none matches (in which case the caller might define a new colour by using a \\newrgbcolor or a \\newgray command...)

### getPsTricksColor

    public static Color getPsTricksColor(String name)

  Returns a Color object corresponding to the given PsTricks's colour name ; a null Color if none matches (in which case the caller might look up a table of user-defined colours to see if one matches)

### toPstricksString

    public static String toPstricksString(Arrow arrow,
                                          boolean rightArrow)

  Returns a String representing the given Arrow in the PsTricks syntax, e.g. ">" or "(" (or "" for NONE)

  Parameters:
    `rightArrow` - if TRUE, returns the String representation of this Arrow if it's a right-arrow ; otherwise, returns the left-arrow string.

### createPstricksStringFromArrows

    public static StringBuffer createPstricksStringFromArrows(Element obj)

  Returns:
    PsTricks's arrow string for the given Element (e.g. "{<->}") with parenthesis included.

### createArrowsFromPstricksString

    public static Arrow[] createArrowsFromPstricksString(String str)

  Returns:
    an array containing two Arrows corresponding to the given PsTricks string (e.g. "-" or "<-" or ">>->" ...), left arrow first.

### main

    public static void main(String[] arg)

  Test

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://www.jpicedt.org
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug : syd@jpicedt.org