public class GeneralPathNodeStyle extends Object implements INodeStyle, Cloneable
GeneralPath
instance.Constructor and Description |
---|
GeneralPathNodeStyle()
Creates a new instance using a simple rectangular path and
GeneralPathNodeStyleRenderer as renderer. |
GeneralPathNodeStyle(GeneralPath path)
Creates a new instance using the specified path and a custom renderer instance.
|
GeneralPathNodeStyle(GeneralPath path,
GeneralPathNodeStyleRenderer renderer)
Creates a new instance using the specified path and a custom renderer instance.
|
Modifier and Type | Method and Description |
---|---|
GeneralPathNodeStyle |
clone()
Creates a copy of this object and returns it.
|
Paint |
getPaint()
Gets the
Paint that is used to draw the shape. |
GeneralPath |
getPath()
Gets the path that defines the boundary of the shape.
|
Pen |
getPen()
Gets the
Pen that is used to draw the shape. |
GeneralPathNodeStyleRenderer |
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.
|
void |
setPaint(Paint value)
Sets the
Paint that is used to draw the shape. |
void |
setPath(GeneralPath value)
Sets the path that defines the boundary of the shape.
|
void |
setPen(Pen value)
Sets the
Pen that is used to draw the shape. |
public GeneralPathNodeStyle()
GeneralPathNodeStyleRenderer
as renderer.public GeneralPathNodeStyle(GeneralPath path)
path
- The path that defines the boundary of this style.public GeneralPathNodeStyle(GeneralPath path, GeneralPathNodeStyleRenderer renderer)
path
- The path that defines the boundary of this style.renderer
- Custom renderer instance for this stylepublic GeneralPathNodeStyle clone()
ICloneable
clone
in interface ICloneable
clone
in class Object
Object.clone()
public Paint getPaint()
Paint
that is used to draw the shape.
The default value is Color.WHITE
.
setPaint(Paint)
public GeneralPath getPath()
The path must be defined in such a way that <0,0> will be at the top left of a node's Layout
and <1,1> will be at the lower right. The path will be scaled accordingly during the painting.
The default is a simple rectangular path.
setPath(GeneralPath)
public Pen getPen()
setPen(Pen)
public final GeneralPathNodeStyleRenderer getRenderer()
INodeStyle
The idiom for retrieving, e.g. an IVisualCreator
implementation for a given style is:
getRenderer
in interface INodeStyle
public void setPaint(Paint value)
Paint
that is used to draw the shape.
The default value is Color.WHITE
.
value
- The Paint to set.getPaint()
public void setPath(GeneralPath value)
The path must be defined in such a way that <0,0> will be at the top left of a node's Layout
and <1,1> will be at the lower right. The path will be scaled accordingly during the painting.
The default is a simple rectangular path.
value
- The Path to set.getPath()