|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature
org.eclipse.graphiti.pattern.DirectEditingFeatureForPattern
public class DirectEditingFeatureForPattern
This feature wraps the direct editing functionality of a pattern for calls of the Graphiti framework. Clients should not need to use this class directly.
| Field Summary | |
|---|---|
private IDirectEditing |
pattern
|
| Fields inherited from class org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature |
|---|
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 | |
|---|---|
DirectEditingFeatureForPattern(IFeatureProvider featureProvider,
IDirectEditing pattern)
Creates a new DirectEditingFeatureForPattern. |
|
| Method Summary | |
|---|---|
boolean |
canDirectEdit(IDirectEditingContext context)
Checks if the feature can perform direct editing on the context handed over. |
boolean |
canRedo(IContext context)
Decides if the processed feature can be re-done. |
boolean |
canUndo(IContext context)
Decides if the current feature can be undone - this is the undo of the execute operation. |
String |
checkValueValid(String value,
IDirectEditingContext context)
This method will be called by clients many times to see if current value is valid and could be set. |
String |
completeValue(String value,
int caretPos,
String choosenValue,
IDirectEditingContext context)
Framework calls this method to let the feature calculate the new value. |
int |
getEditingType()
Framework calls this method to decide which UI to show up. |
String |
getInitialValue(IDirectEditingContext context)
Provides the initial value for the opened text editing UI component. |
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. |
String[] |
getValueProposals(String value,
int caretPos,
IDirectEditingContext context)
This proposals will be used for the completion list of a simple text cell editor. |
boolean |
isAbort()
The Graphiti framework will call this method after ICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)/
ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext) have
been called and before the actual undo/redo operation is triggered. |
boolean |
isAutoCompletionEnabled()
Checks if auto completion is enabled. |
boolean |
isCompletionAvailable()
Checks if completion is available. |
void |
postRedo(IContext context)
This method will be called by the Graphiti framework after the EMF undo has finished. |
void |
postUndo(IContext context)
This method will be called by the Graphiti framework after the EMF undo is finished. |
void |
preRedo(IContext context)
This method will be called by the Graphiti framework before the EMF undo has triggered. |
void |
preUndo(IContext context)
This method will be called by the Graphiti framework before the EMF undo is triggered. |
void |
redo(IContext context)
Deprecated. use postRedo(IContext) instead |
void |
setValue(String value,
IDirectEditingContext context)
Set the new value. |
boolean |
stretchFieldToFitText()
Stretch input field to fit its contents. |
void |
undo(IContext context)
Deprecated. use postUndo(IContext) instead |
| Methods inherited from class org.eclipse.graphiti.features.impl.AbstractDirectEditingFeature |
|---|
canExecute, execute, getName, hasDoneChanges, setValueChanged |
| Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
|---|
addGraphicalRepresentation, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramBehavior, getFeatureProvider, getProgressCallback, getUserDecision, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, manageFont, manageFont, setProgressCallback, toString, updatePictogramElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.graphiti.features.IFeature |
|---|
isAvailable |
| Methods inherited from interface org.eclipse.graphiti.IDescription |
|---|
getDescription |
| Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
|---|
getFeatureProvider |
| Field Detail |
|---|
private IDirectEditing pattern
| Constructor Detail |
|---|
public DirectEditingFeatureForPattern(IFeatureProvider featureProvider,
IDirectEditing pattern)
DirectEditingFeatureForPattern.
featureProvider - the feature providerpattern - the pattern| Method Detail |
|---|
public boolean canDirectEdit(IDirectEditingContext context)
IDirectEditing
canDirectEdit in interface IDirectEditingcanDirectEdit in class AbstractDirectEditingFeaturecontext - the context
IFeature.canExecute(org.eclipse.graphiti.features.context.IContext)
public String checkValueValid(String value,
IDirectEditingContext context)
IDirectEditing
checkValueValid in interface IDirectEditingcheckValueValid in class AbstractDirectEditingFeaturevalue - the valuecontext - the context
public String completeValue(String value,
int caretPos,
String choosenValue,
IDirectEditingContext context)
IDirectEditing
completeValue in interface IDirectEditingcompleteValue in class AbstractDirectEditingFeaturevalue - current valuecaretPos - current cursor positionchoosenValue - value choosen by usercontext - the context
public String[] getPossibleValues(IDirectEditingContext context)
IDirectEditing
getPossibleValues in interface IDirectEditinggetPossibleValues in class AbstractDirectEditingFeaturecontext - the context
public String[] getValueProposals(String value,
int caretPos,
IDirectEditingContext context)
IDirectEditing
getValueProposals in interface IDirectEditinggetValueProposals in class AbstractDirectEditingFeaturevalue - current valuecaretPos - current cursor positioncontext - the context
public boolean isAutoCompletionEnabled()
IDirectEditing
isAutoCompletionEnabled in interface IDirectEditingisAutoCompletionEnabled in class AbstractDirectEditingFeaturepublic boolean isCompletionAvailable()
IDirectEditing
isCompletionAvailable in interface IDirectEditingisCompletionAvailable in class AbstractDirectEditingFeaturepublic boolean stretchFieldToFitText()
IDirectEditing
stretchFieldToFitText in interface IDirectEditingstretchFieldToFitText in class AbstractDirectEditingFeaturepublic int getEditingType()
IDirectEditing
getEditingType in interface IDirectEditingpublic String getInitialValue(IDirectEditingContext context)
IDirectEditing
getInitialValue in interface IDirectEditingcontext - the context
public void setValue(String value,
IDirectEditingContext context)
IDirectEditing
setValue in interface IDirectEditingsetValue in class AbstractDirectEditingFeaturevalue - the valuecontext - the contextpublic IProposalSupport getProposalSupport()
IDirectEditing
If the customer wants to work with Objects he must provide an
implementation of IProposalSupport. In this case the following
methods of IDirectEditing 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);
getProposalSupport in interface IDirectEditinggetProposalSupport in class AbstractDirectEditingFeaturepublic boolean isAbort()
ICustomAbortableUndoRedoFeatureICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)/
ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext) have
been called and before the actual undo/redo operation is triggered. In
case this method returns true, the operation will be
cancelled by the Graphiti framework by throwing an
OperationCanceledException that causes am EMF revert of the
operation.
Implementing classes might e.g. set a flag in
ICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)/
ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext) as
cancellation indication and check that that flag here.
isAbort in interface ICustomAbortableUndoRedoFeaturetrue in case you want to cancel the current
operation, false otherwise.public boolean canUndo(IContext context)
IFeature
canUndo in interface ICustomUndoableFeaturecanUndo in interface ICustomUndoRedoFeaturecanUndo in interface IFeaturecanUndo in class AbstractFeaturecontext - this is the general input for this method
IContextpublic void preUndo(IContext context)
ICustomUndoRedoFeatureICustomUndoRedoFeature.postUndo(IContext).
preUndo in interface ICustomUndoRedoFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic void postUndo(IContext context)
ICustomUndoRedoFeatureICustomUndoRedoFeature.preUndo(IContext).
postUndo in interface ICustomUndoRedoFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic void undo(IContext context)
postUndo(IContext) instead
ICustomUndoableFeature
undo in interface ICustomUndoableFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic boolean canRedo(IContext context)
ICustomUndoableFeature
Note that as soon as any feature reports false here, also
all consecutive entries in the command stack are no longer reachable for
redo.
canRedo in interface ICustomUndoableFeaturecanRedo in interface ICustomUndoRedoFeaturecontext - this is the instance of the IContext object that was
in use when executing the feature
public void preRedo(IContext context)
ICustomUndoRedoFeatureICustomUndoRedoFeature.postRedo(IContext). (Usually it might be
sufficient to delegate to the execution method of the feature.)
preRedo in interface ICustomUndoRedoFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic void postRedo(IContext context)
ICustomUndoRedoFeatureICustomUndoRedoFeature.preRedo(IContext). (Usually it might be
sufficient to delegate to the execution method of the feature.)
postRedo in interface ICustomUndoRedoFeaturecontext - this is the instance of the IContext object that was
in use when executing the featurepublic void redo(IContext context)
postRedo(IContext) instead
ICustomUndoableFeature
redo in interface ICustomUndoableFeaturecontext - this is the instance of the IContext object that was
in use when executing the feature
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||