public class ShinyPlateNodeStyle extends Object implements INodeStyle, Cloneable
INodeStyle which creates rectangular nodes with rounded corners and a highlighted ('shiny
plate') interior.
By default, this style renders a drop shadow by itself.
This style uses the ShinyPlateNodeStyleRenderer to visualize a node.
ShinyPlateNodeStyleRenderer| Constructor and Description |
|---|
ShinyPlateNodeStyle()
Creates a new instance using
ShinyPlateNodeStyleRenderer as renderer. |
ShinyPlateNodeStyle(ShinyPlateNodeStyleRenderer renderer)
Creates a new instance using the provided renderer.
|
| Modifier and Type | Method and Description |
|---|---|
ShinyPlateNodeStyle |
clone()
Creates a copy of this object and returns it.
|
InsetsD |
getInsets()
Gets the instance to use that provides the insets for this style.
|
Paint |
getPaint()
Gets the background brush for this style.
|
Pen |
getPen()
Gets the pen to use for the outline.
|
double |
getRadius()
Gets the corner radius of the rounded rectangle.
|
ShinyPlateNodeStyleRenderer |
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 |
setInsets(InsetsD value)
Sets the instance to use that provides the insets for this style.
|
void |
setPaint(Paint value)
Sets the background brush for this style.
|
void |
setPen(Pen value)
Sets the pen to use for the outline.
|
void |
setRadius(double value)
Sets the corner radius of the rounded rectangle.
|
void |
setShadowDrawingEnabled(boolean value)
Sets a value indicating whether to draw a drop shadow.
|
public ShinyPlateNodeStyle()
ShinyPlateNodeStyleRenderer as renderer.public ShinyPlateNodeStyle(ShinyPlateNodeStyleRenderer renderer)
public final ShinyPlateNodeStyle clone()
ICloneableclone in interface ICloneableclone in class ObjectObject.clone()public final InsetsD getInsets()
The ShinyPlateNodeStyleRenderer will use these insets and return them via an INodeInsetsProvider
if such an instance is queried through the
context lookup.
The default insets are set to (5,5,5,5).
INodeInsetsProvider,
setInsets(InsetsD)public final Paint getPaint()
The default value is Color.BLACK.
setPaint(Paint)public final Pen getPen()
The default value is null.
setPen(Pen)public final double getRadius()
The default value is 5.
setRadius(double)public final ShinyPlateNodeStyleRenderer getRenderer()
INodeStyle
The idiom for retrieving, e.g. an IVisualCreator implementation for a given style is:
getRenderer in interface INodeStylepublic final boolean isShadowDrawingEnabled()
The default value is true.
setShadowDrawingEnabled(boolean)public final void setInsets(InsetsD value)
The ShinyPlateNodeStyleRenderer will use these insets and return them via an INodeInsetsProvider
if such an instance is queried through the
context lookup.
The default insets are set to (5,5,5,5).
value - The Insets to set.INodeInsetsProvider,
getInsets()public final void setPaint(Paint value)
The default value is Color.BLACK.
value - The Paint to set.getPaint()public final void setPen(Pen value)
The default value is null.
value - The Pen to set.getPen()public final void setRadius(double value)
The default value is 5.
value - The Radius to set.getRadius()public final void setShadowDrawingEnabled(boolean value)
The default value is true.
value - The ShadowDrawingEnabled to set.isShadowDrawingEnabled()