|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature
org.eclipse.graphiti.pattern.CreateConnectionFeatureForPattern
public class CreateConnectionFeatureForPattern
This feature wraps the create functionality of a pattern for calls of the Graphiti framework. Clients should not need to use this class directly.
| Field Summary | |
|---|---|
private IConnectionPattern |
delegate
|
| Constructor Summary | |
|---|---|
CreateConnectionFeatureForPattern(IFeatureProvider featureProvider,
IConnectionPattern pattern)
Creates a new CreateConnectionFeatureForPattern. |
|
| Method Summary | |
|---|---|
void |
attachedToSource(ICreateConnectionContext context)
Will called after a connection was successfully attached to an anchor of a source object. Note: In contrast to the standard feature methods like ICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
void |
canceledAttaching(ICreateConnectionContext context)
Will called if the connection creation process was canceled after the successful attachment of the connection to an anchor of a source object. |
boolean |
canCreate(ICreateConnectionContext context)
Can create. |
boolean |
canRedo(IContext context)
Decides if the processed feature can be re-done. |
boolean |
canStartConnection(ICreateConnectionContext context)
Can start connection. |
boolean |
canUndo(IContext context)
Decides if the current feature can be undone - this is the undo of the execute operation. |
Connection |
create(ICreateConnectionContext context)
Creates the connection. |
void |
endConnecting()
Will called after a connection creation tool from the palette was deselected. Note: In contrast to the standard feature methods like ICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
String |
getCreateImageId()
Gets the create image id. |
String |
getCreateLargeImageId()
Gets the create large image id. |
IConnectionPattern |
getPattern()
Gets the pattern. |
void |
redo(IContext context)
This method will be called to actually do the work needed for redo. |
void |
startConnecting()
Will called after a connection creation tool from the palette was selected. Note: In contrast to the standard feature methods like ICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
void |
undo(IContext context)
This method will be called to actually do the work needed for undo. |
| Methods inherited from class org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature |
|---|
canExecute, execute, getCreateDescription, getCreateName, getName |
| Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
|---|
addGraphicalRepresentation, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramBehavior, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, manageFont, manageFont, setProgressCallback, toString, updatePictogramElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.graphiti.features.IFeature |
|---|
hasDoneChanges, isAvailable |
| Methods inherited from interface org.eclipse.graphiti.IDescription |
|---|
getDescription |
| Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
|---|
getFeatureProvider |
| Field Detail |
|---|
private IConnectionPattern delegate
| Constructor Detail |
|---|
public CreateConnectionFeatureForPattern(IFeatureProvider featureProvider,
IConnectionPattern pattern)
CreateConnectionFeatureForPattern.
featureProvider - the feature providerpattern - the connection pattern| Method Detail |
|---|
public boolean canCreate(ICreateConnectionContext context)
ICreateConnection
canCreate in interface ICreateConnectioncontext - the context
public boolean canStartConnection(ICreateConnectionContext context)
ICreateConnection
canStartConnection in interface ICreateConnectioncontext - the context
public Connection create(ICreateConnectionContext context)
ICreateConnection
create in interface ICreateConnectioncontext - the context
null in case
no valid connection can be returned. Currently this return value
is not evaluated by the Graphiti framework but it might be used
in future versions but only for performance optimizations.public String getCreateImageId()
ICreateInfo
getCreateImageId in interface ICreateInfogetCreateImageId in class AbstractCreateConnectionFeaturepublic String getCreateLargeImageId()
ICreateInfo
getCreateLargeImageId in interface ICreateInfogetCreateLargeImageId in class AbstractCreateConnectionFeaturepublic boolean canUndo(IContext context)
IFeature
canUndo in interface ICustomUndoableFeaturecanUndo in interface IFeaturecanUndo in class AbstractFeaturecontext - this is the general input for this method
IContextpublic void undo(IContext context)
ICustomUndoableFeature
undo in interface ICustomUndoableFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic boolean canRedo(IContext context)
ICustomUndoableFeature
Note that as soon as any feature reports false here, also
all consecutive entries in the command stack are no longer reachable for
redo.
canRedo in interface ICustomUndoableFeaturecontext - this is the instance of the IContext object that was
in use when executing the feature
public void redo(IContext context)
ICustomUndoableFeature
redo in interface ICustomUndoableFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic void startConnecting()
ICreateConnectionICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. In case you want to modify the model
(EMF domain objects or Graphiti pictogram objects) you need to do that
within a command executed on the editor's command stack to make sure that
the modification happens inside an EMF write transaction. Keep in mind
that any changes you do within such a command will be create a seperate
entry in the undo/redo stack for the editor, which might not be the
desired effect.
startConnecting in interface ICreateConnectionstartConnecting in class AbstractCreateConnectionFeaturepublic void endConnecting()
ICreateConnectionICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. In case you want to modify the model
(EMF domain objects or Graphiti pictogram objects) you need to do that
within a command executed on the editor's command stack to make sure that
the modification happens inside an EMF write transaction. Keep in mind
that any changes you do within such a command will be create a seperate
entry in the undo/redo stack for the editor, which might not be the
desired effect.
endConnecting in interface ICreateConnectionendConnecting in class AbstractCreateConnectionFeaturepublic void attachedToSource(ICreateConnectionContext context)
ICreateConnectionICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. In case you want to modify the model
(EMF domain objects or Graphiti pictogram objects) you need to do that
within a command executed on the editor's command stack to make sure that
the modification happens inside an EMF write transaction. Keep in mind
that any changes you do within such a command will be create a seperate
entry in the undo/redo stack for the editor, which might not be the
desired effect.
attachedToSource in interface ICreateConnectionattachedToSource in class AbstractCreateConnectionFeaturecontext - the contextpublic void canceledAttaching(ICreateConnectionContext context)
ICreateConnectionICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. In case you want to modify the model
(EMF domain objects or Graphiti pictogram objects) you need to do that
within a command executed on the editor's command stack to make sure that
the modification happens inside an EMF write transaction. Keep in mind
that any changes you do within such a command will be create a seperate
entry in the undo/redo stack for the editor, which might not be the
desired effect.
canceledAttaching in interface ICreateConnectioncanceledAttaching in class AbstractCreateConnectionFeaturecontext - the contextpublic IConnectionPattern getPattern()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||