|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.UpdateManager | +--org.eclipse.draw2d.DeferredUpdateManager
An UpdateManager that asynchronously updates the affected figures.
Nested Class Summary | |
protected class |
DeferredUpdateManager.UpdateRequest
Calls performUpdate() . |
Constructor Summary | |
DeferredUpdateManager()
Empty constructor. |
|
DeferredUpdateManager(GraphicsSource gs)
Constructs a new DererredUpdateManager with the given GraphicsSource. |
Method Summary | |
void |
addDirtyRegion(IFigure figure,
int x,
int y,
int w,
int h)
Adds a dirty region (defined by the rectangle x, y, w, h) to the update queue. |
void |
addInvalidFigure(IFigure f)
Adds the given figure to the update queue. |
protected Graphics |
getGraphics(Rectangle region)
Returns a Graphics object for the given region. |
void |
performUpdate()
Performs the update. |
void |
performUpdate(Rectangle exposed)
Adds the given exposed region to the update queue and then performs the update. |
protected void |
queueWork()
Posts an DeferredUpdateManager.UpdateRequest using Display.asyncExec(Runnable) . |
protected void |
releaseGraphics(Graphics graphics)
Releases the graphics object, which causes the GraphicsSource to flush. |
protected void |
repairDamage()
Repaints the dirty regions on the update queue and calls UpdateManager.firePainting(Rectangle, Map) , unless there are no dirty regions. |
void |
setGraphicsSource(GraphicsSource gs)
Sets the graphics source. |
void |
setRoot(IFigure figure)
Sets the root figure. |
protected void |
validateFigures()
Validates the invalid figures on the update queue and calls UpdateManager.fireValidating() unless there are no invalid figures. |
Methods inherited from class org.eclipse.draw2d.UpdateManager |
addDirtyRegion, addUpdateListener, dispose, firePainting, fireValidating, isDisposed, removeUpdateListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DeferredUpdateManager(GraphicsSource gs)
gs
- the graphics sourcepublic DeferredUpdateManager()
Method Detail |
public void addDirtyRegion(IFigure figure, int x, int y, int w, int h)
addDirtyRegion
in class UpdateManager
figure
- the figure that contains the dirty regionx
- the x coordinate of the dirty regiony
- the y coordinate of the dirty regionw
- the width of the dirty regionh
- the height of the dirty regionpublic void addInvalidFigure(IFigure f)
addInvalidFigure
in class UpdateManager
f
- the invalid figureprotected Graphics getGraphics(Rectangle region)
region
- the region to be repainted
public void performUpdate(Rectangle exposed)
performUpdate
in class UpdateManager
exposed
- the exposed regionpublic void performUpdate()
performUpdate
in class UpdateManager
validateFigures()
,
repairDamage()
protected void queueWork()
DeferredUpdateManager.UpdateRequest
using Display.asyncExec(Runnable)
. If work has
already been queued, a new request is not needed.
protected void releaseGraphics(Graphics graphics)
graphics
- the graphics objectprotected void repairDamage()
UpdateManager.firePainting(Rectangle, Map)
, unless there are no dirty regions.
public void setGraphicsSource(GraphicsSource gs)
setGraphicsSource
in class UpdateManager
gs
- the graphics sourcepublic void setRoot(IFigure figure)
setRoot
in class UpdateManager
figure
- the root figureprotected void validateFigures()
UpdateManager.fireValidating()
unless there are no invalid figures.
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |