public interface IPattern extends ICreate, IAdd, IDelete, IRemove, IUpdate, ILayout, IResizeShape, IMoveShape, IDirectEditing
AbstractPattern
.TYPE_CUSTOM, TYPE_DROPDOWN, TYPE_DROPDOWN_READ_ONLY, TYPE_MULTILINETEXT, TYPE_NONE, TYPE_TEXT
Modifier and Type | Method and Description |
---|---|
PictogramElement |
add(IAddContext context)
Clients must override this method to provide the functionality to add an
existing domain object to a diagram.
|
boolean |
canAdd(IAddContext context)
Clients must override this method to indicate the framework that this
pattern can add a domain object to the diagram.
|
void |
completeInfo(IDirectEditingInfo info,
java.lang.Object bo)
Complete the directEditing info.
|
void |
completeInfo(IDirectEditingInfo info,
java.lang.Object bo,
java.lang.String keyProperty)
Complete the directEditing info.
|
java.lang.String |
getCreateDescription()
Gets the create description.
|
java.lang.String |
getCreateName()
Gets the create name.
|
IResizeConfiguration |
getResizeConfiguration(IResizeShapeContext context)
Provides configuration object, which describes the resize behavior.
|
boolean |
hasDoneChanges(java.lang.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.
|
boolean |
isMainBusinessObjectApplicable(java.lang.Object mainBusinessObject)
This method must be implemented by the pattern user.
|
boolean |
isPaletteApplicable()
Determines whether the pattern supports the creation of new business
objects from the palette.
|
void |
setFeatureProvider(IFeatureProvider fp)
Sets the feature provider.
|
getCreateImageId, getCreateLargeImageId
canDelete, delete, isDeleteAbort, postDelete, preDelete
canRemove, isRemoveAbort, postRemove, preRemove, remove
canUpdate, update, updateNeeded
canResizeShape, resizeShape
canMoveShape, moveShape
canDirectEdit, checkValueValid, completeValue, getEditingType, getInitialValue, getPossibleValues, getProposalSupport, getValueProposals, isAutoCompletionEnabled, isCompletionAvailable, setValue, stretchFieldToFitText
boolean isPaletteApplicable()
false
will
suppress the creation of a palette item for this pattern.true
if the pattern supports the ICreate
methods and a palette item should be generatedjava.lang.String getCreateName()
getCreateName
in interface ICreateInfo
java.lang.String getCreateDescription()
getCreateDescription
in interface ICreateInfo
void setFeatureProvider(IFeatureProvider fp)
fp
- the new feature providerboolean isMainBusinessObjectApplicable(java.lang.Object mainBusinessObject)
mainBusinessObject
- the main business objectvoid completeInfo(IDirectEditingInfo info, java.lang.Object bo)
info
- the directEditing infobo
- the business objectvoid completeInfo(IDirectEditingInfo info, java.lang.Object bo, java.lang.String keyProperty)
info
- the directEditing infobo
- the business objectkeyProperty
- the key propertyPictogramElement add(IAddContext context)
IAdd.add(IAddContext)
method. The default implementation
simply does nothing and returns null
.boolean canAdd(IAddContext context)
IAdd.canAdd(IAddContext)
method. The default
implementation simply returns false
.IResizeConfiguration getResizeConfiguration(IResizeShapeContext context)
context
- the resizing contextboolean hasDoneChanges(java.lang.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.
actionType
- 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
otherwise