|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.satin.objects.Style
The interface for styles, for Screen Data Objects. Styles dictate how GraphicalObjects are drawn.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Oct 06 1998, JH Created class - SATIN-v2.1-1.0.0, Aug 11 2000, JH Touched for SATIN release
Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants |
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D |
Field Summary | |
static int |
CAP_BUTT
|
static int |
CAP_ROUND
|
static int |
CAP_SQUARE
|
static byte |
DRAW_AND
|
static byte |
DRAW_ANDINVERTED
|
static byte |
DRAW_ANDREVERSE
|
static byte |
DRAW_CLEAR
Clear out what is underneath |
static byte |
DRAW_COPY
|
static byte |
DRAW_COPYINVERTED
|
static byte |
DRAW_EQUIV
|
static byte |
DRAW_INVERT
|
static byte |
DRAW_NAND
|
static byte |
DRAW_NOOP
|
static byte |
DRAW_NOR
|
static byte |
DRAW_OR
|
static byte |
DRAW_ORINVERTED
|
static byte |
DRAW_ORREVERSE
|
static byte |
DRAW_SET
|
static byte |
DRAW_XOR
|
static int |
JOIN_BEVEL
|
static int |
JOIN_MITER
|
static int |
JOIN_ROUND
|
static byte |
TRANSPARENT
|
Constructor Summary | |
Style()
Create a Style with default parameters. |
|
Style(Properties props)
|
|
Style(String strFileName)
|
|
Style(String strFileName,
Style defaults)
|
|
Style(Style s)
Create a clone of the specified Style. |
Method Summary | |
Object |
clone()
Make a clone of this Style. |
float[] |
getDashArray()
Return a copy of the dash array (not a reference to the original one!). |
float |
getDashPhase()
|
Color |
getDrawColor()
Get the color to draw lines with. |
Font |
getDrawFont()
Get the font style. |
BasicStroke |
getDrawStroke()
Get the drawing style. |
int |
getEndCap()
|
Color |
getFillColor()
Get the color to fill with. |
Color |
getFontColor()
|
int |
getLineJoin()
|
float |
getLineWidth()
|
float |
getMiterLimit()
|
static void |
main(String[] argv)
|
void |
setDashArray(float[] fArray)
Set the dash array for the pen used to draw with this style. |
void |
setDashPhase(float newDashPhase)
Set the dash phase for the pen used to draw with this style. |
void |
setDrawColor(Color newColor)
Set the drawing color. |
void |
setDrawColorHSV(float h,
float s,
float v)
Set the drawing color in HSV format. |
void |
setDrawColorRGBA(float r,
float g,
float b,
float a)
Set the drawing color in RGB format. |
void |
setDrawColorRGBA(int r,
int g,
int b,
int a)
Set the drawing color in RGB format. |
void |
setDrawFont(Font newFont)
Set the font to use. |
void |
setDrawStroke(BasicStroke s)
Set the drawing style. |
void |
setDrawTransparency(float aa)
Set the transparency for drawing. |
void |
setDrawTransparency(int aa)
Set the transparency for draw. |
void |
setEndCap(int newEndCap)
Set the end cap for the pen used to draw with this style. |
void |
setFillColor(Color newColor)
Set the fill color. |
void |
setFillColorHSV(float h,
float s,
float v)
Set the fill color in HSV format. |
void |
setFillColorRGBA(float r,
float g,
float b,
float a)
Set the fill color in RGB format. |
void |
setFillColorRGBA(int r,
int g,
int b,
int a)
Set the fill color in RGB format. |
void |
setFillTransparency(float aa)
Set the transparency for fill. |
void |
setFillTransparency(int aa)
Set the transparency for fill. |
void |
setFontColor(Color newColor)
|
void |
setLineJoin(int newLineJoin)
Set the line join for the pen used to draw with this style. |
void |
setLineWidth(float newLineWidth)
Set the line width for the pen used to draw with this style. |
void |
setMiterLimit(float newMiterLimit)
Set the miter limit for the pen used to draw with this style. |
String |
toString()
Debugging info. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte TRANSPARENT
public static final byte DRAW_CLEAR
public static final byte DRAW_SET
public static final byte DRAW_COPY
public static final byte DRAW_NOOP
public static final byte DRAW_COPYINVERTED
public static final byte DRAW_INVERT
public static final byte DRAW_OR
public static final byte DRAW_AND
public static final byte DRAW_XOR
public static final byte DRAW_EQUIV
public static final byte DRAW_NAND
public static final byte DRAW_NOR
public static final byte DRAW_ANDINVERTED
public static final byte DRAW_ANDREVERSE
public static final byte DRAW_ORINVERTED
public static final byte DRAW_ORREVERSE
public static final int CAP_BUTT
BasicStroke.CAP_BUTT
public static final int CAP_ROUND
BasicStroke.CAP_ROUND
public static final int CAP_SQUARE
BasicStroke.CAP_SQUARE
public static final int JOIN_BEVEL
BasicStroke.JOIN_BEVEL
public static final int JOIN_MITER
BasicStroke.JOIN_MITER
public static final int JOIN_ROUND
BasicStroke.JOIN_ROUND
Constructor Detail |
public Style()
public Style(Style s)
s
- is the Style to copy.public Style(String strFileName)
strFileName
- is the name of the style properties file in
Satin's data directory to load up.public Style(String strFileName, Style defaults)
strFileName
- is the name of the style properties file in
Satin's data directory to load up.defaults
- is the default Style to use if some of the
style properties do not exist.public Style(Properties props)
Method Detail |
public BasicStroke getDrawStroke()
public float[] getDashArray()
BasicStroke.getDashArray()
public float getDashPhase()
BasicStroke.getDashPhase()
public int getEndCap()
BasicStroke.getEndCap()
public int getLineJoin()
BasicStroke.getLineJoin()
public float getLineWidth()
BasicStroke.getLineWidth()
public float getMiterLimit()
BasicStroke.getMiterLimit()
public Color getDrawColor()
public Font getDrawFont()
public Color getFontColor()
public Color getFillColor()
public void setDrawStroke(BasicStroke s)
s
- is the drawing style to set to.public void setDashArray(float[] fArray)
fArray
- the array representing the dashing patternBasicStroke.getDashArray()
public void setDashPhase(float newDashPhase)
newDashPhase
- is the offset to start the dashing patternBasicStroke.getDashPhase()
public void setEndCap(int newEndCap)
newEndCap
- is the decoration of the ends.BasicStroke.getEndCap()
public void setLineJoin(int newLineJoin)
newLineJoin
- is the decoration applied where path segments meet.BasicStroke.getLineJoin()
public void setLineWidth(float newLineWidth)
newLineWidth
- is the width of the pen.BasicStroke.getLineWidth()
public void setMiterLimit(float newMiterLimit)
newMiterLimit
- is the limit to trim the miter join.BasicStroke.getMiterLimit()
public void setDrawFont(Font newFont)
newFont
- is the font to set to.public void setFontColor(Color newColor)
public void setDrawColor(Color newColor)
newColor
- is the color to set to.public void setDrawColorHSV(float h, float s, float v)
h
- is the hue value.s
- is the saturation value.v
- is the brightness value.public void setDrawColorRGBA(int r, int g, int b, int a)
r
- is the red value (0-255).g
- is the green value (0-255).b
- is the blue value (0-255).a
- is the transparency value (0-255).public void setDrawColorRGBA(float r, float g, float b, float a)
r
- is the red value (0.00 - 1.00).g
- is the green value (0.00 - 1.00).b
- is the blue value (0.00 - 1.00).a
- is the transparency value (0.00 - 1.00).public void setDrawTransparency(float aa)
aa
- is the transparency value, from 0 to 1, 0 being transparent and
1 being solid.public void setDrawTransparency(int aa)
aa
- is the transparency value (0-255).public void setFillColor(Color newColor)
newColor
- is the color to set to.public void setFillColorHSV(float h, float s, float v)
h
- is the hue value.s
- is the saturation value.v
- is the brightness value.public void setFillColorRGBA(int r, int g, int b, int a)
r
- is the red value (0-255).g
- is the green value (0-255).b
- is the blue value (0-255).a
- is the transparency value (0-255).public void setFillColorRGBA(float r, float g, float b, float a)
r
- is the red value (0.00 - 1.00).g
- is the green value (0.00 - 1.00).b
- is the blue value (0.00 - 1.00).a
- is the transparency value (0.00 - 1.00).public void setFillTransparency(float aa)
aa
- is the transparency value (0.00 - 1.00).public void setFillTransparency(int aa)
aa
- is the transparency value (0-255).public String toString()
toString
in class Object
public Object clone()
clone
in class Object
public static void main(String[] argv)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |