|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.DefaultOrderRenderer
public class DefaultOrderRenderer
Default OrderRenderer
implementation. The rendering order
is specified using Graph2DTraversal
instances.
Constructor Summary | |
---|---|
DefaultOrderRenderer()
Constructs a new DefaultOrderRenderer which uses
instances of DefaultGraph2DTraversal to determine
painting and sloppy painting order. |
|
DefaultOrderRenderer(Graph2DTraversal paintOrder,
Graph2DTraversal sloppyPaintOrder)
Constructs a new DefaultOrderRenderer for the specified
painting and sloppy painting orders. |
Method Summary | |
---|---|
Graph2DTraversal |
getPaintOrder()
Returns the Graph2DTraversal instance that determines
this DefaultOrderRenderer 's painting order. |
Graph2DTraversal |
getSloppyPaintOrder()
Returns the Graph2DTraversal instance that determines
this DefaultOrderRenderer 's sloppy painting order. |
protected boolean |
intersects(EdgeRealizer er,
Rectangle2D region)
Checks if the given region overlaps with the edge. |
protected boolean |
intersects(NodeRealizer nr,
Rectangle2D region)
Checks if the given region overlaps with the node. |
protected void |
paint(Graphics2D gfx,
EdgeRealizer er)
Paints the given edge realizer on the specified 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 specified graphics context. |
protected void |
paintSloppy(Graphics2D gfx,
EdgeRealizer er)
Paints the given edge realizer sloppily on the specified 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 specified graphics context. |
void |
setPaintOrder(Graph2DTraversal paintOrder)
Specifies the Graph2DTraversal instance that determines
this DefaultOrderRenderer 's painting order. |
void |
setSloppyPaintOrder(Graph2DTraversal sloppyPaintOrder)
Specifies the Graph2DTraversal instance that determines
this DefaultOrderRenderer 's sloppy painting order. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultOrderRenderer()
DefaultOrderRenderer
which uses
instances of DefaultGraph2DTraversal
to determine
painting and sloppy painting order.
public DefaultOrderRenderer(Graph2DTraversal paintOrder, Graph2DTraversal sloppyPaintOrder)
DefaultOrderRenderer
for the specified
painting and sloppy painting orders.
paintOrder
- a Graph2DTraversal
whose
firstToLast
method determines this DefaultOrderRenderer
painting order.sloppyPaintOrder
- a Graph2DTraversal
whose
firstToLast
method determines this DefaultOrderRenderer
sloppy painting
order.Method Detail |
---|
public Graph2DTraversal getPaintOrder()
Graph2DTraversal
instance that determines
this DefaultOrderRenderer
's painting order.
getPaintOrder
in interface OrderRenderer
Graph2DTraversal
instance that determines
this DefaultOrderRenderer
's painting order.public void setPaintOrder(Graph2DTraversal paintOrder)
Graph2DTraversal
instance that determines
this DefaultOrderRenderer
's painting order.
paintOrder
- the Graph2DTraversal
whose
firstToLast
method determines the painting order.public Graph2DTraversal getSloppyPaintOrder()
Graph2DTraversal
instance that determines
this DefaultOrderRenderer
's sloppy painting order.
getSloppyPaintOrder
in interface OrderRenderer
Graph2DTraversal
instance that determines
this DefaultOrderRenderer
's sloppy painting order.public void setSloppyPaintOrder(Graph2DTraversal sloppyPaintOrder)
Graph2DTraversal
instance that determines
this DefaultOrderRenderer
's sloppy painting order.
sloppyPaintOrder
- the Graph2DTraversal
whose
firstToLast
method determines the sloppy painting order.public void paint(Graphics2D gfx, Graph2D graph)
Graph2DRenderer
paint
in interface Graph2DRenderer
public void paintSloppy(Graphics2D gfx, Graph2D graph)
Graph2DRenderer
paintSloppy
in interface Graph2DRenderer
protected void paint(Graphics2D gfx, EdgeRealizer er)
protected void paint(Graphics2D gfx, NodeRealizer nr)
protected void paintSloppy(Graphics2D gfx, EdgeRealizer er)
protected void paintSloppy(Graphics2D gfx, NodeRealizer nr)
protected boolean intersects(NodeRealizer nr, Rectangle2D region)
nr
- the realizer of the noderegion
- the rectangular region to be tested
true
if the node intersects with the region, false
otherwise.protected boolean intersects(EdgeRealizer er, Rectangle2D region)
er
- the realizer of the edgeregion
- the rectangular region to be tested
true
if the edge crosses the region, false
otherwise.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |