Logo Search packages:      
Sourcecode: latexdraw version File versions  Download package

PSTricksConstants.java

package latexDraw.psTricks;

import java.awt.Color;
import java.awt.geom.Point2D;



/** 
 * This class contains several constants of pstricks<br>
 *<br>
 * This file is part of LaTeXDraw<br>
 * Copyright (c) 2005-2008 Arnaud BLOUIN<br>
 *<br>
 *  LaTeXDraw is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.<br>
 *<br>
 *  LaTeXDraw is distributed without any warranty; without even the 
 *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 *  PURPOSE.  See the GNU General Public License for more details.<br>
 *<br>
 * 06/06/06<br>
 * @author Arnaud BLOUIN<br>
 * @version 2.0.0<br>
 */
00027 public abstract class PSTricksConstants
{
    /** The size in centimetres of an inch */
00030     public static final double INCH_VAL_CM = 2.54;
    
    /** A inch is 72 postscript points */
00033     public static final double INCH_VAL_PT = 72;
    
    /** A point is INCH_VAL_PT/INCH_VAL_CM postscript points */
00036     public static final double CM_VAL_PT = INCH_VAL_PT/INCH_VAL_CM;
    
    /** For psaxes, the Ox value by default. */
00039       public static final int DEFAULT_OX = 0;
      
      /** For psaxes, the Oy value by default. */
00042       public static final int DEFAULT_OY = 0;
      
      /** For psaxes, the dx value by default. */
00045       public static final int DEFAULT_DX = 1;
      
      /** For psaxes, the dy value by default. */
00048       public static final int DEFAULT_DY = 1;
      
      /** The distance between each X label in cm (Dx). */
00051       public static final double DEFAULT_DIST_X_LABEL = 0./CM_VAL_PT;
      
      /** The distance between each Y label in cm (Dy). */
00054       public static final double DEFAULT_DIST_Y_LABEL = 0./CM_VAL_PT;
      
      /** For psaxes, the showorigin value by default. */
00057       public static final boolean DEFAULT_SHOW_ORIGIN = true;
      
      /** The default size of the ticks in cm. */
00060       public static final double DEFAULT_TICKS_SIZE = 3./CM_VAL_PT;
      
      /** The text to display when all the labels must be displayed. */
00063       public static final String TOKEN_LABELS_DISPLAYED_ALL       = "all"; //$NON-NLS-1$
      
      /** The text to display when only the X labels must be displayed. */
00066       public static final String TOKEN_LABELS_DISPLAYED_X   = "x"; //$NON-NLS-1$
      
      /** The text to display when only the Y labels must be displayed. */
00069       public static final String TOKEN_LABELS_DISPLAYED_Y   = "y";//$NON-NLS-1$
      
      /** The text to display when no labels must be displayed. */
00072       public static final String TOKEN_LABELS_DISPLAYED_NON       = "none";//$NON-NLS-1$
      
      /** The token when the ticks must be fully shown. */
00075       public static final String TOKEN_TICKS_STYLE_FULL     = "full";//$NON-NLS-1$
      
      /** The token when the ticks only the top of them must be shown. */
00078       public static final String TOKEN_TICKS_STYLE_TOP      = "top";//$NON-NLS-1$
      
      /** The token when the ticks only the bottom of them must be shown. */
00081       public static final String TOKEN_TICKS_STYLE_BOTTOM = "bottom";//$NON-NLS-1$
      
      /** The text to display when the axes have the axes shape. */
00084       public static final String TOKEN_AXES_STYLE_AXES      = "axes";//$NON-NLS-1$
      
      /** The text to display when the axes have the frame shape. */
00087       public static final String TOKEN_AXES_STYLE_FRAME     = "frame";//$NON-NLS-1$
      
      /** The text to display when the axes must not be shown. */
00090       public static final String TOKEN_AXES_STYLE_NONE      = "none";//$NON-NLS-1$
      
      public static final String DEFAULT_AXES_STYLE = TOKEN_AXES_STYLE_AXES;
      
      public static final String DEFAULT_TICKS_STYLE = TOKEN_TICKS_STYLE_FULL;
      
      public static final String DEFAULT_LABELS_DISPLAYED = TOKEN_LABELS_DISPLAYED_ALL;
      
      public static final String DEFAULT_TICKS_DISPLAYED = TOKEN_LABELS_DISPLAYED_ALL;
      
      /** The first colour of a gradient by default. */
00101       public static final Color DEFAULT_GRADIENT_START_COLOR = new Color(0, (int)(.1*255), (int)(.95*255));
      
      /** The second color of a gradient by default. */
00104       public static final Color DEFAULT_GRADIENT_END_COLOR   = new Color(0, 255, 255);
      
      /** The position of the midpoint, as a fraction of the distance from
            top to bottom. Should be between 0 and 1. */
00108       public static final double DEFAULT_GRADIENT_MID_POINT = .9;
      
      /** The number of lines. More lines means finer gradation. */
00111       public static final int DEFAULT_GRADIENT_LINES = 500;
      
      /** The angle of the gradient in degree. */
00114       public static final double DEFAULT_GRADIENT_ANGLE = 0;
      
      /** The value by default of a missing coordinate : (5,) */
00117       public static final int DEFAULT_VALUE_MISSING_COORDINATE = 1;
      
      public static final String TOKEN_PUT_ANGLE_0   = "U";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_90  = "L";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_180 = "D";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_270 = "R";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_0_STAR     = "N";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_90_STAR    = "W";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_180_STAR   = "S";//$NON-NLS-1$
      public static final String TOKEN_PUT_ANGLE_270_STAR   = "E";//$NON-NLS-1$
      
      public static final char TOKEN_RPUT_TOP   = 't';
      public static final char TOKEN_RPUT_BOTTOM      = 'b';
      public static final char TOKEN_RPUT_BASE  = 'B';
      public static final char TOKEN_RPUT_LEFT  = 'l';
      public static final char TOKEN_RPUT_RIGHT       = 'r';
      
      public static final char TOKEN_UPUT_DOWN  = 'd';
      public static final char TOKEN_UPUT_UP          = 'u';
      public static final char TOKEN_UPUT_RIGHT       = 'r';
      public static final char TOKEN_UPUT_LEFT  = 'l';
      
      public static final double DEFAULT_UPUT_DOWN_ANGLE    = 270;
      public static final double DEFAULT_UPUT_UP_ANGLE      =  90;
      public static final double DEFAULT_UPUT_RIGHT_ANGLE =   0;
      public static final double DEFAULT_UPUT_LEFT_ANGLE    = 180;
      public static final double DEFAULT_UPUT_DOWN_LEFT_ANGLE     = 225;
      public static final double DEFAULT_UPUT_UP_LEFT_ANGLE             = 135;
      public static final double DEFAULT_UPUT_DOWN_RIGHT_ANGLE    = 315;
      public static final double DEFAULT_UPUT_UP_RIGHT_ANGLE            =  45;
      
      public static final String COMMAND_TEXT_LARGE = "\\large ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_TINY     = "\\tiny ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_SCRIPT   = "\\scriptsize ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_FOOTNOTE = "\\footnotesize ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_SMALL  = "\\small ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_NORMAL = "\\normalsize ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_LARGE1 = "\\large ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_LARGE2 = "\\Large ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_LARGE3 =  "\\LARGE ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_HUGE1 =  "\\huge ";//$NON-NLS-1$
      
      public static final String COMMAND_TEXT_HUGE2 =  "\\Huge ";//$NON-NLS-1$
      
      
      /** gangle is the angle of rotation of a diamond and a triangle
       * around their centre. */
00173       public static final double DEFAULT_GANGLE = 0;
      
      public static final String TOKEN_COLOR_TYPE_NAMED = "named"; //$NON-NLS-1$
      
      public static final String TOKEN_COLOR_TYPE_CMYK = "cmyk"; //$NON-NLS-1$
      
      public static final String TOKEN_COLOR_TYPE_HSB = "hsb"; //$NON-NLS-1$
      
      public static final String TOKEN_COLOR_TYPE_GRAY = "gray"; //$NON-NLS-1$
      
      public static final String TOKEN_COLOR_TYPE_RGB = "rgb"; //$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = none */
00186       public static final String TOKEN_FILL_NONE = "none";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = gradient */
00189       public static final String TOKEN_FILL_GRADIENT = "gradient";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = solid */
00192       public static final String TOKEN_FILL_SOLID = "solid";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = vlines */
00195       public static final String TOKEN_FILL_VLINES = "vlines";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = vlines* */
00198       public static final String TOKEN_FILL_VLINES_F = "vlines*";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = hlines */
00201       public static final String TOKEN_FILL_HLINES = "hlines";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = hlines* */
00204       public static final String TOKEN_FILL_HLINES_F = "hlines*";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = crosshatch */
00207       public static final String TOKEN_FILL_CROSSHATCH = "crosshatch";//$NON-NLS-1$
      
      /** The token of the parameters : fillstyle = crosshatch* */
00210       public static final String TOKEN_FILL_CROSSHATCH_F = "crosshatch*";//$NON-NLS-1$
      
      /** The token of the parameters : cornersize = relative */
00213       public static final String TOKEN_RELATIVE = "relative";//$NON-NLS-1$
      
      /** The token of the parameters : cornersize = absolute */
00216       public static final String TOKEN_ABSOLUTE = "absolute";//$NON-NLS-1$
      
      /** The token of the postscript point unit of length */
00219       public static final String TOKEN_PS_PT = "pt";//$NON-NLS-1$
      
      /** The token of the unit of length : centimeter */
00222       public static final String TOKEN_CM = "cm";//$NON-NLS-1$
      
      /** The token of the unit of length : millimeter */
00225       public static final String TOKEN_MM = "mm";//$NON-NLS-1$
      
      /** The token of the unit of length : inch */
00228       public static final String TOKEN_INCH = "in";//$NON-NLS-1$
      
      /** The style which draw a o and aplus */
00231       public static final String OPLUS_STYLE      = "oplus"; //$NON-NLS-1$
      
      /** The style which draw a o and a cross */
00234       public static final String OTIMES_STYLE     = "otimes"; //$NON-NLS-1$
      
      /** The style which draw a plus */
00237       public static final String PLUS_STYLE       = "+"; //$NON-NLS-1$
      
      /** The style which draw an asterisk */
00240       public static final String ASTERISK_STYLE   = "asterisk"; //$NON-NLS-1$
      
      /** The style which draw a triangle */
00243       public static final String TRIANGLE_STYLE   = "triangle"; //$NON-NLS-1$
      
      /** The style which draw a square */
00246       public static final String SQUARE_STYLE     = "square"; //$NON-NLS-1$
      
      /** The style which draw a diamond */
00249       public static final String DIAMOND_STYLE    = "diamond"; //$NON-NLS-1$
      
      /** The style which draw a pentagon */
00252       public static final String PENTAGON_STYLE   = "pentagon"; //$NON-NLS-1$
      
      /** The style which draw a o */
00255       public static final String O_STYLE          = "o"; //$NON-NLS-1$
      
      /** The style which draw a dot */
00258       public static final String DOT_STYLE        = "dot"; //$NON-NLS-1$
      
      /** The style which draw a cross */
00261       public static final String X_STYLE          = "x"; //$NON-NLS-1$
      
      /** The style which draw a vertical bar */
00264       public static final String BAR_STYLE        = "|"; //$NON-NLS-1$
      
      /** The style which draw a full triangle */
00267       public static final String FTRIANGLE_STYLE  = "triangle*"; //$NON-NLS-1$
      
      /** The style which draw a full square */
00270       public static final String FSQUARE_STYLE    = "square*"; //$NON-NLS-1$
      
      /** The style which draw a full diamond */
00273       public static final String FDIAMOND_STYLE   = "diamond*"; //$NON-NLS-1$
      
      /** The style which draw a full pentagon */
00276       public static final String FPENTAGON_STYLE  = "pentagon*"; //$NON-NLS-1$
      
      /** Is the special coor activated by default */
00279       public static final boolean DEFAULT_SPECIAL_COOR = false;
      
      /** Is the unit of length is rad by default */
00282       public static final boolean DEFAULT_ON_RADIANS = false;
      
      /** The angle in degrees by default */
00285       public static final double DEFAULT_DEGREES = 360;
      
      /** The width of the line by default (in cm) */
00288       public static final double DEFAULT_LINE_WIDTH = 0.8/CM_VAL_PT;
      
      /** Is points are displayed by default */
00291       public static final boolean DEFAULT_SHOW_POINTS = false;
      
      /** The radius of arcs drawn at the corner of lines by default (in pt) **/
00294       public static final double DEFAULT_LINE_ARC = 0;
      
      /** The radius of rounded corners by default (between 0 and 1)<br>
       *  The radius is compute with :<br>
       *  radius = min(width, height)*1.5*frameArc **/
00299       public static final double DEFAULT_FRAME_ARC = 0;
      
      /** Is the corner size relative by default (if not, it's absolute)<br>
       * If cornersize is relative, then the framearc parameter determines
       * the radius of the rounded corners for \psframe. If
       * cornersize is absolute, then the linearc parameter determines the
       * radius of the rounded corners for \psframe.*/
00306       public static final boolean DEFAULT_CORNER_SIZE_RELATIVE = true;
      
      /** The value of arcsepA by default (in pt)*/
00309       public static final double DEFAULT_ARC_SEP_A = 0;
      
      /** The value of arcsepB by default (in pt)*/
00312       public static final double DEFAULT_ARC_SEP_B = 0;
      
      public static final double DEFAULT_ARC_SEP = 0;
      
      /** The curvature parameters control the curvature of a parabola */
00317       public static final double DEFAULT_CURVATURE_NUM1 = 1;
      
      /** The curvature parameters control the curvature of a parabola */
00320       public static final double DEFAULT_CRUVATURE_NUM2 = 0.1;
      
      /** The curvature parameters control the curvature of a parabola */
00323       public static final double DEFAULT_CRUVATURE_NUM3 = 0;
      
      /** The type of the dot by default */
00326       public static final String DEFAULT_DOT_STYLE = DOT_STYLE;
      
      /** The scale of the dot by default */
00329       public static final double DEFAULT_DOT_SCALE1 = 1;
      
      /** The scale of the dot by default */
00332       public static final double DEFAULT_DOT_SCALE2 = 1;
      
      /** The angle of the dot by default */
00335       public static final double DEFAULT_DOT_ANGLE = 0;
      
      /** The width of the main lines of the grid by default in cm */
00338       public static final double DEFAULT_GRID_WIDTH = 0.8/CM_VAL_PT;
      
      /** The size of the labels of a grid by default */
00341       public static final double DEFAULT_GRID_LABEL = 10;
      
      /** The size of the sub-grid lines of a grid by default in cm */
00344       public static final double DEFAULT_SUB_GRID_WIDTH = 0.4/CM_VAL_PT;
      
      /** The colour of the sub grid by default */
00347       public static final Color DEFAULT_SUB_GRID_COLOR = Color.GRAY;
      
      /** The dimensions of the figure are with reference to the inner boundary. */
00350       public static final String BORDERS_INSIDE = "outer"; //$NON-NLS-1$

      /** The dimensions of the figure are with reference to the outter boundary. */
00353       public static final String BORDERS_OUTSIDE = "inner"; //$NON-NLS-1$

      /** The dimensions of the figure are with reference to the middle boundary. */
00356       public static final String BORDERS_MIDDLE = "middle"; //$NON-NLS-1$
      
      /** The position of the borders by default */
00359       public static final String DEFAULT_BORDERS_POS = BORDERS_INSIDE;
      
      /** The colour of the double boundary of the figure by default */
00362       public static final Color DEFAULT_DOUBLE_COLOR = Color.WHITE;
      
      /** The colour of the hatching of the figure by default */
00365       public static final Color DEFAULT_HATCHING_COLOR = Color.BLACK;
      
      /** The colour of the interior of the figure by default */
00368       public static final Color DEFAULT_INTERIOR_COLOR = Color.WHITE;
      
      /** The colour of the borders of the figure by default */
00371       public static final Color DEFAULT_LINE_COLOR = Color.BLACK;
      
      /** The colour of the labels by default */
00374       public static final Color DEFAULT_LABELGRIDCOLOR = Color.BLACK;
      
      /** The colour of the grid by default */
00377       public static final Color DEFAULT_GRIDCOLOR = Color.BLACK;
      
      /** The number of division in a sub-grid by default */
00380       public static final int DEFAULT_SUBGRIDDIV = 5;
      
      /** The number of dots in a line of the grid by default */
00383       public static final int DEFAULT_GRIDDOTS = 0;
      
      /** The number of dots in a line of the sub-grid by default */
00386       public static final int DEFAULT_SUBGRIDDOTS = 0;
      
      /** The unit by default in cm */
00389       public static final double DEFAULT_UNIT = 1;
      
      public static final int DEFAULT_PLOT_POINTS = 50;
      
      /** The origin of the coordinate system by default */
00394       public static final Point2D.Double DEFAULT_ORIGIN = new Point2D.Double(0,0);
      
      /** Is the axes swept by default */
00397       public static final boolean DEFAULT_SWAP_AXES = false;
      
      /** The line(s) of the figure are dotted */
00400       public static final String LINE_DOTTED_STYLE = "dotted"; //$NON-NLS-1$

      /** The line(s) of the figure are dashed */
00403       public static final String LINE_DASHED_STYLE = "dashed"; //$NON-NLS-1$

      /** The line(s) of the figure have no style */
00406       public static final String LINE_NONE_STYLE = "none"; //$NON-NLS-1$
      
      /** The style of the lines by default */
00409       public static final String DEFAULT_LINE_STYLE = LINE_NONE_STYLE;
      
      /** The black-white dash pattern for the dashed line style (in cm) */
00412       public static final double DEFAULT_DASH_BLACK = 5./CM_VAL_PT;
      
      /** The black-white dash pattern for the dashed line style (in cm) */
00415       public static final double DEFAULT_DASH_WHITE = 3./CM_VAL_PT;
      
      /** The distance between dots in the dotted line style (in cm) */
00418       public static final double DEFAULT_DOT_STEP = 3./CM_VAL_PT;
      
      /** A positive value draws a border of width DEFAULT_BORDER. */
00421       public static final double DEFAULT_BORDER = 0.;
      
      /** The colour by default of the border */
00424       public static final Color DEFAULT_BORDER_COLOR = Color.WHITE;
      
      /** Is a double line by default */
00427       public static final boolean DEFAULT_DOUBLE_LINE = false;
      
      /** The width of the separation between the double lines */
00430       public static final double DEFAULT_DOUBLE_SEP = (1.25/(DEFAULT_LINE_WIDTH*CM_VAL_PT))/CM_VAL_PT;
      
      /** Is there shadow by default */
00433       public static final boolean DEFAULT_SHADOW = false;
      
      /** The size of the shadow by default in cm */
00436       public static final double DEFAULT_SHADOW_SIZE = 3/CM_VAL_PT;
      
      /** The angle of the shadow by default in degrees */
00439       public static final double DEFAULT_SHADOW_ANGLE = -45;
      
      /** The colour of the shadow by default */
00442       public static final Color DEFAULT_SHADOW_COLOR = Color.DARK_GRAY;
      
      /** The type of the fill by default */
00445       public static final String DEFAULT_FILL_STYLE = "none"; //$NON-NLS-1$
      
      /** The colour of the filling */
00448       public static final Color DEFAULT_FILL_COLOR = Color.WHITE;
      
      /** The width of the hatching in cm */
00451       public static final double DEFAULT_HATCH_WIDTH = 0.8/CM_VAL_PT;
      
      /** The separation between the lines of the hatching in cm */
00454       public static final double DEFAULT_HATCH_SEP = 4/CM_VAL_PT;
      
      /** The angle of the hatching by default */
00457       public static final double DEFAULT_HATCH_ANGLE = 45;
      
      public static final String NONEARROW_STYLE = "-"; //$NON-NLS-1$
      public static final String LARROW_STYLE    = "<"; //$NON-NLS-1$
      public static final String RARROW_STYLE    = ">"; //$NON-NLS-1$
      public static final String DLARROW_STYLE   = "<<";//$NON-NLS-1$
      public static final String DRARROW_STYLE   = ">>";//$NON-NLS-1$
      public static final String BAREND_STYLE   = "|*";//$NON-NLS-1$
      public static final String BARIN_STYLE     = "|";//$NON-NLS-1$
      public static final String LSBRACKET_STYLE = "[";//$NON-NLS-1$
      public static final String RSBRACKET_STYLE = "]";//$NON-NLS-1$
      public static final String LRBRACKET_STYLE = "(";//$NON-NLS-1$
      public static final String RRBRACKET_STYLE = ")";//$NON-NLS-1$
      public static final String CIRCLEEND_STYLE = "o";//$NON-NLS-1$
      public static final String CIRCLEIN_STYLE  = "oo";//$NON-NLS-1$
      public static final String DISKEND_STYLE   = "*";//$NON-NLS-1$
      public static final String DISKIN_STYLE    = "**";//$NON-NLS-1$
      public static final String ROUNDEND_STYLE  = "c";//$NON-NLS-1$
      public static final String ROUNDIN_STYLE   = "cc";//$NON-NLS-1$
      public static final String SQUAREEND_STYLE = "C";//$NON-NLS-1$
      
      /** The style of the arrow by default */
00479       public static final String DEFAULT_ARROW_STYLE = NONEARROW_STYLE;

      /** Width of arrowheads, in cm */
00482       public static final double DEFAULT_ARROW_SIZE_DIM = 1.5/CM_VAL_PT;
      
      /** Width of arrowheads */
00485       public static final double DEFAULT_ARROW_SIZE_NUM = 2.;     
      
      /** The length of the arrowhead by default*/
00488       public static final double DEFAULT_ARROW_LENGTH = 1.4;
      
      /** The inset of the arrowhead by default */
00491       public static final double DEFAULT_ARROW_INSET = 0.4;
      
      /** The width of a t-bar,in cm */
00494       public static final double DEFAULT_ARROW_TBARSIZE_DIM = 2/CM_VAL_PT;
      
      /** The width of a t-bar */
00497       public static final double DEFAULT_ARROW_TBARSIZE_NUM = 5;
      
      /** The height of a square bracket */
00500       public static final double DEFAULT_ARROW_BRACKET_LGTH = 0.15;

      /** The height of a round bracket */
00503       public static final double DEFAULT_ARROW_RBRACKET_LGTH = 0.15;
      
      /** The diameter of a circle in cm */
00506       public static final double DEFAULT_ARROW_DOTSIZE_DIM = 2/CM_VAL_PT;
      
      /** The diameter of a circle */
00509       public static final double DEFAULT_ARROW_DOTSIZE_NUM = 2; 
      
      /** The scale of the arrowhead */
00512       public static final double DEFAULT_ARROW_SCALE1 = 1;
      
      /** The scale of the arrowhead */
00515       public static final double DEFAULT_ARROW_SCALE2 = 1;
      
      /** The value by default of labelsep of the command uput (in cm)*/
00518       public static final double DEFAULT_LABEL_SEP = 5/CM_VAL_PT;
      
      /** Distance between each side of a frame and the enclosed box (in cm). */
00521       public static final double DEFAULT_FRAME_SEP = 3/CM_VAL_PT;
      
      /** When true, the box that is produced is the size of the frame or
            whatever that is drawn around the object. */
00525       public static final boolean DEFAULT_BOX_SEP = true;
      
      
      
      /**
       * Allows to know if the new style is valid
       * @param newStyle The style which must be checked
       * @return True if the style is valid
       */
00534       public static boolean isValidDotStyle(String newStyle)
      {
            if(newStyle==null)
                  return false;
            
            return newStyle.equals(OPLUS_STYLE) || newStyle.equals(DOT_STYLE)
                        || newStyle.equals(OTIMES_STYLE) || newStyle.equals(O_STYLE)
                        || newStyle.equals(X_STYLE)
                        || newStyle.equals(FTRIANGLE_STYLE) || newStyle.equals(FSQUARE_STYLE)
                        || newStyle.equals(FPENTAGON_STYLE) || newStyle.equals(FDIAMOND_STYLE)
                        || newStyle.equals(TRIANGLE_STYLE) || newStyle.equals(PENTAGON_STYLE)
                        || newStyle.equals(PLUS_STYLE) || newStyle.equals(SQUARE_STYLE)
                        || newStyle.equals(BAR_STYLE) || newStyle.equals(DIAMOND_STYLE)
                        || newStyle.equals(ASTERISK_STYLE);
      }
      
      
      

      /**
       * Allows to know if the kind of filling is valid or not.
       * @param style The style to check.
       * @return True is the style is valid.
       */
00558       public static boolean isValidFillStyle(String style)
      {
            if(style==null)
                  return false;
            
            return style.equals(TOKEN_FILL_NONE) || style.equals(TOKEN_FILL_HLINES)
                        || style.equals(TOKEN_FILL_HLINES_F) || style.equals(TOKEN_FILL_CROSSHATCH)
                        || style.equals(TOKEN_FILL_CROSSHATCH_F) || style.equals(TOKEN_FILL_VLINES)
                        || style.equals(TOKEN_FILL_VLINES_F) || style.equals(TOKEN_FILL_GRADIENT) || style.equals(TOKEN_FILL_SOLID);
      }

      
      
      
      /**
       * Allows to check if the style is possible
       * @param style The style to check
       * @return True if the style is valid
       */
00577       public static boolean isValidArrowStyle(String style)
      {
            if(style==null)
                  return false;
            
            if( style.equals(NONEARROW_STYLE) || style.equals(RARROW_STYLE)    || 
                  style.equals(RRBRACKET_STYLE) || style.equals(RSBRACKET_STYLE) ||
                  style.equals(LARROW_STYLE)    || style.equals(LRBRACKET_STYLE) || 
                  style.equals(LSBRACKET_STYLE) || style.equals(SQUAREEND_STYLE) || 
                  style.equals(ROUNDIN_STYLE)   || style.equals(ROUNDEND_STYLE)  || 
                  style.equals(BARIN_STYLE)     || style.equals(CIRCLEEND_STYLE) ||
                  style.equals(CIRCLEIN_STYLE)  || style.equals(DISKEND_STYLE)   ||
                  style.equals(DLARROW_STYLE)  || style.equals(DRARROW_STYLE)   ||
                  style.equals(DISKIN_STYLE)    || style.equals(BAREND_STYLE))
                  return true;
            
            return false;
      }
}

Generated by  Doxygen 1.6.0   Back to index