Package org.eclipse.graphiti.pattern
Class TypedPattern
java.lang.Object
org.eclipse.graphiti.pattern.AbstractBasePattern
org.eclipse.graphiti.pattern.AbstractPattern
org.eclipse.graphiti.pattern.TypedPattern
- All Implemented Interfaces:
IFeatureProviderHolder,IAdd,ICreate,ICreateInfo,IDelete,IDirectEditing,ILayout,IMoveShape,IRemove,IResizeShape,IUpdate,IPattern
- Direct Known Subclasses:
IdPattern
This class provides the basis for all specific pattern types. It provides
functionality to tag a shape as being created and maintained by a specific
pattern type. Type type is identified using a special
Property with
the key PROPERTY_KEY_PATTERN_TYPE.- Since:
- 0.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringConstant indication the type of pattern, e.g.Fields inherited from class org.eclipse.graphiti.pattern.AbstractPattern
EMPTY_STRING_ARRAYFields inherited from interface org.eclipse.graphiti.func.IDirectEditing
TYPE_CUSTOM, TYPE_DROPDOWN, TYPE_DROPDOWN_READ_ONLY, TYPE_MULTILINETEXT, TYPE_NONE, TYPE_TEXT -
Constructor Summary
ConstructorsConstructorDescriptionConstructor to be used when no configuration data is needed.TypedPattern(IPatternConfiguration patternConfiguration) Constructor to be used when configuration data is needed. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetPatternType(PropertyContainer patternRootShape) Returns the property that indicates that the given root shape of the pattern is created and maintained by a specific pattern type if it is set for the given shape or one of its parents.protected voidsetPatternType(PropertyContainer patternRootShape, String patternType) Sets the property that indicates that the given root shape of the pattern is created and maintained by a specific pattern type.Methods inherited from class org.eclipse.graphiti.pattern.AbstractPattern
addGraphicalRepresentation, avoidNegativeCoordinates, canCreate, canDelete, canDirectEdit, canLayout, canMoveShape, canRemove, canResizeShape, canUpdate, checkValueValid, completeInfo, completeInfo, completeValue, create, createDeleteFeature, createRemoveFeature, delete, getCreateDescription, getCreateImageId, getCreateLargeImageId, getCreateName, getEditingType, getInitialValue, getPatternConfiguration, getPossibleValues, getProposalSupport, getResizeConfiguration, getValueProposals, hasDoneChanges, internalMove, isAutoCompletionEnabled, isCompletionAvailable, isDeleteAbort, isMainBusinessObjectApplicable, isPaletteApplicable, isPatternControlled, isPatternRoot, isRemoveAbort, layout, layoutPictogramElement, moveAllBendpoints, moveShape, postDelete, postMoveShape, postRemove, preDelete, preMoveShape, preRemove, remove, resizeShape, setPatternConfiguration, setValue, stretchFieldToFitText, update, updateNeeded, updatePictogramElementMethods inherited from class org.eclipse.graphiti.pattern.AbstractBasePattern
add, canAdd, getBusinessObjectForPictogramElement, getDiagram, getDiagramBehavior, getFeatureProvider, getMappingProvider, link, link, manageColor, manageColor, manageFont, manageFont, setFeatureProviderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.graphiti.pattern.IPattern
add, canAdd, setFeatureProvider
-
Field Details
-
PROPERTY_KEY_PATTERN_TYPE
Constant indication the type of pattern, e.g. ID pattern.- See Also:
-
-
Constructor Details
-
TypedPattern
public TypedPattern()Constructor to be used when no configuration data is needed. -
TypedPattern
Constructor to be used when configuration data is needed.
-
-
Method Details
-
setPatternType
Sets the property that indicates that the given root shape of the pattern is created and maintained by a specific pattern type.- Parameters:
patternRootShape- ThePropertyContainerobject that is used as root shape of the pattern.patternType- TheStringtype of the pattern.
-
getPatternType
Returns the property that indicates that the given root shape of the pattern is created and maintained by a specific pattern type if it is set for the given shape or one of its parents. If the property is set for the given shape it is returned, otherwise the parents are asked for the property; first the parentContainerShapein the shape hierarchy is asked if there is no parent theGraphicsAlgorithmparent is asked.- Parameters:
patternRootShape- ThePropertyContainerobject that is used as root shape of the pattern.- Returns:
- The
Stringtype of the pattern.
-