java.lang.Object
jpicedt.graphic.model.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-beta6
Fields inherited from interface jpicedt.graphic.model.PicObjectConstants |
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, MaxAttributeNameIndex, MIDDLE, NONE, OUTER, POLYGON_DOTS, POLYGON_SOLID, POLYGON_STYLE, PS_POINT, RIGHT_ARROW, SHADOW, SHADOW_ANGLE, SHADOW_COLOR, SHADOW_SIZE, SOLID, VLINES, VLINES_FILLED |
Method Summary |
private static boolean |
getBooleanAttribute(PicAttributeSet set,
PicAttributeName name)
|
private static java.awt.Color |
getColorAttribute(PicAttributeSet set,
PicAttributeName name)
|
static double |
getDashOpaque(PicAttributeSet set)
|
static double |
getDashTransparent(PicAttributeSet set)
|
static java.lang.String |
getDimen(PicAttributeSet set)
|
static double |
getDotSep(PicAttributeSet set)
|
private static double |
getDoubleAttribute(PicAttributeSet set,
PicAttributeName name)
|
static java.awt.Color |
getDoubleLineColor(PicAttributeSet set)
|
static double |
getDoubleLineSep(PicAttributeSet set)
|
static java.awt.Color |
getFillColor(PicAttributeSet set)
|
static java.lang.String |
getFillStyle(PicAttributeSet set)
|
static double |
getHatchAngle(PicAttributeSet set)
|
static java.awt.Color |
getHatchColor(PicAttributeSet set)
|
static double |
getHatchSep(PicAttributeSet set)
|
static double |
getHatchWidth(PicAttributeSet set)
|
static Arrow |
getLeftArrow(PicAttributeSet set)
|
static java.awt.Color |
getLineColor(PicAttributeSet set)
|
static java.lang.String |
getLineStyle(PicAttributeSet set)
|
static double |
getLineWidth(PicAttributeSet set)
|
static Arrow |
getRightArrow(PicAttributeSet set)
|
static double |
getShadowAngle(PicAttributeSet set)
|
static java.awt.Color |
getShadowColor(PicAttributeSet set)
|
static double |
getShadowSize(PicAttributeSet set)
|
private static java.lang.String |
getStringAttribute(PicAttributeSet set,
PicAttributeName name)
|
static boolean |
isDoubleLine(PicAttributeSet set)
|
static boolean |
isShadow(PicAttributeSet set)
|
static void |
setDashOpaque(PicAttributeSet set,
double d)
set the opaque dash length |
static void |
setDashTransparent(PicAttributeSet set,
double d)
set the transparent dash length |
static void |
setDimen(PicAttributeSet set,
java.lang.String style)
set the "dimen" parameter to OUTER, MIDDLE or INNER. |
static void |
setDotSep(PicAttributeSet set,
double d)
set the dot separation |
static void |
setDoubleLine(PicAttributeSet set,
boolean b)
set whether double-line is on or off |
static void |
setDoubleLineColor(PicAttributeSet set,
java.awt.Color c)
|
static void |
setDoubleLineSep(PicAttributeSet set,
double d)
set the DoubleLine separation |
static void |
setFillColor(PicAttributeSet set,
java.awt.Color c)
set the fill colour |
static void |
setFillStyle(PicAttributeSet set,
java.lang.String style)
set the fill style to NONE, SOLID, HLINES, ... |
static void |
setHatchAngle(PicAttributeSet set,
double d)
set the hatch angle |
static void |
setHatchColor(PicAttributeSet set,
java.awt.Color c)
set the hatch colour |
static void |
setHatchSep(PicAttributeSet set,
double d)
set the distance b/w hatches |
static void |
setHatchWidth(PicAttributeSet set,
double d)
set the hatch width |
static void |
setLeftArrow(PicAttributeSet set,
Arrow a)
set the left arrow |
static void |
setLineColor(PicAttributeSet set,
java.awt.Color c)
set the stroke color |
static void |
setLineStyle(PicAttributeSet set,
java.lang.String style)
set the line style |
static void |
setLineWidth(PicAttributeSet set,
double width)
set the line width |
static void |
setRightArrow(PicAttributeSet set,
Arrow a)
set the right arrow |
static void |
setShadow(PicAttributeSet set,
boolean b)
set whether shadow is on or off |
static void |
setShadowAngle(PicAttributeSet set,
double d)
set the shadow angle |
static void |
setShadowColor(PicAttributeSet set,
java.awt.Color c)
set the shadow colour |
static void |
setShadowSize(PicAttributeSet set,
double d)
set the ShadowSize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StyleConstants
public StyleConstants()
getLineStyle
public static java.lang.String getLineStyle(PicAttributeSet set)
setLineStyle
public static void setLineStyle(PicAttributeSet set,
java.lang.String style)
- set the line style
getLineColor
public static java.awt.Color getLineColor(PicAttributeSet set)
setLineColor
public static void setLineColor(PicAttributeSet set,
java.awt.Color c)
- set the stroke color
getLineWidth
public static double getLineWidth(PicAttributeSet set)
setLineWidth
public static void setLineWidth(PicAttributeSet set,
double width)
- set the line width
getDashTransparent
public static double getDashTransparent(PicAttributeSet set)
setDashTransparent
public static void setDashTransparent(PicAttributeSet set,
double d)
- set the transparent dash length
getDashOpaque
public static double getDashOpaque(PicAttributeSet set)
setDashOpaque
public static void setDashOpaque(PicAttributeSet set,
double d)
- set the opaque dash length
getDotSep
public static double getDotSep(PicAttributeSet set)
setDotSep
public static void setDotSep(PicAttributeSet set,
double d)
- set the dot separation
isDoubleLine
public static boolean isDoubleLine(PicAttributeSet set)
setDoubleLine
public static void setDoubleLine(PicAttributeSet set,
boolean b)
- set whether double-line is on or off
getDoubleLineSep
public static double getDoubleLineSep(PicAttributeSet set)
setDoubleLineSep
public static void setDoubleLineSep(PicAttributeSet set,
double d)
- set the DoubleLine separation
getDoubleLineColor
public static java.awt.Color getDoubleLineColor(PicAttributeSet set)
setDoubleLineColor
public static void setDoubleLineColor(PicAttributeSet set,
java.awt.Color c)
isShadow
public static boolean isShadow(PicAttributeSet set)
setShadow
public static void setShadow(PicAttributeSet set,
boolean b)
- set whether shadow is on or off
getShadowSize
public static double getShadowSize(PicAttributeSet set)
setShadowSize
public static void setShadowSize(PicAttributeSet set,
double d)
- set the ShadowSize
getShadowAngle
public static double getShadowAngle(PicAttributeSet set)
setShadowAngle
public static void setShadowAngle(PicAttributeSet set,
double d)
- set the shadow angle
getShadowColor
public static java.awt.Color getShadowColor(PicAttributeSet set)
setShadowColor
public static void setShadowColor(PicAttributeSet set,
java.awt.Color c)
- set the shadow colour
getDimen
public static java.lang.String getDimen(PicAttributeSet set)
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)
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)
setFillColor
public static void setFillColor(PicAttributeSet set,
java.awt.Color c)
- set the fill colour
getHatchWidth
public static double getHatchWidth(PicAttributeSet set)
setHatchWidth
public static void setHatchWidth(PicAttributeSet set,
double d)
- set the hatch width
getHatchSep
public static double getHatchSep(PicAttributeSet set)
setHatchSep
public static void setHatchSep(PicAttributeSet set,
double d)
- set the distance b/w hatches
getHatchColor
public static java.awt.Color getHatchColor(PicAttributeSet set)
setHatchColor
public static void setHatchColor(PicAttributeSet set,
java.awt.Color c)
- set the hatch colour
getHatchAngle
public static double getHatchAngle(PicAttributeSet set)
setHatchAngle
public static void setHatchAngle(PicAttributeSet set,
double d)
- set the hatch angle
getLeftArrow
public static Arrow getLeftArrow(PicAttributeSet set)
setLeftArrow
public static void setLeftArrow(PicAttributeSet set,
Arrow a)
- set the left arrow
getRightArrow
public static Arrow getRightArrow(PicAttributeSet set)
setRightArrow
public static void setRightArrow(PicAttributeSet set,
Arrow a)
- set the right arrow
getDoubleAttribute
private static double getDoubleAttribute(PicAttributeSet set,
PicAttributeName name)
getBooleanAttribute
private static boolean getBooleanAttribute(PicAttributeSet set,
PicAttributeName name)
getColorAttribute
private static java.awt.Color getColorAttribute(PicAttributeSet set,
PicAttributeName name)
getStringAttribute
private static java.lang.String getStringAttribute(PicAttributeSet set,
PicAttributeName name)