|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.Graph2DViewRepaintManager
public class Graph2DViewRepaintManager
This class triggers repaints in a Graph2DView
, that affect only
the unified bounds of registered graph objects.
add(Drawable)
,
add(EdgeRealizer)
,
add(NodeRealizer)
Constructor Summary | |
---|---|
Graph2DViewRepaintManager(Graph2DView view)
Constructs a new Graph2DViewRepaintManager for the
specified Graph2DView . |
Method Summary | |
---|---|
void |
add(Drawable drawable)
Adds the specified Drawable to this manager's list
of graph objects. |
void |
add(EdgeRealizer edge)
Adds the specified EdgeRealizer to this manager's list
of graph objects. |
void |
add(NodeRealizer node)
Adds the specified NodeRealizer to this manager's list
of graph objects. |
void |
animationPerformed(AnimationEvent e)
Triggers update for the appropriate events. |
protected void |
calcUnionRect(Drawable drawable,
java.awt.geom.Rectangle2D rectangle)
Calculates the union of the bounding box of this drawable and the specified rectangle. |
protected void |
calcUnionRect(EdgeRealizer realizer,
java.awt.geom.Rectangle2D rectangle)
Calculates the union of the rectangle enclosed by this realizer and the specified rectangle. |
protected void |
calcUnionRect(NodeRealizer realizer,
java.awt.geom.Rectangle2D rectangle)
Calculates the union of rectangle enclosed by this realizer and the specified rectangle. |
boolean |
getForceGlobalUpdate()
Returns true if this Graph2DViewRepaintManager
forces its view to repaint completely. |
Graph2DView |
getView()
Returns the Graph2DView , for which this
Graph2DViewRepaintManager was created. |
void |
invalidate()
Forces the manager to update all of its view's contents on the next call to update . |
void |
remove(Drawable drawable)
Removes the specified Drawable from this manager's list
of graph objects. |
void |
remove(EdgeRealizer edge)
Removes the specified EdgeRealizer from this manager's list
of graph objects. |
void |
remove(NodeRealizer node)
Removes the specified NodeRealizer from this manager's list
of graph objects. |
void |
removeAll()
Removes all registered Drawables, NodeRealizers and EdgeRealizers from this manager's list of graph objects. |
void |
setForceGlobalUpdate(boolean forceGlobalUpdate)
Specifies whether this Graph2DViewRepaintManager
forces its view to repaint completely. |
void |
update()
Forces this manager's view to repaint the union of bounds of the currently registered graph objects. |
void |
updateView()
Forces this manager's view to repaint. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph2DViewRepaintManager(Graph2DView view)
Graph2DViewRepaintManager
for the
specified Graph2DView
.
view
- the Graph2DView
Method Detail |
---|
public Graph2DView getView()
Graph2DView
, for which this
Graph2DViewRepaintManager
was created.
Graph2DView
, for which this
Graph2DViewRepaintManager
was createdpublic void add(Drawable drawable)
Drawable
to this manager's list
of graph objects.
drawable
- the Drawable
public void remove(Drawable drawable)
Drawable
from this manager's list
of graph objects.
drawable
- the Drawable
public void add(EdgeRealizer edge)
EdgeRealizer
to this manager's list
of graph objects.
edge
- the EdgeRealizer
public void remove(EdgeRealizer edge)
EdgeRealizer
from this manager's list
of graph objects.
edge
- the EdgeRealizer
public void add(NodeRealizer node)
NodeRealizer
to this manager's list
of graph objects.
node
- the NodeRealizer
public void remove(NodeRealizer node)
NodeRealizer
from this manager's list
of graph objects.
node
- the NodeRealizer
add(Drawable)
,
add(NodeRealizer)
,
add(EdgeRealizer)
public void removeAll()
public void animationPerformed(AnimationEvent e)
update
for the appropriate events.
animationPerformed
in interface AnimationListener
update()
public void invalidate()
update
.
update()
public void updateView()
public void update()
forceGlobalUpdate
is set to true
, calling
this method has the same effect as calling updateView
.
If the repaint manager has no elements registered or update is called for the first time,
the complete view is being updated.
updateView()
,
setForceGlobalUpdate(boolean)
public boolean getForceGlobalUpdate()
true
if this Graph2DViewRepaintManager
forces its view to repaint completely.
true
if this Graph2DViewRepaintManager
forces its view to repaint completely.public void setForceGlobalUpdate(boolean forceGlobalUpdate)
Graph2DViewRepaintManager
forces its view to repaint completely.
forceGlobalUpdate
- if true
, this
Graph2DViewRepaintManager
forces its view to repaint completelyprotected void calcUnionRect(Drawable drawable, java.awt.geom.Rectangle2D rectangle)
drawable
- the drawable whose bounding box will be added.rectangle
- the rectangle that will be added and modified.protected void calcUnionRect(EdgeRealizer realizer, java.awt.geom.Rectangle2D rectangle)
The default implementation calls
EdgeRealizer.calcUnionRect(java.awt.geom.Rectangle2D)
.
realizer
- the realizer whose rectangle will be added.rectangle
- the rectangle that will be added and modified.protected void calcUnionRect(NodeRealizer realizer, java.awt.geom.Rectangle2D rectangle)
The default implementation calls
NodeRealizer.calcUnionRect(java.awt.geom.Rectangle2D)
.
realizer
- the realizer whose rectangle will be added.rectangle
- the rectangle that will be added and modified.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |