|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.graphiti.ui.editor.DefaultRefreshBehavior
public class DefaultRefreshBehavior
The default implementation for the DiagramBehavior behavior extension
that controls the refresh behavior of the Graphiti diagram editor. Clients
may subclass to change the behavior; use
DiagramBehavior.createRefreshBehavior() to return the instance that
shall be used.
Note that there is always a 1:1 relation with a DiagramBehavior.
| Field Summary | |
|---|---|
protected DiagramBehavior |
diagramBehavior
The associated DiagramBehavior. |
private RefreshPerformanceCache |
refreshPerformanceCache
|
| Constructor Summary | |
|---|---|
DefaultRefreshBehavior(DiagramBehavior diagramBehavior)
Creates a new standard refresh behaviour for a Graphiti diagram editor. |
|
| Method Summary | |
|---|---|
protected void |
autoUpdate()
Handles the auto update of the editor and triggers an update of the Diagram by delegating to the IUpdateFeature registered
for the Diagram. |
private RefreshPerformanceCache |
getRefreshPerformanceCache()
|
void |
handleAutoUpdateAtReset()
Handles the auto update at rest of the editor (the editor performs a reload of the EMF resources because e.g. |
void |
handleAutoUpdateAtStartup()
Handles the auto update at startup of the editor and is called by the Graphiti DiagramBehavior when the input is set (
DiagramBehavior#setInput(org.eclipse.ui.IEditorInput)). |
void |
initRefresh()
Initializes the performance cache and is called by the Graphiti framework before a refresh is triggered. |
void |
internalRefreshEditPart(EditPart editPart)
Internal refresh of a given EditPart. |
boolean |
isAutoRefresh()
Returns if auto refresh is enabled or not. |
boolean |
isMultipleRefreshSupressionActive()
Returns if multiple refreshes shall be omitted and a bundled refresh should happen instead. |
void |
refresh()
Does the refresh of the editor, so that the UI reflects the current state of the Graphiti pictograms model. |
protected void |
refresh(PictogramElement pe)
Refreshes the given PictogramElement so that the UI reflects the
current state in the Graphiti pictograms model. |
void |
refreshRenderingDecorators(PictogramElement pe)
Refreshes all rendering decorators for the given PictogramElement
as defined in
IToolBehaviorProvider.getDecorators(PictogramElement). |
boolean |
shouldRefresh(Object obj)
Checks the performance cache if a refresh shall be triggered for the given object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final DiagramBehavior diagramBehavior
DiagramBehavior. Set on construction of this class.
private RefreshPerformanceCache refreshPerformanceCache
| Constructor Detail |
|---|
public DefaultRefreshBehavior(DiagramBehavior diagramBehavior)
DiagramBehavior is closely linked to this instance (1:1
relation) and both instances will have a common lifecycle.
diagramEditor - The associated DiagramBehavior.| Method Detail |
|---|
public void initRefresh()
public void handleAutoUpdateAtStartup()
DiagramBehavior when the input is set (
DiagramBehavior#setInput(org.eclipse.ui.IEditorInput)). The
default implementation checks the desired behavior as defined in
IDiagramTypeProvider.isAutoUpdateAtStartup() and calls
#autoUpdate(Diagram, IDiagramTypeProvider) in case an update
shall be done.
public void handleAutoUpdateAtReset()
DiagramBehavior after the Diagram has been reloaded. The
default implementation checks the desired behavior as defined in
IDiagramTypeProvider.isAutoUpdateAtReset() and calls
#autoUpdate(Diagram, IDiagramTypeProvider) in case an update
shall be done.
protected void autoUpdate()
Diagram by delegating to the IUpdateFeature registered
for the Diagram. In the end refresh() is called to
reflect the update in the editor UI. This method is called by
handleAutoUpdateAtStartup() and
handleAutoUpdateAtReset().
public void refresh()
protected void refresh(PictogramElement pe)
PictogramElement so that the UI reflects the
current state in the Graphiti pictograms model.
pe - the PictogramElement to refreshpublic void refreshRenderingDecorators(PictogramElement pe)
PictogramElement
as defined in
IToolBehaviorProvider.getDecorators(PictogramElement).
pe - the PictogramElement to refresh the decorators forpublic void internalRefreshEditPart(EditPart editPart)
EditPart.
editPart - the edit part to refreshpublic boolean isAutoRefresh()
The default implementation here simply returns true.
public boolean isMultipleRefreshSupressionActive()
Figures.
The default implementation simply returns true. Note:
returning false here might have large performance implications, so use
this option only with extra care!
public boolean shouldRefresh(Object obj)
private RefreshPerformanceCache getRefreshPerformanceCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||