|
||||||||||
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
public abstract class AbstractDirectEditingFeature
The Class AbstractDirectEditingFeature.
Field Summary | |
---|---|
protected static java.lang.String[] |
EMPTY_STRING_ARRAY
The Constant EMPTY_STRING_ARRAY. |
private static java.lang.String |
NAME
|
private boolean |
valueChanged
Used to track if direct editing did really change anything. |
Fields inherited from interface org.eclipse.graphiti.func.IDirectEditing |
---|
TYPE_CHECK, TYPE_COLOR, TYPE_DIALOG, TYPE_DROPDOWN, TYPE_DROPDOWN_READ_ONLY, TYPE_MULTILINETEXT, TYPE_NONE, TYPE_TEXT |
Constructor Summary | |
---|---|
AbstractDirectEditingFeature(IFeatureProvider fp)
Creates a new AbstractDirectEditingFeature . |
Method Summary | |
---|---|
boolean |
canDirectEdit(IDirectEditingContext context)
Checks if the feature can perform direct editing on the context handed over. |
boolean |
canExecute(IContext context)
Decides if the current feature can execute with the given context. |
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. |
void |
execute(IContext context)
Executes the current feature with the given context. |
java.lang.String |
getName()
Gets the name. |
java.lang.String[] |
getPossibleValues(IDirectEditingContext context)
This value will be used if the cell editor is 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 |
hasDoneChanges()
Returns true only if the direct editing feature really has changed anything. |
boolean |
isAutoCompletionEnabled()
Checks if auto completion is enabled. |
boolean |
isCompletionAvailable()
Checks if completion is available. |
void |
setValueChanged()
Called by the framework (@see DirectEditingFeatureCommandWithContext) to indicate that this direct editing feature execution has really changed something. |
boolean |
stretchTextfieldToFitText()
Stretch textfield to fit text. |
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
---|
addGraphicalRepresentation, canUndo, 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.func.IDirectEditing |
---|
getEditingType, getInitialValue, setValue |
Methods inherited from interface org.eclipse.graphiti.features.IFeature |
---|
canUndo, isAvailable |
Methods inherited from interface org.eclipse.graphiti.IDescription |
---|
getDescription |
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
---|
getFeatureProvider |
Field Detail |
---|
protected static final java.lang.String[] EMPTY_STRING_ARRAY
private boolean valueChanged
private static final java.lang.String NAME
Constructor Detail |
---|
public AbstractDirectEditingFeature(IFeatureProvider fp)
AbstractDirectEditingFeature
.
fp
- the fpMethod Detail |
---|
public boolean canExecute(IContext context)
IFeature
canExecute
in interface IFeature
context
- this is the general input for this method
IContext
public boolean canDirectEdit(IDirectEditingContext context)
IDirectEditing
canDirectEdit
in interface IDirectEditing
context
- the context
IDirecEditingFeature.canExecute()
public void execute(IContext context)
IFeature
execute
in interface IFeature
context
- this is the general input for this methodIContext
public boolean hasDoneChanges()
hasDoneChanges
in interface IFeature
hasDoneChanges
in class AbstractFeature
true
if the feature should appear in the undo stack,
false
otherwiseorg.eclipse.graphiti.features.impl.AbstractFeature#isUndoable()
public final void setValueChanged()
public java.lang.String[] getPossibleValues(IDirectEditingContext context)
IDirectEditing
getPossibleValues
in interface IDirectEditing
context
- the context
public java.lang.String[] getValueProposals(java.lang.String value, int caretPos, IDirectEditingContext context)
IDirectEditing
getValueProposals
in interface IDirectEditing
value
- current valuecaretPos
- current cursor positioncontext
- the context
public java.lang.String checkValueValid(java.lang.String value, IDirectEditingContext context)
IDirectEditing
checkValueValid
in interface IDirectEditing
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
value
- current valuecaretPos
- current cursor positionchoosenValue
- value choosen by usercontext
- the context
public boolean stretchTextfieldToFitText()
IDirectEditing
stretchTextfieldToFitText
in interface IDirectEditing
public boolean isAutoCompletionEnabled()
IDirectEditing
isAutoCompletionEnabled
in interface IDirectEditing
public boolean isCompletionAvailable()
IDirectEditing
isCompletionAvailable
in interface IDirectEditing
public java.lang.String getName()
IName
getName
in interface IName
getName
in class AbstractFeature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |