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
public abstract class TypedPattern extends AbstractPattern
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 specialProperty
with the key PROPERTY_KEY_PATTERN_TYPE.- Since:
- 0.10
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
PROPERTY_KEY_PATTERN_TYPE
Constant indication the type of pattern, e.g.-
Fields inherited from class org.eclipse.graphiti.pattern.AbstractPattern
EMPTY_STRING_ARRAY
-
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
Constructors Constructor Description TypedPattern()
Constructor to be used when no configuration data is needed.TypedPattern(IPatternConfiguration patternConfiguration)
Constructor to be used when configuration data is needed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getPatternType(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 void
setPatternType(PropertyContainer patternRootShape, java.lang.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, updatePictogramElement
-
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
-
PROPERTY_KEY_PATTERN_TYPE
protected static final java.lang.String PROPERTY_KEY_PATTERN_TYPE
Constant indication the type of pattern, e.g. ID pattern.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TypedPattern
public TypedPattern()
Constructor to be used when no configuration data is needed.
-
TypedPattern
public TypedPattern(IPatternConfiguration patternConfiguration)
Constructor to be used when configuration data is needed.
-
-
Method Detail
-
setPatternType
protected void setPatternType(PropertyContainer patternRootShape, java.lang.String patternType)
Sets the property that indicates that the given root shape of the pattern is created and maintained by a specific pattern type.- Parameters:
patternRootShape
- ThePropertyContainer
object that is used as root shape of the pattern.patternType
- TheString
type of the pattern.
-
getPatternType
protected java.lang.String getPatternType(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. If the property is set for the given shape it is returned, otherwise the parents are asked for the property; first the parentContainerShape
in the shape hierarchy is asked if there is no parent theGraphicsAlgorithm
parent is asked.- Parameters:
patternRootShape
- ThePropertyContainer
object that is used as root shape of the pattern.- Returns:
- The
String
type of the pattern.
-
-