|
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.AbstractViewFactory
org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory
This is the base factory class for all Node views, it will create the view 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
#createView(IAdaptable, View, String, int, boolean, String),
BasicNodeViewFactory.decorateView(View, View, IAdaptable, String, int, boolean),
AbstractViewFactory.createStyles(View)| Constructor Summary | |
BasicNodeViewFactory()
|
|
| Method Summary | |
protected LayoutConstraint |
createLayoutConstraint()
Method used to create the layout constraint that will get set on the created view. |
protected Node |
createNode()
method to create the Notation meta model Node
object that represents the view, you can override this method in your
own factories to create you own node while extends the Node class
this method is invoked by @link #createView(IAdaptable, View, String, int, boolean) |
View |
createView(IAdaptable semanticAdapter,
View containerView,
java.lang.String semanticHint,
int index,
boolean persisted,
PreferencesHint preferencesHint)
factory method, that will be called by the view service to creat the view |
protected void |
decorateView(View containerView,
View view,
IAdaptable semanticAdapter,
java.lang.String semanticHint,
int index,
boolean persisted)
This method is responsible for decorating the created view, it get called by the Factory method |
protected static boolean |
isUnProtectedSilentTransactionInProgress(org.eclipse.emf.transaction.TransactionalEditingDomain domain)
Checks if the current active transaction is a unprotected amd silent |
| Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractViewFactory |
createStyles, getEditingDomain, getPreferencesHint, getViewService, initializeFromPreferences, requiresElement, requiresElement, setPreferencesHint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicNodeViewFactory()
| Method Detail |
public View createView(IAdaptable semanticAdapter,
View containerView,
java.lang.String semanticHint,
int index,
boolean persisted,
PreferencesHint preferencesHint)
createView in interface ViewFactorycreateView in class AbstractViewFactorysemanticAdapter - semanitc element of the view, it can be nullcontainerView - the view to contain the connectionsemanticHint - a semantic hint to reflect the view type, it can be emptyindex - position with parent's child collectionpersisted - persisted flag, this will indicate if the created view
will be a presisted or transient view, transient views never get serialized
protected void decorateView(View containerView,
View view,
IAdaptable semanticAdapter,
java.lang.String semanticHint,
int index,
boolean persisted)
containerView - the container of the viewview - the view itselfsemanticAdapter - the semantic elemnent of the view (it could be null)semanticHint - the semantic hint of the viewindex - the index of the viewpersisted - flag indicating the the view was created as persisted or notprotected LayoutConstraint createLayoutConstraint()
protected Node createNode()
Node
object that represents the view, you can override this method in your
own factories to create you own node while extends the Node class
this method is invoked by @link #createView(IAdaptable, View, String, int, boolean)
Nodeprotected static boolean isUnProtectedSilentTransactionInProgress(org.eclipse.emf.transaction.TransactionalEditingDomain domain)
domain - , the domain to use during the check
true if the current active transaction is unprotected and silent
|
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.