public class BasicNodeRenderer extends java.lang.Object implements NodeRenderer
Constructor and Description |
---|
BasicNodeRenderer(GraphController controller)
Create a renderer which renders nodes square and orange.
|
BasicNodeRenderer(GraphController controller,
java.awt.Shape nodeShape,
java.awt.Shape compositeShape,
java.awt.Paint nodeFill,
java.awt.Paint compositeFill,
double compositeScale)
Create a renderer which renders nodes using the
given shape and fill paint.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Paint |
getCompositeFill()
Return the fill that composites are painted with.
|
double |
getCompositeScale()
Return the scaling factor for the composite nodes
|
java.awt.Shape |
getCompositeShape()
Return the shape that composites are rendered in.
|
GraphController |
getGraphController()
Return the graph controller.
|
java.awt.Paint |
getNodeFill()
Return the fill that nodes are painted with.
|
java.awt.Shape |
getNodeShape()
Return the shape that nodes are rendered in.
|
Figure |
render(java.lang.Object node)
Return the rendered visual representation of this node.
|
void |
setCompositeFill(java.awt.Paint p)
Set the fill to paint the composites with.
|
void |
setCompositeScale(double scale)
Set the scaling factor for the composite nodes.
|
void |
setCompositeShape(java.awt.Shape s)
Set the shape for composites to be rendered in.
|
void |
setNodeFill(java.awt.Paint p)
Set the fill to paint the nodes with.
|
void |
setNodeShape(java.awt.Shape s)
Set the shape for nodes to be rendered in.
|
public BasicNodeRenderer(GraphController controller)
public BasicNodeRenderer(GraphController controller, java.awt.Shape nodeShape, java.awt.Shape compositeShape, java.awt.Paint nodeFill, java.awt.Paint compositeFill, double compositeScale)
public java.awt.Paint getCompositeFill()
public double getCompositeScale()
setCompositeScale(double)
public java.awt.Shape getCompositeShape()
public GraphController getGraphController()
public java.awt.Paint getNodeFill()
public java.awt.Shape getNodeShape()
public Figure render(java.lang.Object node)
render
in interface NodeRenderer
node
- The node to render.public void setCompositeFill(java.awt.Paint p)
public void setCompositeScale(double scale)
public void setCompositeShape(java.awt.Shape s)
public void setNodeFill(java.awt.Paint p)
public void setNodeShape(java.awt.Shape s)