Package org.eclipse.graphiti.pattern.id
Class IdPattern
java.lang.Object
org.eclipse.graphiti.pattern.AbstractBasePattern
org.eclipse.graphiti.pattern.AbstractPattern
org.eclipse.graphiti.pattern.TypedPattern
org.eclipse.graphiti.pattern.id.IdPattern
- All Implemented Interfaces:
IFeatureProviderHolder,IAdd,ICreate,ICreateInfo,IDelete,IDirectEditing,ILayout,IMoveShape,IRemove,IResizeShape,IUpdate,IPattern
Base class for ID patterns. The basic idea behind is to tag single parts of a
pattern shape with IDs (using
Property objects). These IDs are used
to identify the parts of that shape and to call the update and layout methods
for the shapes with IDs. Clients do not need to search through the shape
hierarchy to find the shapes to update and layout.
Besides IDs this pattern base implementation also supports tagging
PictogramElements with an index property that allows to number a
sequence of children using the same ID, e.g. a list of attributes inside a
class.
- Since:
- 0.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringThe property key that is used to tag individualPictogramElements with a specific ID to identify them later during e.g.protected static final StringThe property key that is used to tag individualPictogramElements with a specific index beyond the ID to identify them later during e.g.protected static final StringThe property key that stores the information that aPictogramElementis the root object of aIdPatternsubclass.Fields inherited from class org.eclipse.graphiti.pattern.TypedPattern
PROPERTY_KEY_PATTERN_TYPEFields 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
ConstructorsConstructorDescriptionDefault constructor for a new IdPattern.IdPattern(IPatternConfiguration patternConfiguration) Constructor taking some pattern configuration data for the created IdPattern. -
Method Summary
Modifier and TypeMethodDescriptionadd(IAddContext context) Adds aPictogramElementrepresentation for the given context to the diagram.booleancanAdd(IAddContext context) Checks if adding is possible using this pattern in the given context.booleancanDirectEdit(IDirectEditingContext context) Clients can override this method to indicate that the pattern allows direct editing for the shape described in the passedIDirectEditingContext, but the recommended method to override forIdPatterniscanDirectEdit(IDirectEditingContext, String).protected booleancanDirectEdit(IDirectEditingContext context, String id) Clients can override this method to indicate that the pattern allows direct editing for the shape described in the passedIDirectEditingContextholding the given ID.booleancanLayout(ILayoutContext context) Checks if layouting a shape is possible using this pattern in the given context.booleancanUpdate(IUpdateContext context) Checks if updating a shape is possible using this pattern in the given context.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.protected StringcheckValueValid(String value, IDirectEditingContext context, String id) This method will be called by the framework to check if the passed String is valid as new value for the shape.protected abstract PictogramElementdoAdd(IAddContext context) Clients should primarily override this method and implement their add functionality here.protected PropertyContainerfindById(PictogramElement pictogramElement, String idToFind) Deprecated.Use {@link IdPatternHelper.findById(pictogramElement, idToFind)} instead.intThe Graphiti framework calls this method to decide which UI to show up for direct editing.protected StringgetId(PropertyContainer container) Deprecated.Use {@link IdPatternHelper.getId(container)} instead.protected intgetIndex(PropertyContainer container) Returns any index that has been set for the givenPictogramElement; it can be anyPropertyContainer, especiallyShapes orGraphicsAlgorithms are allowed.getInitialValue(IDirectEditingContext context) Provides the initial value for display in the newly opened text editing UI component.protected StringgetInitialValue(IDirectEditingContext context, String id) Provides the initial value for display in the newly opened text editing UI component.protected booleanisPatternControlled(PictogramElement pictogramElement) Checks if thePictogramElementis controlled by the pattern.protected booleanisPatternRoot(PictogramElement pictogramElement) Checks if the givenPictogramElementis the root object of this pattern.booleanlayout(ILayoutContext context) Layouts aPictogramElementrepresentation given in the context.protected abstract booleanlayout(IdLayoutContext context, String id) Clients should primarily override this method and implement their layout functionality here.protected booleanlayoutGraphicsAlgorithmChildren(GraphicsAlgorithm graphicsAlgorithm, IdLayoutContext context) This method implements the part of the layout that deals with theGraphicsAlgorithmchildren, seelayout(IdLayoutContext).protected voidsetId(PropertyContainer container, String id) Deprecated.Use {@link IdPatternHelper.setId(container, id)} instead.protected voidsetIndex(PropertyContainer container, int index) Set the index property (PROPERTY_KEY_ID) for the givenPictogramElement; it can be anyPropertyContainer,especiallyShapes orGraphicsAlgorithms are allowed.voidsetValue(String value, IDirectEditingContext context) Set the new value after direct editing is finished.protected voidsetValue(String value, IDirectEditingContext context, String id) Set the new value after direct editing is finished.booleanupdate(IUpdateContext context) Updates aPictogramElementrepresentation given in the context.protected booleanupdate(IUpdateContext context, boolean innerCall) Updates aPictogramElementrepresentation given in the context recursively.protected abstract booleanupdate(IdUpdateContext context, String id) Clients should primarily override this method and implement their update functionality here.protected booleanupdateGraphicsAlgorithmChildren(GraphicsAlgorithm graphicsAlgorithm, IdUpdateContext context) This method implements the part of the update that deals with theGraphicsAlgorithmchildren, seeupdate(IUpdateContext, boolean).updateNeeded(IUpdateContext context) Checks if an updates is needed for aPictogramElementrepresentation given in the context.protected abstract IReasonupdateNeeded(IdUpdateContext context, String id) Clients should primarily override this method and implement their update check functionality here.protected IReasonupdateNeededGraphicsAlgorithmChildren(GraphicsAlgorithm graphicsAlgorithm, IdUpdateContext context) This method implements the part of the update needed check that deals with theGraphicsAlgorithmchildren, seeupdateNeeded(IUpdateContext).Methods inherited from class org.eclipse.graphiti.pattern.TypedPattern
getPatternType, setPatternTypeMethods inherited from class org.eclipse.graphiti.pattern.AbstractPattern
addGraphicalRepresentation, avoidNegativeCoordinates, canCreate, canDelete, canMoveShape, canRemove, canResizeShape, completeInfo, completeInfo, completeValue, create, createDeleteFeature, createRemoveFeature, delete, getCreateDescription, getCreateImageId, getCreateLargeImageId, getCreateName, getPatternConfiguration, getPossibleValues, getProposalSupport, getResizeConfiguration, getValueProposals, hasDoneChanges, internalMove, isAutoCompletionEnabled, isCompletionAvailable, isDeleteAbort, isMainBusinessObjectApplicable, isPaletteApplicable, isRemoveAbort, layoutPictogramElement, moveAllBendpoints, moveShape, postDelete, postMoveShape, postRemove, preDelete, preMoveShape, preRemove, remove, resizeShape, setPatternConfiguration, stretchFieldToFitText, updatePictogramElementMethods inherited from class org.eclipse.graphiti.pattern.AbstractBasePattern
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.func.ICreateInfo
getCreateImageId, getCreateLargeImageIdMethods inherited from interface org.eclipse.graphiti.func.IDelete
canDelete, delete, isDeleteAbort, postDelete, preDeleteMethods inherited from interface org.eclipse.graphiti.func.IDirectEditing
completeValue, getPossibleValues, getProposalSupport, getValueProposals, isAutoCompletionEnabled, isCompletionAvailable, stretchFieldToFitTextMethods inherited from interface org.eclipse.graphiti.func.IMoveShape
canMoveShape, moveShapeMethods inherited from interface org.eclipse.graphiti.pattern.IPattern
completeInfo, completeInfo, getCreateDescription, getCreateName, getResizeConfiguration, hasDoneChanges, isMainBusinessObjectApplicable, isPaletteApplicable, setFeatureProviderMethods inherited from interface org.eclipse.graphiti.func.IRemove
canRemove, isRemoveAbort, postRemove, preRemove, removeMethods inherited from interface org.eclipse.graphiti.func.IResizeShape
canResizeShape, resizeShape
-
Field Details
-
PROPERTY_VALUE_PATTERN_TYPE_ID
The property key that stores the information that aPictogramElementis the root object of aIdPatternsubclass. The value is set by theadd(IAddContext)method.- See Also:
-
PROPERTY_KEY_ID
The property key that is used to tag individualPictogramElements with a specific ID to identify them later during e.g. update or layout.- See Also:
-
PROPERTY_KEY_INDEX
The property key that is used to tag individualPictogramElements with a specific index beyond the ID to identify them later during e.g. update or layout. This can e.g. be used for lists of shapes like the attributes of a class.- See Also:
-
-
Constructor Details
-
IdPattern
public IdPattern()Default constructor for a new IdPattern. Clients should call either call this or the constructor using aIPatternConfigurationinstance from their subclass constructor. -
IdPattern
Constructor taking some pattern configuration data for the created IdPattern. Clients should call either call this or the null parameter constructor from their subclass constructor.- Parameters:
patternConfiguration- The configuration data to use
-
-
Method Details
-
isPatternControlled
Checks if thePictogramElementis controlled by the pattern. The default implementation simply checks if the domain object linked to the givenPictogramElementis the one that is controlled by this pattern, seeAbstractPattern.isMainBusinessObjectApplicable(Object). Especially the default implementation does not traverse up the hierarchy to find a suitable parent.- Specified by:
isPatternControlledin classAbstractPattern- Parameters:
pictogramElement- ThePictogramElementto check- Returns:
truein case the pattern controls the givenPictogramElement,falseotherwise.
-
isPatternRoot
Checks if the givenPictogramElementis the root object of this pattern. The default implementation checks if the domain object linked to the givenPictogramElementis the one that is controlled by this pattern, seeAbstractPattern.isMainBusinessObjectApplicable(Object). It also checks if the object is controlled by an ID pattern by checking the according property (TypedPattern.PROPERTY_KEY_PATTERN_TYPE).- Specified by:
isPatternRootin classAbstractPattern- Parameters:
pictogramElement- ThePictogramElementto check- Returns:
truein case the givenPictogramElementis the root shape of this pattern,falseotherwise.
-
setId
Deprecated.Use {@link IdPatternHelper.setId(container, id)} instead.Set the ID property (PROPERTY_KEY_ID) for the givenPictogramElement; it can be anyPropertyContainer,especiallyShapes orGraphicsAlgorithms are allowed. The used ID string can later be used to identify the shape, e.g. in the update or layout methods.- Parameters:
container- ThePictogramElementto set the ID property forid- TheStringID to set.
-
getId
Deprecated.Use {@link IdPatternHelper.getId(container)} instead.Returns any ID that has been set for the givenPictogramElement; it can be anyPropertyContainer, especiallyShapes orGraphicsAlgorithms are allowed.- Parameters:
container- ThePictogramElementto get the ID property from- Returns:
- A
Stringrepresenting the value of the property ornullin case the property is not set, seesetId(PropertyContainer, String).
-
findById
Deprecated.Use {@link IdPatternHelper.findById(pictogramElement, idToFind)} instead.Searches for aPictogramElementthat has the given ID starting from the givenPictogramElement. First the given element is checked, then itsGraphicsAlgorithm; after that thePictogramElementchildren are checked recursively and last theGraphicsAlgorithmchildren also recursively. The firstPictogramElementthat has the given ID is returned, in case none is found in the tree spanned by the givenPictogramElement,nullis returned.- Parameters:
pictogramElement- ThePictogramElementat which the search shall start, anyShapes orGraphicsAlgorithms on top of this element are ignored.idToFind- AStringrepresenting the ID to search for- Returns:
- The
PictogramElementthat has the given ID property, in case none id foundnull.
-
setIndex
Set the index property (PROPERTY_KEY_ID) for the givenPictogramElement; it can be anyPropertyContainer,especiallyShapes orGraphicsAlgorithms are allowed. The used index can later - together with the ID string - be used to identify the concrete shape in case of a list of shapes, e.g. in the update or layout methods.- Parameters:
container- ThePictogramElementto set the index property forid- TheIntegerindex to set.
-
getIndex
Returns any index that has been set for the givenPictogramElement; it can be anyPropertyContainer, especiallyShapes orGraphicsAlgorithms are allowed.- Parameters:
container- ThePictogramElementto get the index property from- Returns:
- An
Integerrepresenting the value of the property or -1 in case the property is not set, seesetIndex(PropertyContainer, int).
-
canAdd
Checks if adding is possible using this pattern in the given context. The default implementation simply checks if the new object passed in the context is the main domain object for the pattern, seeAbstractPattern.isMainBusinessObjectApplicable(Object).- Specified by:
canAddin interfaceIAdd- Specified by:
canAddin interfaceIPattern- Overrides:
canAddin classAbstractBasePattern- Parameters:
context- AnIAddContextdescribing the add operation.- Returns:
truein case adding is possible,falseotherwise.
-
add
Adds aPictogramElementrepresentation for the given context to the diagram. The default implementation delegates todoAdd(IAddContext)(which clients should primarily override) and updates and layouts the returnedPictogramElementafterwards.- Specified by:
addin interfaceIAdd- Specified by:
addin interfaceIPattern- Overrides:
addin classAbstractBasePattern- Parameters:
context- AnIAddContextdescribing the add operation.- Returns:
- The root object of the created
PictogramElementtree.
-
doAdd
Clients should primarily override this method and implement their add functionality here. This method is called from withinadd(IAddContext).- Parameters:
context- AnIAddContextdescribing the add operation.- Returns:
- The root object of the created
PictogramElementtree.
-
canLayout
Checks if layouting a shape is possible using this pattern in the given context. The default implementation simply checks if the object passed in the context is the main domain object for the pattern, seeAbstractPattern.isMainBusinessObjectApplicable(Object)and if thePictogramElementgiven in the context is controlled by an ID pattern.- Specified by:
canLayoutin interfaceILayout- Overrides:
canLayoutin classAbstractPattern- Parameters:
context- AnILayoutContextdescribing the layout operation.- Returns:
truein case layouting is possible,falseotherwise.
-
layout
Layouts aPictogramElementrepresentation given in the context. The default implementation delegates tolayout(IdLayoutContext, String)(which clients should primarily override) to actually update individualPictogramElements. This delegation is done for anyPictogramElementtagged with an ID in the following order:- The
PictogramElementgiven in the context itself - The
GraphicsAlgorithmof thePictogramElementin the context - The
PictogramElementchildren of thePictogramElementin the context - The
GraphicsAlgorithmchildren of theGraphicsAlgorithmof thePictogramElementin the context. For this the methodlayoutGraphicsAlgorithmChildren(GraphicsAlgorithm, IdLayoutContext)is called which in term calles itself and this method recursively.
- Specified by:
layoutin interfaceILayout- Overrides:
layoutin classAbstractPattern- Parameters:
context- AnILayoutContextdescribing the layout operation.- Returns:
truein case the layout operation did changes to the diagram,falseotherwise.
- The
-
layoutGraphicsAlgorithmChildren
protected boolean layoutGraphicsAlgorithmChildren(GraphicsAlgorithm graphicsAlgorithm, IdLayoutContext context) This method implements the part of the layout that deals with theGraphicsAlgorithmchildren, seelayout(IdLayoutContext). Clients should primarily overridelayout(IdLayoutContext, String)which is called for all foundPictogramElements andGraphicsAlgorithms as described above that have an ID.- Parameters:
graphicsAlgorithm- TheGraphicsAlgorithmto layout.context- AnILayoutContextdescribing the layout operation.- Returns:
truein case the layout operation did changes to the diagram,falseotherwise.
-
layout
Clients should primarily override this method and implement their layout functionality here. This method is called from withinlayout(ILayoutContext)for each of thePictogramElements andGraphicsAlgorithms that have been tagged with an ID.- Parameters:
context- AnIdLayoutContextdescribing the layout operation.- Returns:
truein case the layout operation did changes to the diagram,falseotherwise.
-
canUpdate
Checks if updating a shape is possible using this pattern in the given context. The default implementation simply checks if the object passed in the context is the main domain object for the pattern, seeAbstractPattern.isMainBusinessObjectApplicable(Object)and if thePictogramElementgiven in the context is controlled by an ID pattern.- Specified by:
canUpdatein interfaceIUpdate- Overrides:
canUpdatein classAbstractPattern- Parameters:
context- AnIUpdateContextdescribing the update operation.- Returns:
truein case updating is possible,falseotherwise.
-
updateNeeded
Checks if an updates is needed for aPictogramElementrepresentation given in the context. The default implementation delegates toupdateNeeded(IdUpdateContext, String)(which clients should primarily override) to actually update individualPictogramElements. This delegation is done for anyPictogramElementtagged with an ID in the following order:- The
PictogramElementgiven in the context itself - The
GraphicsAlgorithmof thePictogramElementin the context - The
PictogramElementchildren of thePictogramElementin the context - The
GraphicsAlgorithmchildren of theGraphicsAlgorithmof thePictogramElementin the context. For this the methodupdateNeededGraphicsAlgorithmChildren(GraphicsAlgorithm, IdUpdateContext)is called which in term calls itself and this method recursively.
- Specified by:
updateNeededin interfaceIUpdate- Overrides:
updateNeededin classAbstractPattern- Parameters:
context- AnIUpdateContextdescribing the update operation.- Returns:
- An
IReasonindicatingtrueand aStringreason in case the update operation is needed, anIReasonindicatingfalseotherwise.
- The
-
updateNeededGraphicsAlgorithmChildren
protected IReason updateNeededGraphicsAlgorithmChildren(GraphicsAlgorithm graphicsAlgorithm, IdUpdateContext context) This method implements the part of the update needed check that deals with theGraphicsAlgorithmchildren, seeupdateNeeded(IUpdateContext). Clients should primarily overrideupdateNeeded(IdUpdateContext, String)which is called for all foundPictogramElements andGraphicsAlgorithms as described above that have an ID.- Parameters:
graphicsAlgorithm- TheGraphicsAlgorithmto perform the update check for.context- AnIdUpdateContextdescribing the update operation.- Returns:
- An
IReasonindicatingtrueand aStringreason in case the update operation is needed, anIReasonindicatingfalseotherwise.
-
updateNeeded
Clients should primarily override this method and implement their update check functionality here. This method is called from withinupdateNeeded(IUpdateContext)for each of thePictogramElements andGraphicsAlgorithms that have been tagged with an ID.- Parameters:
context- AnIdUpdateContextdescribing the update operation.- Returns:
- An
IReasonindicatingtrueand aStringreason in case the update operation is needed, anIReasonindicatingfalseotherwise.
-
update
Updates aPictogramElementrepresentation given in the context. The default implementation only delegates toupdate(IUpdateContext, boolean)setting the parameter innerCall tofalse.- Specified by:
updatein interfaceIUpdate- Overrides:
updatein classAbstractPattern- Parameters:
context- AnIUpdateContextdescribing the update operation.- Returns:
truein case the update operation did changes to the diagram,falseotherwise.
-
update
Updates aPictogramElementrepresentation given in the context recursively. The default implementation delegates toupdate(IdUpdateContext, String)(which clients should primarily override) to actually update individualPictogramElements. This delegation is done for anyPictogramElementtagged with an ID in the following order:- The
PictogramElementgiven in the context itself - The
GraphicsAlgorithmof thePictogramElementin the context - The
PictogramElementchildren of thePictogramElementin the context - The
GraphicsAlgorithmchildren of theGraphicsAlgorithmof thePictogramElementin the context. For this the methodupdateGraphicsAlgorithmChildren(GraphicsAlgorithm, IdUpdateContext)is called which in term calls itself and this method recursively.
- Parameters:
context- AnIUpdateContextdescribing the update operation.- Returns:
truein case the update operation did changes to the diagram,falseotherwise.
- The
-
updateGraphicsAlgorithmChildren
protected boolean updateGraphicsAlgorithmChildren(GraphicsAlgorithm graphicsAlgorithm, IdUpdateContext context) This method implements the part of the update that deals with theGraphicsAlgorithmchildren, seeupdate(IUpdateContext, boolean). Clients should primarily overrideupdate(IdUpdateContext, String)which is called for all foundPictogramElements andGraphicsAlgorithms as described above that have an ID.- Parameters:
graphicsAlgorithm- TheGraphicsAlgorithmto update.context- AnIdUpdateContextdescribing the update operation.- Returns:
truein case the update operation did changes to the diagram,falseotherwise.
-
update
Clients should primarily override this method and implement their update functionality here. This method is called from withinupdate(IUpdateContext, boolean)for each of thePictogramElements andGraphicsAlgorithms that have been tagged with an ID.- Parameters:
context- AnIdUpdateContextdescribing the update operation.- Returns:
truein case the update operation did changes to the diagram,falseotherwise.
-
getEditingType
public int getEditingType()The Graphiti framework calls this method to decide which UI to show up for direct editing. Corresponds to the methodIDirectEditing.getEditingType(). The default implementation returnIDirectEditing.TYPE_NONE, other valid type are defined by the TYPE_* constants inIDirectEditing.- Specified by:
getEditingTypein interfaceIDirectEditing- Overrides:
getEditingTypein classAbstractPattern- Returns:
- The desired editing type
-
canDirectEdit
Clients can override this method to indicate that the pattern allows direct editing for the shape described in the passedIDirectEditingContext, but the recommended method to override forIdPatterniscanDirectEdit(IDirectEditingContext, String). Corresponds to the methodAbstractDirectEditingFeature.canDirectEdit(IDirectEditingContext). The default implementation checks if the pattern is responsible for the shape and an ID is set; in that case it delegates tocanDirectEdit(IDirectEditingContext, String).- Specified by:
canDirectEditin interfaceIDirectEditing- Overrides:
canDirectEditin classAbstractPattern- Parameters:
context- A context object describing the direct edit request.- Returns:
truein case direct editing shall be allowed,falseotherwise.- See Also:
-
canDirectEdit
Clients can override this method to indicate that the pattern allows direct editing for the shape described in the passedIDirectEditingContextholding the given ID. Corresponds to the methodAbstractDirectEditingFeature.canDirectEdit(IDirectEditingContext). The default implementation simply returnsfalse.- Parameters:
context- A context object describing the direct edit request.id- The ID to check direct editing for- Returns:
truein case direct editing shall be allowed,falseotherwise.
-
getInitialValue
Provides the initial value for display in the newly opened text editing UI component. Corresponds to the methodIDirectEditing.getInitialValue(IDirectEditingContext). The default implementation checks if the pattern is responsible for the shape and an ID is set; in that case it delegates togetInitialValue(IDirectEditingContext, String).- Specified by:
getInitialValuein interfaceIDirectEditing- Overrides:
getInitialValuein classAbstractPattern- Parameters:
context- A context object describing the direct edit request.- Returns:
- The initial string value to be displayed for editing by the user.
-
getInitialValue
Provides the initial value for display in the newly opened text editing UI component. Corresponds to the methodIDirectEditing.getInitialValue(IDirectEditingContext). The default implementation always returns an empty string.- Parameters:
context- A context object describing the direct edit request.id- The ID of the shape to get the initial value for- Returns:
- The initial string value to be displayed for editing by the user.
-
checkValueValid
This method will be called by the framework to check if the passed String is valid as new value for the shape. This method's response time should be small since the method is queried after each change of the value in the direct edit UI. In case of a not valid value, the returned string shall indicate the reason why the value is not valid. Corresponds to the methodAbstractDirectEditingFeature.checkValueValid(String, IDirectEditingContext). The default implementation checks if the pattern is responsible for the shape and an ID is set; in that case it delegates tocheckValueValid(String, IDirectEditingContext, String).- Specified by:
checkValueValidin interfaceIDirectEditing- Overrides:
checkValueValidin classAbstractPattern- Parameters:
value- The new value to checkcontext- A context object describing the direct edit request.- Returns:
nullin case of a valid value, a string describing the reason for being not valid otherwise.
-
checkValueValid
This method will be called by the framework to check if the passed String is valid as new value for the shape. This method's response time should be small since the method is queried after each change of the value in the direct edit UI. The default implementation simply returns null to indicate that all values are valid. In case of a not valid value, the returned string shall indicate the reason why the value is not valid. Corresponds to the methodAbstractDirectEditingFeature.checkValueValid(String, IDirectEditingContext).- Parameters:
value- The new value to checkcontext- A context object describing the direct edit request.id- The ID of the shape to check the value for- Returns:
nullin case of a valid value, a string describing the reason for being not valid otherwise.
-
setValue
Set the new value after direct editing is finished. The value comes from the text editing UI component. Corresponds to the methodAbstractDirectEditingFeature.setValue(String, IDirectEditingContext). The default implementation checks if the pattern is responsible for the shape and an ID is set; in that case it delegates tosetValue(String, IDirectEditingContext, String).- Specified by:
setValuein interfaceIDirectEditing- Overrides:
setValuein classAbstractPattern- Parameters:
value- The new value to be setcontext- A context object describing the direct edit request.
-
setValue
Set the new value after direct editing is finished. The value comes from the text editing UI component. Corresponds to the methodAbstractDirectEditingFeature.setValue(String, IDirectEditingContext). The default implementation does nothing.- Parameters:
value- The new value to be setcontext- A context object describing the direct edit request.id- The ID of the shape to set the value for
-