|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassbox.graphview.AbstractImageNodePainter
public abstract class AbstractImageNodePainter
An abstract implementation of a NodePainter which paints an image for each node.
The size of the node ist determined by the according image.
Only methods that have to be implemented are ImageIcon getImageForNode(Node) to
decide which image should be painted for a node and Collection getAllImages()
to receive all images used by this painter.
| Constructor Summary | |
|---|---|
protected |
AbstractImageNodePainter(java.awt.Dimension imagesize,
java.awt.Insets border)
Constructor. |
protected |
AbstractImageNodePainter(java.awt.Dimension imagesize,
java.awt.Insets border,
double zoomthreshold)
Constructor. |
| Method Summary | |
|---|---|
protected abstract javax.swing.ImageIcon |
getImageForNode(Node node)
This method has to be implemented by subclasses to decide which image should be painted for a node. |
void |
getNodeScreenBounds(JGraphPane graphpane,
Node node,
java.awt.Rectangle nodebounds)
Returns the outer rectangle of the node on screen. |
java.lang.String |
getToolTipText(JGraphPane graphpane,
Node node,
java.awt.Point point)
Retruns the tool-tip for given point. |
boolean |
isInNode(JGraphPane graphpane,
Node node,
java.awt.Point point)
Checks whether given point is inside the node. |
void |
paintNode(JGraphPane graphpane,
java.awt.Graphics2D g,
Node node)
Paints the supplied node. |
void |
setZoomFactor(double zf)
Set the zoom-factor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractImageNodePainter(java.awt.Dimension imagesize,
java.awt.Insets border)
imagesize - The size of the images.insets - The insets of this painter (empty space around the images).
protected AbstractImageNodePainter(java.awt.Dimension imagesize,
java.awt.Insets border,
double zoomthreshold)
imagesize - The size of the images.insets - The insets of this painter (empty space around the images).zoomthreshold - The minimum zoom value to paint images.| Method Detail |
|---|
protected abstract javax.swing.ImageIcon getImageForNode(Node node)
public void setZoomFactor(double zf)
ZoomableNodePainter
setZoomFactor in interface ZoomableNodePainter
public void paintNode(JGraphPane graphpane,
java.awt.Graphics2D g,
Node node)
NodePainter
paintNode in interface NodePaintergraphpane - the graph paneg - the graphicsnode - the node to paint
public boolean isInNode(JGraphPane graphpane,
Node node,
java.awt.Point point)
NodePainter
isInNode in interface NodePaintergraphpane - the graph panenode - the nodepoint - the point
true if the point is in the node
public void getNodeScreenBounds(JGraphPane graphpane,
Node node,
java.awt.Rectangle nodebounds)
NodePainter
getNodeScreenBounds in interface NodePaintergraphpane - the graph panenode - the nodenodebounds - the rectangle receiving the node's coordinates
public java.lang.String getToolTipText(JGraphPane graphpane,
Node node,
java.awt.Point point)
NodePainter
getToolTipText in interface NodePaintergraphpane - the graph panenode - the nodepoint - the point
null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||