public class BevelNodeStyle extends Object implements INodeStyle, Cloneable
INodeStyle
that can be used to create rectangular nodes with rounded corners, a bevel
border, and a shining background.
Optionally, this style renders a drop shadow by itself.
This style uses the BevelNodeStyleRenderer
to visualize a node.
BevelNodeStyleRenderer
Constructor and Description |
---|
BevelNodeStyle()
Creates a new instance using
BevelNodeStyleRenderer as renderer to share. |
BevelNodeStyle(BevelNodeStyleRenderer renderer)
Creates a new instance using the provided renderer to share.
|
Modifier and Type | Method and Description |
---|---|
BevelNodeStyle |
clone()
Creates a copy of this object and returns it.
|
Color |
getColor()
Gets the base color to use.
|
double |
getInset()
Gets the insets to use for the bevel.
|
double |
getRadius()
Gets the radius of the corner of the rounded rectangle.
|
BevelNodeStyleRenderer |
getRenderer()
Gets the renderer implementation that can be queried for implementations that provide details about the visual
appearance and visual behavior for a given node and this style instance.
|
boolean |
isShadowDrawingEnabled()
Gets a value indicating whether to draw a drop shadow.
|
void |
setColor(Color value)
Sets the base color to use.
|
void |
setInset(double value)
Sets the insets to use for the bevel.
|
void |
setRadius(double value)
Sets the radius of the corner of the rounded rectangle.
|
void |
setShadowDrawingEnabled(boolean value)
Sets a value indicating whether to draw a drop shadow.
|
public BevelNodeStyle()
BevelNodeStyleRenderer
as renderer to share.public BevelNodeStyle(BevelNodeStyleRenderer renderer)
public final BevelNodeStyle clone()
ICloneable
clone
in interface ICloneable
clone
in class Object
Object.clone()
public final Color getColor()
The default value is Color.BLACK
.
setColor(Color)
public final double getInset()
The default value is 3
.
setInset(double)
public final double getRadius()
The default value is 10
.
setRadius(double)
public final BevelNodeStyleRenderer getRenderer()
INodeStyle
The idiom for retrieving, e.g. an IVisualCreator
implementation for a given style is:
getRenderer
in interface INodeStyle
public final boolean isShadowDrawingEnabled()
The default value is false
.
true
if node has a drop shadow; false
otherwise.setShadowDrawingEnabled(boolean)
public final void setColor(Color value)
The default value is Color.BLACK
.
value
- The Color to set.getColor()
public final void setInset(double value)
The default value is 3
.
value
- The Inset to set.getInset()
public final void setRadius(double value)
The default value is 10
.
value
- The Radius to set.getRadius()
public final void setShadowDrawingEnabled(boolean value)
The default value is false
.
value
- true
if node has a drop shadow; false
otherwise.isShadowDrawingEnabled()