public class FwkAppearance extends java.lang.Object implements FwkAppearanceInterface
Graphics2D,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static java.awt.Color |
DEFAULT_BACKGROUNDCOLOR |
static java.awt.Color |
DEFAULT_COLOR |
static boolean |
JDK1_3_TRANSPARENCY_BUG |
static java.awt.BasicStroke[] |
STROKES
The default stroke array.
|
static java.lang.String |
version |
DASH_STROKE, DOT_DASH_STROKE, DOT_DOT_DASH_STROKE, DOT_STROKE, LINE_STROKE| Constructor and Description |
|---|
FwkAppearance()
Creast an appearance.
|
FwkAppearance(java.awt.Color c)
The constructor that receives the color of the appearance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(java.awt.Graphics2D g)
Configurate the graphical context with the settings of the appearance.
|
java.awt.Color |
getBackgroundColor()
Gets the background color for the Graphics2D context.
|
java.awt.Shape |
getClip()
Gets the clipping shape.
|
java.awt.Color |
getColor()
Gets this graphics context's current color to the specified color.
|
float[] |
getDashArray()
Returns the array representing the lengths of the
dash segments.
|
float |
getDashPhase()
Returns the current dash phase.
|
int |
getEndCap()
Returns the end cap style.
|
java.awt.Shape |
getFill()
Gets the filling shape.
|
java.awt.Font |
getFont()
Gets this graphics context's font to the specified font.
|
int |
getLineJoin()
Returns the line join style.
|
float |
getLineWidth()
Returns the line width.
|
float |
getMiterLimit()
Returns the limit of miter joins.
|
java.awt.Stroke |
getStroke()
Gets the Stroke for the Graphics2D context.
|
java.awt.geom.AffineTransform |
getTransform()
Retruns the transform of the appearance.
|
java.awt.geom.Point2D |
getTranslation()
Get the translation vector.
|
float |
getTransparency()
Get the transparency of the current color (range 0 .. 1.0).
|
java.lang.String |
getVersion()
Return the version string of the FWK component.
|
boolean |
getVisible()
Get the visibility.
|
boolean |
isVisible()
Returns a boolean whether the object is visible.
|
void |
release()
Release the object.
|
java.awt.BasicStroke |
scaleStroke(java.awt.geom.AffineTransform at)
Scale the line with.
|
java.awt.BasicStroke |
scaleStroke(java.awt.geom.AffineTransform at,
float lw)
Scale the line with.
|
void |
setBackgroundColor(java.awt.Color color)
Sets the background color for the Graphics2D context.
|
void |
setClip(double x,
double y,
double width,
double height)
Sets the current clip to the rectangle specified by the given coordinates.
|
void |
setClip(java.awt.Shape clip)
Sets the current clipping area to an arbitrary clip shape.
|
void |
setColor(java.awt.Color c)
Sets this graphics context's current color to the specified color.
|
void |
setDashArray(float[] arr)
Sets the array representing the lengths of the
dash segments.
|
void |
setDashPhase(float phase)
Sets the current dash phase.
|
void |
setEndCap(int cap)
Retrieves the end cap style.
|
void |
setFill(java.awt.Shape s)
Fills the interior of a Shape using the settings of the Graphics2D context.
|
void |
setFont(java.awt.Font font)
Sets this graphics context's font to the specified font.
|
void |
setLineJoin(int join)
Retrieves the line join style.
|
void |
setLineWidth(float w)
Sets the line width of the stroke.
|
void |
setMiterLimit(float limit)
Retrieves the limit of miter joins.
|
void |
setScale(double sx,
double sy)
Sets the possibly non-uniform scale component of the current transform.
|
void |
setStroke(java.awt.Stroke s)
Sets the Stroke for the Graphics2D context.
|
void |
setTransform(java.awt.geom.AffineTransform t)
Sets the transform of the appearance.
|
void |
setTranslation(double x,
double y)
Concatenates the current Graphics2D Transform with a translation transform.
|
void |
setTransparency(float t)
Set the transparency.
|
void |
setVisible(boolean flag)
Set the visibility.
|
public static final java.lang.String version
public static final java.awt.BasicStroke[] STROKES
public static boolean JDK1_3_TRANSPARENCY_BUG
public static java.awt.Color DEFAULT_COLOR
public static java.awt.Color DEFAULT_BACKGROUNDCOLOR
public FwkAppearance()
public FwkAppearance(java.awt.Color c)
c - The color of the appearance.public java.lang.String getVersion()
FwkInterfacegetVersion in interface FwkInterfacepublic void release()
release in interface FwkInterfacepublic void setColor(java.awt.Color c)
setColor in interface FwkAppearanceInterfacec - the color.Colorpublic java.awt.Color getColor()
getColor in interface FwkAppearanceInterfaceColorpublic void setTransparency(float t)
setTransparency in interface FwkAppearanceInterfacet - The transparency.public float getTransparency()
getTransparency in interface FwkAppearanceInterfacepublic void setFont(java.awt.Font font)
setFont in interface FwkAppearanceInterfacefont - The font.Fontpublic java.awt.Font getFont()
getFont in interface FwkAppearanceInterfaceFontpublic void setBackgroundColor(java.awt.Color color)
setBackgroundColor in interface FwkAppearanceInterfacecolor - The color of the backgroundGraphics2Dpublic java.awt.Color getBackgroundColor()
getBackgroundColor in interface FwkAppearanceInterfaceGraphics2Dpublic void setStroke(java.awt.Stroke s)
setStroke in interface FwkAppearanceInterfaces - The Stroke style.Strokepublic java.awt.Stroke getStroke()
getStroke in interface FwkAppearanceInterfaceStrokepublic void setLineWidth(float w)
setLineWidth in interface FwkAppearanceInterfacew - The line width.BasicStrokepublic float getLineWidth()
getLineWidth in interface FwkAppearanceInterfaceBasicStrokepublic void setDashArray(float[] arr)
setDashArray in interface FwkAppearanceInterfacearr - The segment array.BasicStrokepublic float[] getDashArray()
getDashArray in interface FwkAppearanceInterfaceBasicStrokepublic void setDashPhase(float phase)
setDashPhase in interface FwkAppearanceInterfacephase - the dash phase.BasicStrokepublic float getDashPhase()
getDashPhase in interface FwkAppearanceInterfaceBasicStrokepublic void setEndCap(int cap)
setEndCap in interface FwkAppearanceInterfaceBasicStrokepublic int getEndCap()
getEndCap in interface FwkAppearanceInterfaceBasicStrokepublic void setLineJoin(int join)
setLineJoin in interface FwkAppearanceInterfacejoin - the line join style.BasicStrokepublic int getLineJoin()
getLineJoin in interface FwkAppearanceInterfaceBasicStrokepublic void setMiterLimit(float limit)
setMiterLimit in interface FwkAppearanceInterfacelimit - the limit.BasicStrokepublic float getMiterLimit()
getMiterLimit in interface FwkAppearanceInterfaceBasicStrokepublic void setFill(java.awt.Shape s)
setFill in interface FwkAppearanceInterfaces - the filling shape.Shapepublic java.awt.Shape getFill()
getFill in interface FwkAppearanceInterfaceShapepublic void setTransform(java.awt.geom.AffineTransform t)
setTransform in interface FwkAppearanceInterfacet - the affine transformation.java.awt.AffineTransformpublic java.awt.geom.AffineTransform getTransform()
getTransform in interface FwkAppearanceInterfacejava.awt.AffineTransformpublic void setTranslation(double x,
double y)
setTranslation in interface FwkAppearanceInterfacex - Translation in xy - Translation in yGraphics2Dpublic java.awt.geom.Point2D getTranslation()
getTranslation in interface FwkAppearanceInterfacesetTranlation(double, double)public void setScale(double sx,
double sy)
setScale in interface FwkAppearanceInterfacesx - scale value in x.sy - scale value in y.public void setClip(double x,
double y,
double width,
double height)
setClip in interface FwkAppearanceInterfacex, - y, width, heigth The bounding box.public void setClip(java.awt.Shape clip)
setClip in interface FwkAppearanceInterfaceclip - The clipping shape.Shapepublic java.awt.Shape getClip()
getClip in interface FwkAppearanceInterfaceShapepublic void configure(java.awt.Graphics2D g)
configure in interface FwkAppearanceInterfaceg - The Graphical context.public boolean isVisible()
isVisible in interface FwkAppearanceInterfacepublic void setVisible(boolean flag)
setVisible in interface FwkAppearanceInterfaceflag - true if the object should be visible.public boolean getVisible()
getVisible in interface FwkAppearanceInterfacepublic java.awt.BasicStroke scaleStroke(java.awt.geom.AffineTransform at,
float lw)
scaleStroke in interface FwkAppearanceInterfaceat - the transformation to scale the stroke.lw - The line width to be scaled.public java.awt.BasicStroke scaleStroke(java.awt.geom.AffineTransform at)
scaleStroke in interface FwkAppearanceInterfaceat - the transformation to scale the stroke.