org.eclipse.graphiti.dt
Interface IDiagramTypeProvider

All Superinterfaces:
IExtension, IFeatureProviderHolder
All Known Implementing Classes:
AbstractDiagramTypeProvider

public interface IDiagramTypeProvider
extends IExtension, IFeatureProviderHolder

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
 void dispose()
          Dispose.
 IToolBehaviorProvider[] getAvailableToolBehaviorProviders()
          Get the list of available tool behaviour providers.
 int getCurrentToolBahaviorIndex()
           
 IToolBehaviorProvider getCurrentToolBehaviorProvider()
          Gets the current tool behaviour provider.
 Diagram getDiagram()
          Returns the diagram.
 IDiagramEditor getDiagramEditor()
          Returns the current diagram editor.
 java.lang.String getDiagramTitle()
          Returns the diagram title.
 IGraphicsAlgorithmRendererFactory getGraphicsAlgorithmRendererFactory()
          Gets the graphics algorithm renderer factory.
 INotificationService getNotificationService()
          Returns the notification service.
 java.lang.Object[] getRelatedBusinessObjects(java.lang.Object[] bos)
          Gets the related business objects.
 void init(Diagram diagram, IDiagramEditor diagramEditor)
          Implement this method to initialise the diagram type provider.
 boolean isAutoUpdateAtReset()
          Returns the editor's update behaviour on reset.
 boolean isAutoUpdateAtRuntime()
          Returns the editor's update behaviour.
 boolean isAutoUpdateAtStartup()
          Returns the editor's update behaviour at startup.
 void postInit()
          This method will be called after this diagram type provider has been completely initialised.
 void resourceReloaded(Diagram diagram)
          This method will be called if the underlying resource which contains the diagram has been reloaded.
 void setCurrentToolBahaviorIndex(int index)
           
 
Methods inherited from interface org.eclipse.graphiti.platform.IExtension
getProviderId, setProviderId
 
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
 

Method Detail

init

void init(Diagram diagram,
          IDiagramEditor diagramEditor)
Implement this method to initialise the diagram type provider.

Parameters:
diagram - the currently opened diagram
diagramEditor - TODO

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:
IToolBehaviorProvider

getCurrentToolBehaviorProvider

IToolBehaviorProvider getCurrentToolBehaviorProvider()
Gets the current tool behaviour provider.

Returns:
the currently active tool behaviour provider
See Also:
IToolBehaviorProvider

getDiagramTitle

java.lang.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.

Returns:
true if diagram should be updated automatically (only if editor is already dirty)

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.

getDiagramEditor

IDiagramEditor getDiagramEditor()
Returns the current diagram editor.

Returns:
current diagram editor

dispose

void dispose()
Dispose.


getRelatedBusinessObjects

java.lang.Object[] getRelatedBusinessObjects(java.lang.Object[] bos)
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.


getCurrentToolBahaviorIndex

int getCurrentToolBahaviorIndex()

setCurrentToolBahaviorIndex

void setCurrentToolBahaviorIndex(int index)

resourceReloaded

void resourceReloaded(Diagram diagram)
This method will be called if the underlying resource which contains the diagram has been reloaded.

Parameters:
diagram -


Copyright (c) SAP AG 2005, 2010.