|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.AbstractCustomNodePainter
y.view.NodeCellRendererPainter
public class NodeCellRendererPainter
A GenericNodeRealizer.Painter implementation that uses NodeCellRenderer instances to render
the contents of a node.
NodeCellRenderer![]() |
![]() |
| Field Summary | |
|---|---|
static DataMap |
USER_DATA_MAP
A convenience DataMap implementation that maps to the userData
property of the corresponding NodeRealizer of the Node that is passed to the DataProvider.get(Object)
method. |
| Constructor Summary | |
|---|---|
NodeCellRendererPainter(NodeCellRenderer ncr,
DataProvider dataProvider)
Constructs a NodeCellRendererPainter using the given NodeCellRenderer and the DataProvider that provides access to the "value" that is passed to the renderer for each node being rendered. |
|
| Method Summary | |
|---|---|
DataProvider |
getDataProvider()
Returns the DataProvider that is used by the getNodeCellRendererComponent(Graph2DView, NodeRealizer,boolean)
implementation to query the value for the node being rendered. |
NodeCellRenderer |
getNodeCellRenderer()
Returns the NodeCellRenderer associated with this instance. |
protected java.awt.Component |
getNodeCellRendererComponent(Graph2DView view,
NodeRealizer context,
boolean selected)
Callback method that determines the component for the rendering for a given Graph2DView and NodeRealizer. |
protected void |
paintNode(NodeRealizer context,
java.awt.Graphics2D graphics,
boolean sloppy)
Callback method to be overwritten by subclasses called by AbstractCustomNodePainter.paint(NodeRealizer, Graphics2D). |
void |
paintSloppy(NodeRealizer context,
java.awt.Graphics2D graphics)
Delegates to AbstractCustomNodePainter.paintNode(NodeRealizer, Graphics2D, boolean) if the node
is visible. |
| Methods inherited from class y.view.AbstractCustomNodePainter |
|---|
backupGraphics, createSelectionColor, getFillColor, getFillColor2, getFillPaint, getLineColor, getLinePaint, getLineStroke, initializeFill, initializeLine, paint, paintHotSpots, paintPorts, paintText, restoreGraphics |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface y.view.GenericNodeRealizer.Painter |
|---|
paint |
| Field Detail |
|---|
public static final DataMap USER_DATA_MAP
userData
property of the corresponding NodeRealizer of the Node that is passed to the DataProvider.get(Object)
method.
| Constructor Detail |
|---|
public NodeCellRendererPainter(NodeCellRenderer ncr,
DataProvider dataProvider)
ncr - the renderer used to receive the component to paint ondataProvider - the instance that provides the value for the renderer for each nodeUSER_DATA_MAP| Method Detail |
|---|
public NodeCellRenderer getNodeCellRenderer()
public DataProvider getDataProvider()
getNodeCellRendererComponent(Graph2DView, NodeRealizer,boolean)
implementation to query the value for the node being rendered.
public void paintSloppy(NodeRealizer context,
java.awt.Graphics2D graphics)
AbstractCustomNodePainterAbstractCustomNodePainter.paintNode(NodeRealizer, Graphics2D, boolean) if the node
is visible.
paintSloppy in interface GenericNodeRealizer.PainterpaintSloppy in class AbstractCustomNodePaintercontext - the context nodegraphics - the graphics context to use
protected java.awt.Component getNodeCellRendererComponent(Graph2DView view,
NodeRealizer context,
boolean selected)
NodeCellRenderer associated to this instance.
view - the view where the component will be placed incontext - the node for which the component will be returnedselected - whether or not the component should indicate a selected
state.
protected void paintNode(NodeRealizer context,
java.awt.Graphics2D graphics,
boolean sloppy)
AbstractCustomNodePainterAbstractCustomNodePainter.paint(NodeRealizer, Graphics2D).
This method is responsible for drawing the actual node only - neither
the hotspots, nor the labels, should be painted by this method.
paintNode in class AbstractCustomNodePaintercontext - the context nodegraphics - the graphics context to usesloppy - whether to draw the node sloppilyAbstractCustomNodePainter.initializeLine(NodeRealizer, Graphics2D),
AbstractCustomNodePainter.initializeFill(NodeRealizer, Graphics2D)
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||