http://www.jpicedt.org

jpicedt.format.output.pstricks
Class PstricksUtilities

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

public class PstricksUtilities
extends Object

Collection of static methods for the PsTricks format

Since:
jPicEdt 1.3.1
Version:
$Id: PstricksUtilities.java,v 1.12 2013/03/27 07:09:00 vincentb1 Exp $
Author:
Sylvain Reynal

Constructor Summary
PstricksUtilities()
           
 
Method Summary
static StyleConstants.ArrowStyle[] 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, PstricksFormatter factory)
          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(StyleConstants.ArrowStyle arrow, ArrowView.Direction dir)
           
 
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,
                                          PstricksFormatter factory)
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(StyleConstants.ArrowStyle arrow,
                                      ArrowView.Direction dir)

createPstricksStringFromArrows

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

createArrowsFromPstricksString

public static StyleConstants.ArrowStyle[] 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


http://www.jpicedt.org

Submit a bug : syd@jpicedt.org