Package org.eclipse.graphiti.dt
Interface IDiagramTypeProvider
- All Superinterfaces:
IExtension,IFeatureProviderHolder
- All Known Implementing Classes:
AbstractDiagramTypeProvider,DummyExportAsImageDiagramTypeProvider
The Interface IDiagramTypeProvider is the central interface from the Graphiti
framework to the diagram type agent. Do not implement this class directly.
Extend appropriate classes instead. This is the first revision of the diagram
type interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Dispose.Get the list of available tool behaviour providers.Gets the context id.intGets the current tool behaviour provider.Returns the diagram.Returns the current diagram behavior instance.Returns the diagram title.Gets the graphics algorithm renderer factory.Returns the notification service.Object[]getRelatedBusinessObjects(Object[] bos) Gets the related business objects.voidinit(Diagram diagram, IDiagramBehavior diagramBehavior) Implement this method to initialize the diagram type provider.booleanReturns the editor's update behaviour on reset.booleanReturns the editor's update behaviour.booleanReturns the editor's update behaviour when the editor is saved.booleanReturns the editor's update behaviour at startup.voidpostInit()This method will be called after this diagram type provider has been completely initialised.voidresourceReloaded(Diagram diagram) This method will be called if the underlying resource which contains the diagram has been reloaded.voidresourcesSaved(Diagram diagram, org.eclipse.emf.ecore.resource.Resource[] savedResources) This method will be called by the DiagramEditor when a diagram has been saved.voidsetContextId(String contextId) Sets the context id.voidsetCurrentToolBehaviorIndex(int index) Methods inherited from interface org.eclipse.graphiti.platform.IExtension
getProviderId, setProviderIdMethods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
-
Method Details
-
init
Implement this method to initialize the diagram type provider.- Parameters:
diagram- the currently opened diagramdiagramEditor-- Since:
- 0.10
-
getDiagram
Diagram getDiagram()Returns the diagram.- Returns:
- the currently opened diagram
-
getNotificationService
INotificationService getNotificationService()Returns the notification service.- Returns:
- the notification service
-
getAvailableToolBehaviorProviders
IToolBehaviorProvider[] getAvailableToolBehaviorProviders()Get the list of available tool behaviour providers.- Returns:
- the list of tool behaviour providers
- See Also:
-
getCurrentToolBehaviorProvider
IToolBehaviorProvider getCurrentToolBehaviorProvider()Gets the current tool behaviour provider.- Returns:
- the currently active tool behaviour provider
- See Also:
-
getDiagramTitle
String getDiagramTitle()Returns the diagram title.- Returns:
- the diagram-title, e.g. this will be used for the title-bar of the editor
-
isAutoUpdateAtStartup
boolean isAutoUpdateAtStartup()Returns the editor's update behaviour at startup.- Returns:
- true if diagram should be updated (if needed) immediately after open in editor - editor will be dirty then; false if diagram should not be updated - editor not dirty but eventually red at out of date areas
-
isAutoUpdateAtRuntime
boolean isAutoUpdateAtRuntime()Returns the editor's update behaviour. This flag controls if a diagram editor will update its contents (call theupdate featureof thePictogramElements changes are indicated for.
Note that the update will only be triggered in case the editor is already dirty, seeisAutoUpdateAtRuntimeWhenEditorIsSaved().- Returns:
- true if diagram should be updated automatically (only if editor is already dirty)
-
isAutoUpdateAtRuntimeWhenEditorIsSaved
boolean isAutoUpdateAtRuntimeWhenEditorIsSaved()Returns the editor's update behaviour when the editor is saved. This method is only called whenisAutoUpdateAtRuntime()returnstrueand the editor is not dirty. In case this method returnstruethe editor will do an update; this will usually cause the editor to get dirty.- Returns:
- true if diagram should be updated automatically (only if editor is already dirty)
- Since:
- 0.9
-
isAutoUpdateAtReset
boolean isAutoUpdateAtReset()Returns the editor's update behaviour on reset.- Returns:
- true if diagram should be updated automatically if editor is already dirty and the user chooses to discard his changes (reset of the diagram) when a change from outside of the editor happens.
-
getDiagramBehavior
IDiagramBehavior getDiagramBehavior()Returns the current diagram behavior instance.- Returns:
- The current
IDiagramBehavior - Since:
- 0.10
-
dispose
void dispose()Dispose. -
getRelatedBusinessObjects
Gets the related business objects.- Parameters:
bos- the business objects- Returns:
- the related business objects
-
getGraphicsAlgorithmRendererFactory
IGraphicsAlgorithmRendererFactory getGraphicsAlgorithmRendererFactory()Gets the graphics algorithm renderer factory.- Returns:
- the graphics algorithm renderer factory
-
postInit
void postInit()This method will be called after this diagram type provider has been completely initialised. The state of the using diagram editor can not be predicted. -
getCurrentToolBehaviorIndex
int getCurrentToolBehaviorIndex()- Since:
- 0.9
-
setCurrentToolBehaviorIndex
void setCurrentToolBehaviorIndex(int index) -
resourceReloaded
This method will be called if the underlying resource which contains the diagram has been reloaded.- Parameters:
diagram-
-
resourcesSaved
This method will be called by the DiagramEditor when a diagram has been saved.- Parameters:
diagram- The diagram for which the editor has been savedsavedResources- The resources that have been saved
-
getContextId
String getContextId()Gets the context id.- Returns:
- the context id
- Since:
- 0.10
-
setContextId
Sets the context id.- Parameters:
contextId- the new context id- Since:
- 0.10
-