public class JNodePainter extends Object implements NodePainter
The JNodePainter
is JBotSim's default NodePainter
for AWT.
Constructor and Description |
---|
JNodePainter() |
Modifier and Type | Method and Description |
---|---|
protected void |
drawNode(Graphics2D g2d,
Node node) |
void |
paintNode(UIComponent uiComponent,
Node node)
Provides a way to redefine the drawing of a node.
|
protected void |
setColor(Graphics2D g2d,
Node node)
|
protected void |
setRenderingHints(Graphics2D g2d,
Node node)
Sets the proper
RenderingHints on the provided Graphics2D object, with respect to the provided
Node . |
protected void |
setStroke(Graphics2D g2d,
Node node)
|
public void paintNode(UIComponent uiComponent, Node node)
NodePainter
paintNode
in interface NodePainter
uiComponent
- the graphical object to be drawn on.node
- the Node
to be drawn.protected void drawNode(Graphics2D g2d, Node node)
protected void setColor(Graphics2D g2d, Node node)
Sets the proper Color
on the provided Graphics2D
object, with respect to the provided
Node
.
You can override this method if you need to change the JNodePainter
's default color management.
g2d
- a Graphics2D
object.node
- the associated Node
.protected void setStroke(Graphics2D g2d, Node node)
Sets the proper Stroke
on the provided Graphics2D
object, with respect to the provided
Node
.
You can override this method if you need to change the JNodePainter
's default Stroke
.
g2d
- a Graphics2D
object.node
- the associated Node
.protected void setRenderingHints(Graphics2D g2d, Node node)
Sets the proper RenderingHints
on the provided Graphics2D
object, with respect to the provided
Node
.
You can override this method if you need to change the JNodePainter
rendering behavior.
g2d
- a Graphics2D
object.node
- the associated Node
.