|
||||||||||
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 |
delegate
|
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. |
java.lang.String |
checkValueValid(java.lang.String value,
IDirectEditingContext context)
This method will be called by clients many times to see if current value is valid and could be set. |
java.lang.String |
completeValue(java.lang.String value,
int caretPos,
java.lang.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. |
java.lang.String |
getInitialValue(IDirectEditingContext context)
Provides the initial value for the opened text editing UI component. |
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. |
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 |
isAutoCompletionEnabled()
Checks if auto completion is enabled. |
boolean |
isCompletionAvailable()
Checks if completion is available. |
void |
redo(IContext context)
This method will be called to actually do the work needed for redo. |
void |
setValue(java.lang.String value,
IDirectEditingContext context)
Set the new value. |
boolean |
stretchFieldToFitText()
Stretch input field to fit its contents. |
void |
undo(IContext context)
This method will be called to actually do the work needed for undo. |
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, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, 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 delegate
Constructor Detail |
---|
public DirectEditingFeatureForPattern(IFeatureProvider featureProvider, IDirectEditing pattern)
DirectEditingFeatureForPattern
.
featureProvider
- the feature providerpattern
- the patternMethod Detail |
---|
public boolean canDirectEdit(IDirectEditingContext context)
IDirectEditing
canDirectEdit
in interface IDirectEditing
canDirectEdit
in class AbstractDirectEditingFeature
context
- the context
IFeature.canExecute(org.eclipse.graphiti.features.context.IContext)
public java.lang.String checkValueValid(java.lang.String value, IDirectEditingContext context)
IDirectEditing
checkValueValid
in interface IDirectEditing
checkValueValid
in class AbstractDirectEditingFeature
value
- the valuecontext
- the context
public java.lang.String completeValue(java.lang.String value, int caretPos, java.lang.String choosenValue, IDirectEditingContext context)
IDirectEditing
completeValue
in interface IDirectEditing
completeValue
in class AbstractDirectEditingFeature
value
- current valuecaretPos
- current cursor positionchoosenValue
- value choosen by usercontext
- the context
public java.lang.String[] getPossibleValues(IDirectEditingContext context)
IDirectEditing
getPossibleValues
in interface IDirectEditing
getPossibleValues
in class AbstractDirectEditingFeature
context
- the context
public java.lang.String[] getValueProposals(java.lang.String value, int caretPos, IDirectEditingContext context)
IDirectEditing
getValueProposals
in interface IDirectEditing
getValueProposals
in class AbstractDirectEditingFeature
value
- current valuecaretPos
- current cursor positioncontext
- the context
public boolean isAutoCompletionEnabled()
IDirectEditing
isAutoCompletionEnabled
in interface IDirectEditing
isAutoCompletionEnabled
in class AbstractDirectEditingFeature
public boolean isCompletionAvailable()
IDirectEditing
isCompletionAvailable
in interface IDirectEditing
isCompletionAvailable
in class AbstractDirectEditingFeature
public boolean stretchFieldToFitText()
IDirectEditing
stretchFieldToFitText
in interface IDirectEditing
stretchFieldToFitText
in class AbstractDirectEditingFeature
public int getEditingType()
IDirectEditing
getEditingType
in interface IDirectEditing
public java.lang.String getInitialValue(IDirectEditingContext context)
IDirectEditing
getInitialValue
in interface IDirectEditing
context
- the context
public void setValue(java.lang.String value, IDirectEditingContext context)
IDirectEditing
setValue
in interface IDirectEditing
setValue
in class AbstractDirectEditingFeature
value
- 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 IDirectEditing
getProposalSupport
in class AbstractDirectEditingFeature
public boolean canUndo(IContext context)
IFeature
canUndo
in interface ICustomUndoableFeature
canUndo
in interface IFeature
canUndo
in class AbstractFeature
context
- this is the general input for this method
IContext
public void undo(IContext context)
ICustomUndoableFeature
undo
in interface ICustomUndoableFeature
context
- 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 ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the feature
public void redo(IContext context)
ICustomUndoableFeature
redo
in interface ICustomUndoableFeature
context
- 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 |