|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.DefaultGraph2DRenderer
Default Graph2DRenderer implementation.
This class renders a Graph2D by invoking the paint method for the associated
NodeRealizer
and EdgeRealizer
objects. This renderer is aware of
nested graph hierarchies. It will first render a group node, then all of its children.
To be more specific, the rendering order of nodes is determined by
the HierarchyManager.preTraverse(y.view.hierarchy.HierarchyManager.NodeVisitor)
method.
Constructor Summary | |
DefaultGraph2DRenderer()
|
Method Summary | |
int |
getClipEnlargementValue()
Returns the clip enlargemnt value. |
boolean |
getDrawEdgesFirst()
Returns the drawing order of edges and nodes. |
boolean |
isHierarchicSloppyPaintOrderEnabled()
Returns whether or not to paint nodes in the correct hierarchic order when when in sloppy mode. |
protected void |
paint(Graphics2D gfx,
EdgeRealizer er)
Paints the given edge realizer on the graphics context. |
void |
paint(Graphics2D gfx,
Graph2D graph)
Renders the given graph2D on the given Graphics2D context. |
protected void |
paint(Graphics2D gfx,
NodeRealizer nr)
Paints the given node realizer on the graphics context. |
protected void |
paintSloppy(Graphics2D gfx,
EdgeRealizer er)
Paints the given edge realizer sloppily on the graphics context. |
void |
paintSloppy(Graphics2D gfx,
Graph2D graph)
Renders the given Graph2D on the given Graphics2D context. |
protected void |
paintSloppy(Graphics2D gfx,
NodeRealizer nr)
Paints the given node realizer sloppily on the graphics context. |
void |
setClipEnlargementValue(int enlargement)
Sets the clip enlargemnt value. |
void |
setDrawEdgesFirst(boolean edgesFirst)
Sets the drawing order of edges and nodes. |
void |
setHierarchicSloppyPaintOrderEnabled(boolean enabled)
Whether or not to paint nodes in the correct hierarchic order when when in sloppy mode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultGraph2DRenderer()
Method Detail |
public void setDrawEdgesFirst(boolean edgesFirst)
true
then
edges will be drawn prior to nodes. The effect of this setting
is that nodes will be drawn atop of all drawn edges.
If the given argument is false
then
nodes will drawn be prior to edges. The effect of that setting
is that nodes will be drawn beneath all drawn edges.
By default nodes will be drawn first, then edges.
public boolean getDrawEdgesFirst()
DefaultGraph2DRenderer.setDrawEdgesFirst(boolean)
public void setClipEnlargementValue(int enlargement)
By default this value is set to 10
.
public int getClipEnlargementValue()
DefaultGraph2DRenderer.setClipEnlargementValue(int)
public void setHierarchicSloppyPaintOrderEnabled(boolean enabled)
public boolean isHierarchicSloppyPaintOrderEnabled()
DefaultGraph2DRenderer.setHierarchicSloppyPaintOrderEnabled(boolean)
public void paint(Graphics2D gfx, Graph2D graph)
paint
in interface Graph2DRenderer
public void paintSloppy(Graphics2D gfx, Graph2D graph)
Rendering is performed by calling the paintSloppy() method of each Node- and EdgeRealizer associated with the nodes and edges of the graph.
paintSloppy
in interface Graph2DRenderer
protected void paint(Graphics2D gfx, NodeRealizer nr)
protected void paint(Graphics2D gfx, EdgeRealizer er)
protected void paintSloppy(Graphics2D gfx, NodeRealizer nr)
protected void paintSloppy(Graphics2D gfx, EdgeRealizer er)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |