|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.graphiti.pattern.AbstractBasePattern
org.eclipse.graphiti.pattern.AbstractPattern
public abstract class AbstractPattern
This is the base class AbstractConnectionPattern that clients writing a pattern for a shape domain object should subclass.
| Field Summary | |
|---|---|
protected static String[] |
EMPTY_STRING_ARRAY
An empty string array used in direct editing. |
private IPatternConfiguration |
patternConfiguration
|
private IDeleteFeature |
wrappedDeleteFeature
To avoid code duplication, this base class uses a wrapped default implementation of an IDeleteFeature to provide the default
deletion behaviour. |
private IRemoveFeature |
wrappedRemoveFeature
To avoid code duplication, this base class uses a wrapped default implementation of an IRemoveFeature to provide the default
removal behavior. |
| Fields inherited from interface org.eclipse.graphiti.func.ICreate |
|---|
EMPTY |
| Fields inherited from interface org.eclipse.graphiti.func.IDirectEditing |
|---|
TYPE_CUSTOM, TYPE_DROPDOWN, TYPE_DROPDOWN_READ_ONLY, TYPE_MULTILINETEXT, TYPE_NONE, TYPE_TEXT |
| Constructor Summary | |
|---|---|
AbstractPattern()
Creates a new AbstractPattern. |
|
AbstractPattern(IPatternConfiguration patternConfiguration)
Creates a new AbstractPattern holding the given
IPatternConfiguration. |
|
| Method Summary | |
|---|---|
protected void |
addGraphicalRepresentation(IAreaContext context,
Object newObject)
Adds the graphical representation of the given new Object with
the information in the given IAreaContext. |
protected boolean |
avoidNegativeCoordinates()
Clients can override to indicate that moving to negative coordinates should be possible. |
boolean |
canCreate(ICreateContext context)
Clients must override this method to indicate that the pattern can be used to create domain objects as defined in the given ICreateContext. |
boolean |
canDelete(IDeleteContext context)
Clients can override to modify the default behavior if the pattern can (and wants to) handle a delete request. |
boolean |
canDirectEdit(IDirectEditingContext context)
Clients can override this method to indicate that the pattern allows direct editing for the shape described in the passed IDirectEditingContext. |
boolean |
canLayout(ILayoutContext context)
Clients may override this method to indicate that the pattern can be used to layout a shape for a domain objects as defined in the given ILayoutContext. |
boolean |
canMoveShape(IMoveShapeContext context)
Clients may override this method to indicate that the pattern can be used to move the shape of a domain objects as defined in the given IMoveShapeContext. |
boolean |
canRemove(IRemoveContext context)
Clients can override to modify the default behavior if the pattern can (and wants to) handle a remove request. |
boolean |
canResizeShape(IResizeShapeContext context)
Clients may override this method to indicate that the pattern can be used to resize the shape of a domain objects as defined in the given IResizeShapeContext. |
boolean |
canUpdate(IUpdateContext context)
Clients may override this method to indicate that the pattern can be used to update the shape of a domain objects as defined in the given IUpdateContext. |
String |
checkValueValid(String value,
IDirectEditingContext context)
This method will be called by the framework to check if the passed String is valid as new value for the shape. |
void |
completeInfo(IDirectEditingInfo info,
Object bo)
Clients can override to complete the IDirectEditingInfo info. |
void |
completeInfo(IDirectEditingInfo info,
Object bo,
String keyProperty)
Clients can override to complete the IDirectEditingInfo info. |
String |
completeValue(String value,
int caretPos,
String chosenValue,
IDirectEditingContext context)
Can be overridden by clients to define completion functionality for direct editing. |
Object[] |
create(ICreateContext context)
Clients must override this method to implement the functionality to create a new domain object as defined in the given ICreateContext
. |
protected IDeleteFeature |
createDeleteFeature(IDeleteContext context)
Creates the IDeleteFeature instance that handles the deletion of
business objects and diagram elements. |
protected IRemoveFeature |
createRemoveFeature(IRemoveContext context)
Creates the IRemoveFeature instance that handles the removal of
diagram elements. |
void |
delete(IDeleteContext context)
Clients can override to modify the default delete behavior. |
private List<Anchor> |
getAnchors(ContainerShape containerShape)
|
String |
getCreateDescription()
Client should override to return a string description of the type of domain object that is created with this pattern. |
String |
getCreateImageId()
Client should override to return a string id of the the image icon for the domain object that is created with this pattern. |
String |
getCreateLargeImageId()
Client should override to return a string id of the the large image icon for the domain object that is created with this pattern. |
String |
getCreateName()
Client should override to return the name of the domain object that is created with this pattern. |
int |
getEditingType()
The Graphiti framework calls this method to decide which UI to show up for direct editing. |
String |
getInitialValue(IDirectEditingContext context)
Provides the initial value for display in the newly opened text editing UI component. |
protected IPatternConfiguration |
getPatternConfiguration()
Returns the IPatternConfiguration instance used within this
pattern or null in case none is used. |
String[] |
getPossibleValues(IDirectEditingContext context)
This value will be used if the cell editor is a combo box. |
IProposalSupport |
getProposalSupport()
The direct editing mode contains controls for code completion and the selection from a combo box. |
IResizeConfiguration |
getResizeConfiguration(IResizeShapeContext context)
Clients may override to modify the resize behavior. |
String[] |
getValueProposals(String value,
int caretPos,
IDirectEditingContext context)
This proposals will be used for the completion list of a simple text cell editor. |
boolean |
hasDoneChanges(Class<?> actionType)
Is queried by the framework after a pattern has been executed to find out if this pattern should appear in the undo stack. |
protected void |
internalMove(IMoveShapeContext context)
Default implementation of the move functionality. |
boolean |
isAutoCompletionEnabled()
Checks if auto completion is enabled. |
boolean |
isCompletionAvailable()
Checks if completion is available. |
boolean |
isDeleteAbort()
The Graphiti framework will call this method after IDelete.preDelete(IDeleteContext) has been called and before the actual
delete is done. |
abstract boolean |
isMainBusinessObjectApplicable(Object mainBusinessObject)
Clients must override this method to indicate that the pattern uses the given domain object as its main domain object. |
boolean |
isPaletteApplicable()
Is queried by the Graphiti framework to check if the pattern should create a new domain object entry in the editor palette. |
protected abstract boolean |
isPatternControlled(PictogramElement pictogramElement)
This method must be implemented by clients to indicate that the given PictogramElement is controlled by this pattern. |
protected abstract boolean |
isPatternRoot(PictogramElement pictogramElement)
This method must be implemented by clients to indicate that the given PictogramElement is the root shape of this pattern. |
boolean |
isRemoveAbort()
The Graphiti framework will call this method after IRemove.preRemove(IRemoveContext) has been called and before the actual
remove is done. |
boolean |
layout(ILayoutContext context)
Clients can override this method to implement the functionality to layout a shape for the given domain object as defined in the given ILayoutContext . |
protected void |
layoutPictogramElement(PictogramElement pe)
Helper method that triggers a layout of the given PictogramElement. |
protected void |
moveAllBendpoints(IMoveShapeContext context)
Default implementation of the move functionality to move all bendpoints within a container shape. |
void |
moveShape(IMoveShapeContext context)
Clients can override this method to implement the functionality to move a shape for the given domain object as defined in the given IMoveShapeContext . |
void |
postDelete(IDeleteContext context)
Clients can override to add actions after the default delete behavior is triggered. |
protected void |
postMoveShape(IMoveShapeContext context)
Hook clients can override to add additional steps after the move of the shape happened. |
void |
postRemove(IRemoveContext context)
Clients can override to add actions after the default remove behavior is triggered. |
void |
preDelete(IDeleteContext context)
Clients can override to add actions before the default delete behavior is triggered. |
protected void |
preMoveShape(IMoveShapeContext context)
Hook clients can override to add additional steps before the move of the shape happens. |
void |
preRemove(IRemoveContext context)
Clients can override to add actions before the default remove behavior is triggered. |
void |
remove(IRemoveContext context)
Clients can override to modify the default remove behavior. |
void |
resizeShape(IResizeShapeContext context)
Clients can override this method to implement the functionality to resize a shape for the given domain object as defined in the given IResizeShapeContext . |
protected void |
setPatternConfiguration(IPatternConfiguration patternConfiguration)
Sets the IPatternConfiguration instance to be used with this
pattern. |
void |
setValue(String value,
IDirectEditingContext context)
Set the new value after direct editing is finished. |
boolean |
stretchFieldToFitText()
Defines if the input field should be streched to fit its contents. |
boolean |
update(IUpdateContext context)
Clients can override this method to implement the functionality to update a shape for the given domain object as defined in the given IUpdateContext. |
IReason |
updateNeeded(IUpdateContext context)
Clients can override this method to indicate if an update of a shape for the given domain object as defined in the given IUpdateContext
needs to be triggered. |
protected void |
updatePictogramElement(PictogramElement pe)
Helper method that triggers an update of the given PictogramElement. |
| Methods inherited from class org.eclipse.graphiti.pattern.AbstractBasePattern |
|---|
add, canAdd, getBusinessObjectForPictogramElement, getDiagram, getDiagramBehavior, getFeatureProvider, getMappingProvider, link, link, manageColor, manageColor, manageFont, manageFont, setFeatureProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.graphiti.pattern.IPattern |
|---|
add, canAdd, setFeatureProvider |
| Field Detail |
|---|
protected static final String[] EMPTY_STRING_ARRAY
private IPatternConfiguration patternConfiguration
private IDeleteFeature wrappedDeleteFeature
IDeleteFeature to provide the default
deletion behaviour. Subclasses may decide to either override
createDeleteFeature(IDeleteContext) to provide another
IDeleteFeature implementation or override and extend the
individual IDelete methods or return a IDeleteFeature by
overriding the method
DefaultFeatureProviderWithPatterns.getDeleteFeature(IDeleteContext)
.
private IRemoveFeature wrappedRemoveFeature
IRemoveFeature to provide the default
removal behavior. Subclasses may decide to either override
createRemoveFeature(IRemoveContext) to provide another
IRemoveFeature implementation or override and extend the
individual IRemove methods or return a IRemoveFeature by
overriding the method
DefaultFeatureProviderWithPatterns.getRemoveFeature(IRemoveContext)
.
| Constructor Detail |
|---|
public AbstractPattern(IPatternConfiguration patternConfiguration)
AbstractPattern holding the given
IPatternConfiguration.
patternConfiguration - The pattern configuration to use within this pattern instance
of null in case no configuration is needed.public AbstractPattern()
AbstractPattern. This is a convenience method for
patterns working without any configuration.
| Method Detail |
|---|
public boolean isPaletteApplicable()
isPaletteApplicable in interface IPatterntrue in case a palette entry shall be created,
false otherwise.public boolean canCreate(ICreateContext context)
ICreateContext. Corresponds to the method
ICreate.canCreate(ICreateContext) . The default
implementation simply returns false.
canCreate in interface ICreatecontext - The context holding information on the domain object to be
created.
true in case this pattern can create such a domain
object, false otherwise.public boolean canLayout(ILayoutContext context)
ILayoutContext. Corresponds to the method
ILayout.canLayout(ILayoutContext). The default
implementation checks if the PictogramElement in the given
context isPatternControlled(PictogramElement).
canLayout in interface ILayoutcontext - The context holding information on the domain object to be
layouted.
true in case this pattern can layout a shape for
such a domain object, false otherwise.public boolean canMoveShape(IMoveShapeContext context)
IMoveShapeContext. Corresponds to the method
DefaultMoveShapeFeature.canMoveShape(IMoveShapeContext). The
default implementation checks if the PictogramElement in the
given context isPatternControlled(PictogramElement) and the
source and target containers of the shape are the same.
canMoveShape in interface IMoveShapecontext - The context holding information on the domain object to be
moved.
true in case this pattern can move a shape for such
a domain object, false otherwise.public boolean canResizeShape(IResizeShapeContext context)
IResizeShapeContext. Corresponds to the method
DefaultResizeShapeFeature.canResizeShape(IResizeShapeContext).
The default implementation checks if the PictogramElement in the
given context fulfills isPatternRoot(PictogramElement).
canResizeShape in interface IResizeShapecontext - The context holding information on the domain object to be
resized.
true in case this pattern can resize a shape for
such a domain object, false otherwise.public boolean canUpdate(IUpdateContext context)
IUpdateContext. Corresponds to the method
IUpdate.canUpdate(IUpdateContext). The default
implementation checks if the PictogramElement in the given
context isPatternControlled(PictogramElement).
canUpdate in interface IUpdatecontext - The context holding information on the domain object to be
updated.
true in case this pattern can update a shape for
such a domain object, false otherwise.public Object[] create(ICreateContext context)
ICreateContext
. Corresponds to the method
ICreate.create(ICreateContext). The default
implementation simply does nothing and returns an empty object array.
create in interface ICreatecontext - The context holding information on the domain object to be
created.
public String getCreateDescription()
null
which indicates that no tooltip shall be displayed.
getCreateDescription in interface ICreateInfogetCreateDescription in interface IPatternString holding the tooltippublic String getCreateImageId()
null which indicates that no icon shall be displayed.
getCreateImageId in interface ICreateInfoString holding the id of the icon as defined in the
AbstractImageProvider.public String getCreateLargeImageId()
null which indicates that no icon shall be displayed.
getCreateLargeImageId in interface ICreateInfoString holding the id of the large icon as defined in
the AbstractImageProvider.public String getCreateName()
null which results in an empty
entry in the palette.
getCreateName in interface ICreateInfogetCreateName in interface IPatternString holding the name of the domain object.public abstract boolean isMainBusinessObjectApplicable(Object mainBusinessObject)
isMainBusinessObjectApplicable in interface IPatternmainBusinessObject - The object to check if it is the main domain object of the
pattern.
true in case the pattern has the given domain object
as its main domain object, false otherwise.public boolean layout(ILayoutContext context)
ILayoutContext . Corresponds to the method
ILayout.layout(ILayoutContext). The default
implementation simply does nothing and returns false as
indication of this.
layout in interface ILayoutcontext - The context holding information on the domain object to be
layouted.
true in case a layout happened and
false in case none happened. Is used by the Graphiti
framework for performance optimization.public void moveShape(IMoveShapeContext context)
IMoveShapeContext . Corresponds to the method
DefaultMoveShapeFeature.moveShape(IMoveShapeContext).
moveShape in interface IMoveShapecontext - The context holding information on the domain object to be
moved.protected void postMoveShape(IMoveShapeContext context)
context - The context holding information on the domain object that was
moved.protected void preMoveShape(IMoveShapeContext context)
context - The context holding information on the domain object to be
moved.protected void internalMove(IMoveShapeContext context)
context - The context holding information on the domain object to be
moved.protected void moveAllBendpoints(IMoveShapeContext context)
context - The context holding information on the domain object to be
moved.private List<Anchor> getAnchors(ContainerShape containerShape)
public void resizeShape(IResizeShapeContext context)
IResizeShapeContext . Corresponds to the method
DefaultResizeShapeFeature.resizeShape(IResizeShapeContext).
resizeShape in interface IResizeShapecontext - The context holding information on the domain object to be
resized.public boolean update(IUpdateContext context)
IUpdateContext. Corresponds to the method
IUpdate.update(IUpdateContext).
update in interface IUpdatecontext - The context holding information on the domain object to be
updated.
public IReason updateNeeded(IUpdateContext context)
IUpdateContext
needs to be triggered. Corresponds to the method
IUpdate.updateNeeded(IUpdateContext).
updateNeeded in interface IUpdatecontext - The context holding information on the domain object to be
updated.
protected void addGraphicalRepresentation(IAreaContext context,
Object newObject)
Object with
the information in the given IAreaContext.
context - The area context defining where the new object should placednewObject - The new object instance itselfprotected boolean avoidNegativeCoordinates()
true in case moving a shape to negative coordinates
should be possible, false otherwise.protected abstract boolean isPatternControlled(PictogramElement pictogramElement)
PictogramElement is controlled by this pattern.
pictogramElement - The pictogram element to check
true in case the pictogram element is controlled by
this pattern, false otherwise.protected abstract boolean isPatternRoot(PictogramElement pictogramElement)
PictogramElement is the root shape of this pattern.
pictogramElement - The pictogram element to check
true in case the pictogram element is the root shape
of this pattern, false otherwise.protected void layoutPictogramElement(PictogramElement pe)
PictogramElement. The default implementation queries the feature
provider and tries to find a functionality either in the pattern of an
additional AbstractLayoutFeature that can handle the request and
triggers the operation.
pe - The pictogram element to layoutprotected void updatePictogramElement(PictogramElement pe)
PictogramElement. The default implementation queries the feature
provider and tries to find a functionality either in the pattern of an
additional AbstractUpdateFeature that can handle the request and
triggers the operation.
pe - The pictogram element to updateprotected void setPatternConfiguration(IPatternConfiguration patternConfiguration)
IPatternConfiguration instance to be used with this
pattern.
patternConfiguration - The new patternConfigurationprotected IPatternConfiguration getPatternConfiguration()
IPatternConfiguration instance used within this
pattern or null in case none is used.
null it there
is none set
public void completeInfo(IDirectEditingInfo info,
Object bo)
IDirectEditingInfo info.
This information is needed to switch automatically into the direct
editing mode. (e.g. after creation of a new object).
completeInfo in interface IPatterninfo - The direct editing infobo - The domain object
public void completeInfo(IDirectEditingInfo info,
Object bo,
String keyProperty)
IDirectEditingInfo info.
This information is needed to switch automatically into the direct
editing mode. (e.g. after creation of a new object)
completeInfo in interface IPatterninfo - The direct editing infobo - The domain objectkeyProperty - The key propertypublic IResizeConfiguration getResizeConfiguration(IResizeShapeContext context)
DefaultResizeConfiguration, which allows bothe the horizontal and
vertical resize of a shape.
getResizeConfiguration in interface IPatterncontext - Context object holding information about the shape to be
resized.
IResizeConfiguration defining the resize
behavior.protected IDeleteFeature createDeleteFeature(IDeleteContext context)
IDeleteFeature instance that handles the deletion of
business objects and diagram elements. The default implementation just
creates an adapted DefaultDeleteFeature. Concrete pattern
implementations may either override this method to provide their own
subclass of DefaultDeleteFeature or override and extend the
individual methods provided by IDelete.
The difference of the delete feature returned here to the standard
DefaultDeleteFeature is simply that the instance returned here
cares about the delegation to the pattern's
preDelete(IDeleteContext), isDeleteAbort() and
postDelete(IDeleteContext) methods. Clients overriding this
method should re-implement that pattern, in case the delegation is
desired.
context - the deletion context
IDeleteFeature instance to use for this patterncanDelete(IDeleteContext),
preDelete(IDeleteContext),
isDeleteAbort(),
delete(IDeleteContext),
postDelete(IDeleteContext)public boolean canDelete(IDeleteContext context)
createDeleteFeature(IDeleteContext) and asks the result's
canDelete method.
canDelete in interface IDeletecontext - The context describing the delete request
true, if the pattern can perform the delete
operation, false otherwisepublic void preDelete(IDeleteContext context)
preDelete in interface IDeletecontext - The context describing the delete requestpublic void delete(IDeleteContext context)
createDeleteFeature(IDeleteContext) and
triggers the result's delete method.
delete in interface IDeletecontext - The context describing the delete requestpublic void postDelete(IDeleteContext context)
postDelete in interface IDeletecontext - The context describing the delete requestprotected IRemoveFeature createRemoveFeature(IRemoveContext context)
IRemoveFeature instance that handles the removal of
diagram elements. The default implementation just creates an adapted
DefaultRemoveFeature. Concrete pattern implementations may either
override this method to provide their own subclass of
DefaultRemoveFeature or override and extend the individual
methods provided by IRemove.
The difference of the remove feature returned here to the standard
DefaultRemoveFeature is simply that the instance returned here
cares about the delegation to the pattern's
preRemove(IRemoveContext), isRemoveAbort() and
postRemove(IRemoveContext) methods. Clients overriding this
method should re-implement that pattern, in case the delegation is
desired.
context - the removal context
IRemoveFeature instance to use for this patterncanRemove(IRemoveContext),
preRemove(IRemoveContext),
isRemoveAbort(),
remove(IRemoveContext),
postRemove(IRemoveContext)public boolean canRemove(IRemoveContext context)
createRemoveFeature(IRemoveContext) and asks the result's
canRemove method.
canRemove in interface IRemovecontext - The context describing the remove request
true, if the pattern can perform the delete
operation, false otherwisepublic void preRemove(IRemoveContext context)
preRemove in interface IRemovecontext - The context describing the remove requestpublic void remove(IRemoveContext context)
createRemoveFeature(IRemoveContext) and
triggers the result's remove method.
remove in interface IRemovecontext - The context describing the remove requestpublic void postRemove(IRemoveContext context)
postRemove in interface IRemovecontext - The context describing the remove requestpublic boolean canDirectEdit(IDirectEditingContext context)
IDirectEditingContext. Corresponds to the method
AbstractDirectEditingFeature.canDirectEdit(IDirectEditingContext)
. The default implementation simply returns false.
canDirectEdit in interface IDirectEditingcontext - A context object describing the direct edit request.
true in case direct editing shall be allowed,
false otherwise.IFeature.canExecute(org.eclipse.graphiti.features.context.IContext)
public String checkValueValid(String value,
IDirectEditingContext context)
AbstractDirectEditingFeature.checkValueValid(String, IDirectEditingContext)
.
checkValueValid in interface IDirectEditingvalue - The new value to checkcontext - A context object describing the direct edit request.
null in case of a valid value, a string describing
the reason for being not valid otherwise.
public String completeValue(String value,
int caretPos,
String chosenValue,
IDirectEditingContext context)
AbstractDirectEditingFeature.completeValue(String, int, String, IDirectEditingContext)
. The default implementation simply returns the parameter chosenValue.
completeValue in interface IDirectEditingvalue - The current valuecaretPosition - The current cursor positionchoosenValue - The value chosen by usercontext - A context object describing the direct edit request.
public String[] getPossibleValues(IDirectEditingContext context)
AbstractDirectEditingFeature.getPossibleValues(IDirectEditingContext)
. The default implementation returns an empty string array.
getPossibleValues in interface IDirectEditingcontext - A context object describing the direct edit request.
public String[] getValueProposals(String value,
int caretPos,
IDirectEditingContext context)
AbstractDirectEditingFeature.getValueProposals(String, int, IDirectEditingContext)
. The default implementation returns an empty string array.
getValueProposals in interface IDirectEditingvalue - The current valuecaretPosition - The current cursor positioncontext - A context object describing the direct edit request.
public boolean isAutoCompletionEnabled()
AbstractDirectEditingFeature.isAutoCompletionEnabled(). The
default implementation simply returns false.
isAutoCompletionEnabled in interface IDirectEditingtrue, if proposals should appear automatically,
false otherwise.public boolean isCompletionAvailable()
AbstractDirectEditingFeature.isCompletionAvailable(). The default
implementation simply returns false.
isCompletionAvailable in interface IDirectEditingtrue if completion is / proposals are available at
all, false otherwise.public boolean stretchFieldToFitText()
AbstractDirectEditingFeature.stretchFieldToFitText(). The default
implementation simply returns false.
stretchFieldToFitText in interface IDirectEditingtrue if the field should exactly fit the contents,
false otherwise.public int getEditingType()
IDirectEditing.getEditingType(). The default
implementation return IDirectEditing.TYPE_NONE, other valid type
are defined by the TYPE_* constants in IDirectEditing.
getEditingType in interface IDirectEditingpublic String getInitialValue(IDirectEditingContext context)
IDirectEditing.getInitialValue(IDirectEditingContext)
. The default implementation always returns an empty string.
getInitialValue in interface IDirectEditingcontext - A context object describing the direct edit request.
public void setValue(String value,
IDirectEditingContext context)
AbstractDirectEditingFeature.setValue(String, IDirectEditingContext)
. The default implementation does nothing.
setValue in interface IDirectEditingvalue - The new value to be setcontext - A context object describing the direct edit request.public IProposalSupport getProposalSupport()
If the client wants to work with Objects he must provide an
implementation of IProposalSupport. In this case the following
methods of the pattern are ignored:
* String checkValueValid(String value, IDirectEditingContext context);
* String completeValue(String value, int caretPosition, String choosenValue, IDirectEditingContext context);
* String[] getPossibleValues(IDirectEditingContext context);
* String[] getValueProposals(String value, int caretPosition, IDirectEditingContext context);
* void setValue(String value, IDirectEditingContext context);
Corresponds to the method
AbstractDirectEditingFeature.getProposalSupport(). The default
implementation returns null to enable the standard
string-based direct editing functionality.
getProposalSupport in interface IDirectEditingpublic boolean hasDoneChanges(Class<?> actionType)
IMPORTANT NOTE: The implementor of the feature is responsible for
correctly implementing this method! It will lead to inconsistencies if
this method returns false although the pattern did changes.
hasDoneChanges in interface IPatternactionType - the followings types are currently supported:
IDelete.class, IRemove.class
true if the last action of the pattern from this
action type should appear in the undo stack, false
otherwisepublic boolean isDeleteAbort()
IDeleteIDelete.preDelete(IDeleteContext) has been called and before the actual
delete is done. In case this method returns true, the
operation will be cancelled by the Graphiti framework by throwing an
OperationCanceledException that causes am EMF revert of the
operation.
Implementing classes might e.g. set a flag in
IDelete.preDelete(IDeleteContext) as cancellation indication and check
that that flag here.
isDeleteAbort in interface IDeletetrue in case you want to cancel the current
operation, false otherwise.public boolean isRemoveAbort()
IRemoveIRemove.preRemove(IRemoveContext) has been called and before the actual
remove is done. In case this method returns true, the
operation will be cancelled by the Graphiti framework by throwing an
OperationCanceledException that causes am EMF revert of the
operation.
Implementing classes might e.g. set a flag in
IRemove.preRemove(IRemoveContext) as cancellation indication and check
that that flag here.
isRemoveAbort in interface IRemovetrue in case you want to cancel the current
operation, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||