|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.diagram.ui.view.factories.DiagramViewFactory
This is the bas factory class for all Diagram views, it will
create the Diagram and decorate it using the default
decorations you can subclass it to add more decorations, or customize the
way it looks, like adding new style
DiagramViewFactory.createDiagram(IAdaptable, String, PreferencesHint),
DiagramViewFactory.decorateView(View, IAdaptable, String),
#createStyles()| Constructor Summary | |
DiagramViewFactory()
|
|
| Method Summary | |
Diagram |
createDiagram(IAdaptable semanticAdapter,
java.lang.String diagramKind,
PreferencesHint thePreferencesHint)
factory method, that will be called by the view service to creat the Diagram |
protected java.util.List |
createStyles(View view)
this method is called by @link #createView(IAdaptable, View, String, int, boolean) to create the styles for the view that will be created, you can override this method in you factory sub class to provide additional styles |
protected void |
decorateView(View view,
IAdaptable semanticAdapter,
java.lang.String diagramKind)
This method is responsible for decorating the created view, it get called by the Factory method @link #createView(IAdaptable, View, String, int, boolean), it will intiliaze the view with the default preferences also it will create the default elements of the View if it had any |
protected MeasurementUnit |
getMeasurementUnit()
Clients should override if they wish to initialize their Diagram
to have a different coordinate system then the default Himetric. |
protected PreferencesHint |
getPreferencesHint()
Gets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. |
protected static ViewService |
getViewService()
a utility method to return the view service instance |
protected void |
initializeFromPreferences(View view)
Initialize the newly created view from the preference store, this method get called by @link #decorateView(View, IAdaptable, String) |
protected void |
setPreferencesHint(PreferencesHint preferencesHint)
Sets the preferences hint that is to be used to find the appropriate preference store from which to retrieve diagram preference values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DiagramViewFactory()
| Method Detail |
public Diagram createDiagram(IAdaptable semanticAdapter,
java.lang.String diagramKind,
PreferencesHint thePreferencesHint)
Diagram
createDiagram in interface DiagramFactorysemanticAdapter - semanitc element of the diagram, it can be nulldiagramKind - a semantic hint to reflect the diagram type, it can be emptythePreferencesHint - The preference hint that is to be used to find the appropriate
preference store from which to retrieve diagram preference
values. The preference hint is mapped to a preference store in
the preference registry <@link DiagramPreferencesRegistry>.
protected MeasurementUnit getMeasurementUnit()
Diagram
to have a different coordinate system then the default Himetric.
MeasurementUnit that will be used to initialize the
Diagram object that is being created by the factory.
protected void decorateView(View view,
IAdaptable semanticAdapter,
java.lang.String diagramKind)
View if it had any
view - the view itselfsemanticAdapter - the semantic elemnent of the view (it could be null)diagramKind - the semantic hint of the diagramprotected java.util.List createStyles(View view)
protected void initializeFromPreferences(View view)
view - the view to initializeprotected static ViewService getViewService()
protected PreferencesHint getPreferencesHint()
protected void setPreferencesHint(PreferencesHint preferencesHint)
preferencesHint - the preferences hint
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.