Class StyleConstants

  • All Implemented Interfaces:
    PicObjectConstants

    public class StyleConstants
    extends java.lang.Object
    implements PicObjectConstants
    Utility class to get or set attributes in a type-safe manner
    Since:
    jpicedt 1.3.2
    Version:
    $Id: StyleConstants.java,v 1.11.2.1 2007/09/02 11:56:27 reynal Exp $
    Author:
    Sylvain Reynal
    See Also:
    PicObjectConstants
    • Constructor Detail

      • StyleConstants

        public StyleConstants()
    • Method Detail

      • getLineStyle

        public static java.lang.String getLineStyle​(PicAttributeSet set)
        Return the line style
      • setLineStyle

        public static void setLineStyle​(PicAttributeSet set,
                                        java.lang.String style)
        set the line style
      • getLineColor

        public static java.awt.Color getLineColor​(PicAttributeSet set)
        Return the stroke color
      • setLineColor

        public static void setLineColor​(PicAttributeSet set,
                                        java.awt.Color c)
        set the stroke color
      • getLineWidth

        public static double getLineWidth​(PicAttributeSet set)
        Return the line width, guaranteed to be positive.
      • setLineWidth

        public static void setLineWidth​(PicAttributeSet set,
                                        double width)
        set the line width
      • getDashTransparent

        public static double getDashTransparent​(PicAttributeSet set)
        Return the transparent dash length , guaranteed to be positive.
      • setDashTransparent

        public static void setDashTransparent​(PicAttributeSet set,
                                              double d)
        set the transparent dash length
      • getDashOpaque

        public static double getDashOpaque​(PicAttributeSet set)
        Return the opaque dash length , guaranteed to be positive.
      • setDashOpaque

        public static void setDashOpaque​(PicAttributeSet set,
                                         double d)
        set the opaque dash length
      • getDotSep

        public static double getDotSep​(PicAttributeSet set)
        Return the dot separation, guaranteed to be positive.
      • setDotSep

        public static void setDotSep​(PicAttributeSet set,
                                     double d)
        set the dot separation
      • isDoubleLine

        public static boolean isDoubleLine​(PicAttributeSet set)
        Return whether double-line is on or off
      • setDoubleLine

        public static void setDoubleLine​(PicAttributeSet set,
                                         boolean b)
        set whether double-line is on or off
      • getDoubleLineSep

        public static double getDoubleLineSep​(PicAttributeSet set)
        Return the DoubleLine separation, guaranteed to be positive.
      • setDoubleLineSep

        public static void setDoubleLineSep​(PicAttributeSet set,
                                            double d)
        set the DoubleLine separation
      • getDoubleLineColor

        public static java.awt.Color getDoubleLineColor​(PicAttributeSet set)
        Return the double-line colour
      • setDoubleLineColor

        public static void setDoubleLineColor​(PicAttributeSet set,
                                              java.awt.Color c)
        Return the double-line colour
      • isOverStrike

        public static boolean isOverStrike​(PicAttributeSet set)
        Return whether overstrike is on or off
      • setOverStrike

        public static void setOverStrike​(PicAttributeSet set,
                                         boolean b)
        set whether overstrike is on or off
      • getOverStrikeWidth

        public static double getOverStrikeWidth​(PicAttributeSet set)
        Return the overstrike width, guaranteed to be positive.
      • setOverStrikeWidth

        public static void setOverStrikeWidth​(PicAttributeSet set,
                                              double width)
        set the overstrike width
      • getOverStrikeColor

        public static java.awt.Color getOverStrikeColor​(PicAttributeSet set)
        Return the border color
      • setOverStrikeColor

        public static void setOverStrikeColor​(PicAttributeSet set,
                                              java.awt.Color c)
        set the border color
      • isShadow

        public static boolean isShadow​(PicAttributeSet set)
        Return whether shadow is on or off
      • setShadow

        public static void setShadow​(PicAttributeSet set,
                                     boolean b)
        set whether shadow is on or off
      • getShadowSize

        public static double getShadowSize​(PicAttributeSet set)
        Return the shadow size , guaranteed to be positive.
      • setShadowSize

        public static void setShadowSize​(PicAttributeSet set,
                                         double d)
        set the ShadowSize
      • getShadowAngle

        public static double getShadowAngle​(PicAttributeSet set)
        Return the shadow angle, guaranteed to lie b/w -180 and 180
      • setShadowAngle

        public static void setShadowAngle​(PicAttributeSet set,
                                          double d)
        set the shadow angle
      • getShadowColor

        public static java.awt.Color getShadowColor​(PicAttributeSet set)
        Return the shadow colour
      • setShadowColor

        public static void setShadowColor​(PicAttributeSet set,
                                          java.awt.Color c)
        set the shadow colour
      • getDimen

        public static java.lang.String getDimen​(PicAttributeSet set)
        Return a String (OUTER, MIDDLE or INNER) indicating whether the dimensions of boxes, circles,... refer to the inside, outside or middle of the boundary.
      • setDimen

        public static void setDimen​(PicAttributeSet set,
                                    java.lang.String style)
        set the "dimen" parameter to OUTER, MIDDLE or INNER.
      • getFillStyle

        public static java.lang.String getFillStyle​(PicAttributeSet set)
        Return the fill style
      • setFillStyle

        public static void setFillStyle​(PicAttributeSet set,
                                        java.lang.String style)
        set the fill style to NONE, SOLID, HLINES, ...
      • getFillColor

        public static java.awt.Color getFillColor​(PicAttributeSet set)
        Return the fill colour
      • setFillColor

        public static void setFillColor​(PicAttributeSet set,
                                        java.awt.Color c)
        set the fill colour
      • getHatchWidth

        public static double getHatchWidth​(PicAttributeSet set)
        Return the hatch width, guaranteed to be positive
      • setHatchWidth

        public static void setHatchWidth​(PicAttributeSet set,
                                         double d)
        set the hatch width
      • getHatchSep

        public static double getHatchSep​(PicAttributeSet set)
        Return the distance b/w hatches, guaranteed to be positive
      • setHatchSep

        public static void setHatchSep​(PicAttributeSet set,
                                       double d)
        set the distance b/w hatches
      • getHatchColor

        public static java.awt.Color getHatchColor​(PicAttributeSet set)
        Return the hatch colour
      • setHatchColor

        public static void setHatchColor​(PicAttributeSet set,
                                         java.awt.Color c)
        set the hatch colour
      • getHatchAngle

        public static double getHatchAngle​(PicAttributeSet set)
        Return the hatch angle, guaranteed to be b/w -90 and 90.
      • setHatchAngle

        public static void setHatchAngle​(PicAttributeSet set,
                                         double d)
        set the hatch angle
      • setLeftArrow

        public static void setLeftArrow​(PicAttributeSet set,
                                        Arrow a)
        set the left arrow
      • setRightArrow

        public static void setRightArrow​(PicAttributeSet set,
                                         Arrow a)
        set the right arrow
      • getArrowGlobalScaleWidth

        public static double getArrowGlobalScaleWidth​(PicAttributeSet set)
        Returns the scale-factor for the arrow width
      • setArrowGlobalScaleWidth

        public static void setArrowGlobalScaleWidth​(PicAttributeSet set,
                                                    double d)
        Sets the scale-factor for the arrow width
      • getArrowGlobalScaleLength

        public static double getArrowGlobalScaleLength​(PicAttributeSet set)
        Returns the scale-factor for the arrow length
      • setArrowGlobalScaleLength

        public static void setArrowGlobalScaleLength​(PicAttributeSet set,
                                                     double d)
        Sets the scale-factor for the arrow length
      • getArrowWidthLineWidthScale

        public static double getArrowWidthLineWidthScale​(PicAttributeSet set)
        Returns the linewidth scale-factor for the arrow width (width = line-width-scale * line-width + minimum_size)
      • setArrowWidthLineWidthScale

        public static void setArrowWidthLineWidthScale​(PicAttributeSet set,
                                                       double d)
        Sets the the linewidth scale-factor for the arrow width (width = line-width-scale * line-width + minimum_size)
      • getArrowWidthMinimumMm

        public static double getArrowWidthMinimumMm​(PicAttributeSet set)
        Returns the relative size for arrows (width = linewidth-scale * line-width + minimum_size)
      • setArrowWidthMinimumMm

        public static void setArrowWidthMinimumMm​(PicAttributeSet set,
                                                  double d)
        Sets the relative-size for arrows (width = linewidth-scale * line-width + minimum_size)
      • getArrowLengthScale

        public static double getArrowLengthScale​(PicAttributeSet set)
        Returns the arrow length scale-factor (actual length (or height) = actual width * ARROW_LENGTH)
      • setArrowLengthScale

        public static void setArrowLengthScale​(PicAttributeSet set,
                                               double d)
        Sets the arrow length scale-factor (actual length (or height) = actual width * ARROW_LENGTH)
      • getArrowInsetScale

        public static double getArrowInsetScale​(PicAttributeSet set)
        Returns the arrow inset scale-factor (actual inset = ARROW_INSET * actual length)
      • setArrowInsetScale

        public static void setArrowInsetScale​(PicAttributeSet set,
                                              double d)
        Sets the arrow inset scale-factor (actual inset = ARROW_INSET * actual length)
      • getTBarWidthLineWidthScale

        public static double getTBarWidthLineWidthScale​(PicAttributeSet set)
        Returns the linewidth-scale for T-bars (width = linewidth-scale * line-width + relative_width)
      • setTBarWidthLineWidthScale

        public static void setTBarWidthLineWidthScale​(PicAttributeSet set,
                                                      double d)
        Sets the linewidth-scale for T-bars (width = linewidth-scale * line-width + relative_width)
      • getTBarWidthMinimumMm

        public static double getTBarWidthMinimumMm​(PicAttributeSet set)
        Returns the relative-width for T-bars (width = linewidth-scale * line-width + relative_width)
      • setTBarWidthMinimumMm

        public static void setTBarWidthMinimumMm​(PicAttributeSet set,
                                                 double d)
        Sets the relative-width for T-bars (width = linewidth-scale * line-width + relative_width)
      • getBracketLengthScale

        public static double getBracketLengthScale​(PicAttributeSet set)
        Returns the bracket length scale-factor (actual length (or height) = actual width * BRACKET_LENGTH)
      • setBracketLengthScale

        public static void setBracketLengthScale​(PicAttributeSet set,
                                                 double d)
        Sets the bracket length scale-factor (actual length (or height) = actual width * BRACKET_LENGTH)
      • getRoundedBracketLengthScale

        public static double getRoundedBracketLengthScale​(PicAttributeSet set)
        Returns the rounded-bracket length scale-factor (actual length (or height) = actual width * BRACKET_LENGTH)
      • setRoundedBracketLengthScale

        public static void setRoundedBracketLengthScale​(PicAttributeSet set,
                                                        double d)
        Sets the rounded-bracket length scale-factor (actual length (or height) = actual width * BRACKET_LENGTH)
      • getPstCustom

        public static java.lang.String getPstCustom​(PicAttributeSet set)
        Return the pst custom parameters
      • setPstCustom

        public static void setPstCustom​(PicAttributeSet set,
                                        java.lang.String s)
        set pst custom parameters
      • getPolydotsStyle

        public static java.lang.String getPolydotsStyle​(PicAttributeSet set)
        Returns the style of polygon dots
        Returns:
        POLYDOTS_DISK, POLYDOTS_CIRCLE, POLYDOTS_PLUS, POLYDOTS_TRIANGLE, POLYDOTS_TRIANGLE_FILLED, POLYDOTS_SQUARE, POLYDOTS_SQUARE_FILLED, POLYDOTS_PENTAGON, or POLYDOTS_PENTAGON_FILLED.
      • setPolydotsStyle

        public static void setPolydotsStyle​(PicAttributeSet set,
                                            java.lang.String s)
        Sets the style of polygon dots
      • isPolydotsSuperimposed

        public static boolean isPolydotsSuperimposed​(PicAttributeSet set)
        Returns true if dots superimpose on underlying curve
      • setPolydotsSuperimposed

        public static void setPolydotsSuperimposed​(PicAttributeSet set,
                                                   boolean b)
        Sets whether dots superimpose on underlying curve or not
      • getPolydotsHorizontalScale

        public static double getPolydotsHorizontalScale​(PicAttributeSet set)
        Returns the factor by which dots are to be scaled horizontally
      • setPolydotsHorizontalScale

        public static void setPolydotsHorizontalScale​(PicAttributeSet set,
                                                      double d)
        Sets the factor by which dots are to be scaled horizontally
      • getPolydotsVerticalScale

        public static double getPolydotsVerticalScale​(PicAttributeSet set)
        Returns the factor by which dots are to be scaled vertically
      • setPolydotsVerticalScale

        public static void setPolydotsVerticalScale​(PicAttributeSet set,
                                                    double d)
        Sets the factor by which dots are to be scaled vertically
      • getPolydotsAngle

        public static double getPolydotsAngle​(PicAttributeSet set)
        Returns the factor by which dots are to be rotated (in degrees and CCW)
      • setPolydotsAngle

        public static void setPolydotsAngle​(PicAttributeSet set,
                                            double d)
        Sets the factor by which dots are to be rotated (in degrees and CCW)