Package org.eclipse.graphiti.platform
Interface IDiagramBehavior
- All Known Subinterfaces:
IDiagramBehaviorUI
- All Known Implementing Classes:
DiagramBehavior
,DiagramBehaviorDummy
public interface IDiagramBehavior
This interface is intended as UI independent base interface for the common
behavior object that describes and implements the behavior of diagrams and
can be reused within all kinds of diagram containers, e.g. editors, views or
plain UI composites.
- Since:
- 0.10
-
Method Summary
Modifier and TypeMethodDescriptionexecuteFeature
(IFeature feature, IContext context) Executes the given feature in the given context using the command stack and editing domain of the diagram behavior object.Returns the associated container visualizing the diagram.org.eclipse.emf.transaction.TransactionalEditingDomain
Gets the transactional editing domain.void
refresh()
Refreshes the complete visualization.void
Refreshes the content of the container (what's shown inside the diagram itself).void
Refreshes the containers's palette.void
Refreshes all rendering decorators for the given pictogram element.
-
Method Details
-
getDiagramContainer
IDiagramContainer getDiagramContainer()Returns the associated container visualizing the diagram.- Returns:
- The associated instance of
IDiagramContainer
.
-
refresh
void refresh()Refreshes the complete visualization. -
refreshPalette
void refreshPalette()Refreshes the containers's palette. -
refreshContent
void refreshContent()Refreshes the content of the container (what's shown inside the diagram itself). -
refreshRenderingDecorators
Refreshes all rendering decorators for the given pictogram element. That means: 1. delete current decorators 2. ask the tool behaviour provider for decorator data 3. create new decorators with this data and render this new decorators- Parameters:
pe
- The pictogram element to refresh the decorators for
-
executeFeature
Executes the given feature in the given context using the command stack and editing domain of the diagram behavior object. In case of an IAddFeature being passed this method will also trigger the selection of the newly added shape.- Parameters:
feature
- The feature to executecontext
- The context object to use with the feature- Returns:
- an object representing the result of the feature call (depends on the concrete implementation)
-
getEditingDomain
org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain()Gets the transactional editing domain.- Returns:
- The transactional editing domain which is used in the behavior object
-