|
||||||||||
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 java.lang.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(IPatternConfiguration patternConfiguration)
Creates a new AbstractPattern holding the given
IPatternConfiguration . |
Method Summary | |
---|---|
protected void |
addGraphicalRepresentation(IAreaContext context,
java.lang.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 . |
java.lang.String |
checkValueValid(java.lang.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,
java.lang.Object bo)
Clients can override to complete the IDirectEditingInfo info. |
void |
completeInfo(IDirectEditingInfo info,
java.lang.Object bo,
java.lang.String keyProperty)
Clients can override to complete the IDirectEditingInfo info. |
java.lang.String |
completeValue(java.lang.String value,
int caretPos,
java.lang.String chosenValue,
IDirectEditingContext context)
Can be overridden by clients to define completion functionality for direct editing. |
java.lang.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 java.util.List<Anchor> |
getAnchors(ContainerShape containerShape)
|
java.lang.String |
getCreateDescription()
Client should override to return a string description of the type of domain object that is created with this pattern. |
java.lang.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. |
java.lang.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. |
java.lang.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. |
protected java.lang.String |
getImage(IStructureMapping structureMapping,
PictogramLink link)
Deprecated. Remains from the mapping information options, should not be part of the standard pattern interface and should be removed! |
java.lang.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. |
java.lang.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. |
protected java.lang.String |
getText(IStructureMapping structureMapping,
PictogramLink link)
Deprecated. Remains from the mapping information options, should not be part of the standard pattern interface and should be removed! |
java.lang.String[] |
getValueProposals(java.lang.String value,
int caretPos,
IDirectEditingContext context)
This proposals will be used for the completion list of a simple text cell editor. |
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. |
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. |
abstract boolean |
isMainBusinessObjectApplicable(java.lang.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 |
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(java.lang.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, getDiagramEditor, 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 java.lang.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.Method Detail |
---|
public boolean isPaletteApplicable()
isPaletteApplicable
in interface IPattern
true
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 ICreate
context
- 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 ILayout
context
- 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 IMoveShape
context
- 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 IResizeShape
context
- 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 IUpdate
context
- 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 java.lang.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 ICreate
context
- The context holding information on the domain object to be
created.
public java.lang.String getCreateDescription()
null
which indicates that no tooltip shall be displayed.
getCreateDescription
in interface ICreateInfo
getCreateDescription
in interface IPattern
String
holding the tooltippublic java.lang.String getCreateImageId()
null
which indicates that no icon shall be displayed.
getCreateImageId
in interface ICreateInfo
String
holding the id of the icon as defined in the
AbstractImageProvider.public java.lang.String getCreateLargeImageId()
null
which indicates that no icon shall be displayed.
getCreateLargeImageId
in interface ICreateInfo
String
holding the id of the large icon as defined in
the AbstractImageProvider.public java.lang.String getCreateName()
null
which results in an empty
entry in the palette.
getCreateName
in interface ICreateInfo
getCreateName
in interface IPattern
String
holding the name of the domain object.public abstract boolean isMainBusinessObjectApplicable(java.lang.Object mainBusinessObject)
isMainBusinessObjectApplicable
in interface IPattern
mainBusinessObject
- 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 ILayout
context
- 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 IMoveShape
context
- 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 java.util.List<Anchor> getAnchors(ContainerShape containerShape)
public void resizeShape(IResizeShapeContext context)
IResizeShapeContext
. Corresponds to the method
DefaultResizeShapeFeature.resizeShape(IResizeShapeContext)
.
resizeShape
in interface IResizeShape
context
- 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 IUpdate
context
- 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 IUpdate
context
- The context holding information on the domain object to be
updated.
protected void addGraphicalRepresentation(IAreaContext context, java.lang.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 java.lang.String getImage(IStructureMapping structureMapping, PictogramLink link)
structureMapping
- the structure mappinglink
- the pictogram link
protected java.lang.String getText(IStructureMapping structureMapping, PictogramLink link)
structureMapping
- the structure mappinglink
- the pictogram link
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
public void completeInfo(IDirectEditingInfo info, java.lang.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 IPattern
info
- The direct editing infobo
- The domain objectpublic void completeInfo(IDirectEditingInfo info, java.lang.Object bo, java.lang.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 IPattern
info
- 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 IPattern
context
- 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 a 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
.
context
- the deletion context
IDeleteFeature
instance to use for this patterncanDelete(IDeleteContext)
,
preDelete(IDeleteContext)
,
delete(IDeleteContext)
,
postDelete(IDeleteContext)
public boolean canDelete(IDeleteContext context)
createDeleteFeature(IDeleteContext)
and asks the result's
canDelete method.
canDelete
in interface IDelete
context
- The context describing the delete request
true
, if the pattern can perform the delete
operation, false
otherwisepublic void preDelete(IDeleteContext context)
createDeleteFeature(IDeleteContext)
and triggers the result's
preDelete method.
preDelete
in interface IDelete
context
- The context describing the delete requestpublic void delete(IDeleteContext context)
createDeleteFeature(IDeleteContext)
and
triggers the result's delete method.
delete
in interface IDelete
context
- The context describing the delete requestpublic void postDelete(IDeleteContext context)
createDeleteFeature(IDeleteContext)
and triggers the result's
postDelete method.
postDelete
in interface IDelete
context
- The context describing the delete requestprotected IRemoveFeature createRemoveFeature(IRemoveContext context)
IRemoveFeature
instance that handles the removal of
diagram elements. The default implementation just creates a
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
.
context
- the removal context
IRemoveFeature
instance to use for this patterncanRemove(IRemoveContext)
,
preRemove(IRemoveContext)
,
remove(IRemoveContext)
,
postRemove(IRemoveContext)
public boolean canRemove(IRemoveContext context)
createRemoveFeature(IRemoveContext)
and asks the result's
canRemove method.
canRemove
in interface IRemove
context
- The context describing the remove request
true
, if the pattern can perform the delete
operation, false
otherwisepublic void preRemove(IRemoveContext context)
createRemoveFeature(IRemoveContext)
and triggers the result's
preRemove method.
preRemove
in interface IRemove
context
- The context describing the remove requestpublic void remove(IRemoveContext context)
createRemoveFeature(IRemoveContext)
and
triggers the result's remove method.
remove
in interface IRemove
context
- The context describing the remove requestpublic void postRemove(IRemoveContext context)
createRemoveFeature(IRemoveContext)
and triggers the result's
postRemove method.
postRemove
in interface IRemove
context
- 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 IDirectEditing
context
- 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 java.lang.String checkValueValid(java.lang.String value, IDirectEditingContext context)
AbstractDirectEditingFeature.checkValueValid(String, IDirectEditingContext)
.
checkValueValid
in interface IDirectEditing
value
- The new vlue to checkcontext
- A context object describing the direct edit request.
null
in case of a vlid value, a string describing
the reason for being not valid otherwise.public java.lang.String completeValue(java.lang.String value, int caretPos, java.lang.String chosenValue, IDirectEditingContext context)
AbstractDirectEditingFeature.completeValue(String, int, String, IDirectEditingContext)
. The default implementation simply returns the parameter chosenValue.
completeValue
in interface IDirectEditing
value
- The current valuecaretPosition
- The current cursor positionchoosenValue
- The value chosen by usercontext
- A context object describing the direct edit request.
public java.lang.String[] getPossibleValues(IDirectEditingContext context)
AbstractDirectEditingFeature.getPossibleValues(IDirectEditingContext)
. The default implementation returns an empty string array.
getPossibleValues
in interface IDirectEditing
context
- A context object describing the direct edit request.
public java.lang.String[] getValueProposals(java.lang.String value, int caretPos, IDirectEditingContext context)
AbstractDirectEditingFeature.getValueProposals(String, int, IDirectEditingContext)
. The default implementation returns an empty string array.
getValueProposals
in interface IDirectEditing
value
- 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 IDirectEditing
true
, if proposals should appear automatically,
false
otherwise.public boolean isCompletionAvailable()
AbstractDirectEditingFeature.isCompletionAvailable()
. The default
implementation simply returns false
.
isCompletionAvailable
in interface IDirectEditing
true
if completion is / proposals are available at
all, false
otherwise.public boolean stretchFieldToFitText()
AbstractDirectEditingFeature.stretchFieldToFitText()
. The default
implementation simply returns false
.
stretchFieldToFitText
in interface IDirectEditing
true
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 IDirectEditing
public java.lang.String getInitialValue(IDirectEditingContext context)
IDirectEditing.getInitialValue(IDirectEditingContext)
. The default implementation always returns an empty string.
getInitialValue
in interface IDirectEditing
context
- A context object describing the direct edit request.
public void setValue(java.lang.String value, IDirectEditingContext context)
AbstractDirectEditingFeature.setValue(String, IDirectEditingContext)
. The default implementation does nothing.
setValue
in interface IDirectEditing
value
- 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 IDirectEditing
public boolean 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.
hasDoneChanges
in interface IPattern
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |