|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.viewers.CellEditor | +--org.eclipse.jface.viewers.TextCellEditor
A cell editor that manages a text entry field. The cell editor's value is the text string itself.
This class may be instantiated; it is not intended to be subclassed.
Nested Class Summary |
Nested classes inherited from class org.eclipse.jface.viewers.CellEditor |
CellEditor.LayoutData |
Field Summary | |
protected Text |
text
The text control; initially null . |
Fields inherited from class org.eclipse.jface.viewers.CellEditor |
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO |
Constructor Summary | |
TextCellEditor(Composite parent)
Creates a new text string cell editor parented under the given control. |
Method Summary | |
protected Control |
createControl(Composite parent)
Creates the control for this cell editor under the given parent control. |
protected Object |
doGetValue()
The TextCellEditor implementation of
this CellEditor framework method returns
the text string. |
protected void |
doSetFocus()
Sets the focus to the cell editor's control. |
protected void |
doSetValue(Object value)
The TextCellEditor implementation of
this CellEditor framework method accepts
a text string (type String ). |
protected void |
editOccured(ModifyEvent e)
Processes a modify event that occurred in this text cell editor. |
CellEditor.LayoutData |
getLayoutData()
Since a text editor field is scrollable we don't set a minimumSize. |
boolean |
isCopyEnabled()
The TextCellEditor implementation of this
CellEditor method returns true if
the current selection is not empty. |
boolean |
isCutEnabled()
The TextCellEditor implementation of this
CellEditor method returns true if
the current selection is not empty. |
boolean |
isDeleteEnabled()
The TextCellEditor implementation of this
CellEditor method returns true
if there is a selection or if the caret is not positioned
at the end of the text. |
boolean |
isPasteEnabled()
The TextCellEditor implementation of this
CellEditor method always returns true . |
boolean |
isSaveAllEnabled()
The TextCellEditor implementation of this
CellEditor method always returns true . |
boolean |
isSelectAllEnabled()
Returns true if this cell editor is
able to perform the select all action. |
void |
performCopy()
The TextCellEditor implementation of this
CellEditor method copies the
current selection to the clipboard. |
void |
performCut()
The TextCellEditor implementation of this
CellEditor method cuts the
current selection to the clipboard. |
void |
performDelete()
The TextCellEditor implementation of this
CellEditor method deletes the
current selection or, if there is no selection,
the character next character from the current position. |
void |
performPaste()
The TextCellEditor implementation of this
CellEditor method pastes the
the clipboard contents over the current selection. |
void |
performSelectAll()
The TextCellEditor implementation of this
CellEditor method selects all of the
current text. |
Methods inherited from class org.eclipse.jface.viewers.CellEditor |
activate, addListener, addPropertyChangeListener, deactivate, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, getControl, getErrorMessage, getValidator, getValue, isActivated, isCorrect, isDirty, isFindEnabled, isRedoEnabled, isUndoEnabled, isValueValid, keyReleaseOccured, performFind, performRedo, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setValidator, setValue, setValueValid, valueChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Text text
null
.
Constructor Detail |
public TextCellEditor(Composite parent)
parent
- the parent controlMethod Detail |
protected Control createControl(Composite parent)
CellEditor
This framework method must be implemented by concrete subclasses.
createControl
in class CellEditor
parent
- the parent control
null
if this cell editor has no controlprotected Object doGetValue()
TextCellEditor
implementation of
this CellEditor
framework method returns
the text string.
doGetValue
in class CellEditor
CellEditor.getValue()
protected void doSetFocus()
CellEditor
This framework method must be implemented by concrete subclasses.
doSetFocus
in class CellEditor
CellEditor.setFocus()
protected void doSetValue(Object value)
TextCellEditor
implementation of
this CellEditor
framework method accepts
a text string (type String
).
doSetValue
in class CellEditor
value
- a text string (type String
)CellEditor.setValue(java.lang.Object)
protected void editOccured(ModifyEvent e)
fireEditorValueChanged
.
Subclasses should call this method at appropriate times. Subclasses
may extend or reimplement.
e
- the SWT modify eventpublic CellEditor.LayoutData getLayoutData()
getLayoutData
in class CellEditor
public boolean isCopyEnabled()
TextCellEditor
implementation of this
CellEditor
method returns true
if
the current selection is not empty.
isCopyEnabled
in class CellEditor
true
if copy is possible,
false
otherwisepublic boolean isCutEnabled()
TextCellEditor
implementation of this
CellEditor
method returns true
if
the current selection is not empty.
isCutEnabled
in class CellEditor
true
if cut is possible,
false
otherwisepublic boolean isDeleteEnabled()
TextCellEditor
implementation of this
CellEditor
method returns true
if there is a selection or if the caret is not positioned
at the end of the text.
isDeleteEnabled
in class CellEditor
true
if delete is possible,
false
otherwisepublic boolean isPasteEnabled()
TextCellEditor
implementation of this
CellEditor
method always returns true
.
isPasteEnabled
in class CellEditor
true
if paste is possible,
false
otherwisepublic boolean isSaveAllEnabled()
TextCellEditor
implementation of this
CellEditor
method always returns true
.
public boolean isSelectAllEnabled()
true
if this cell editor is
able to perform the select all action.
This default implementation always returns
false
.
Subclasses may override
isSelectAllEnabled
in class CellEditor
true
if select all is possible,
false
otherwisepublic void performCopy()
TextCellEditor
implementation of this
CellEditor
method copies the
current selection to the clipboard.
performCopy
in class CellEditor
public void performCut()
TextCellEditor
implementation of this
CellEditor
method cuts the
current selection to the clipboard.
performCut
in class CellEditor
public void performDelete()
TextCellEditor
implementation of this
CellEditor
method deletes the
current selection or, if there is no selection,
the character next character from the current position.
performDelete
in class CellEditor
public void performPaste()
TextCellEditor
implementation of this
CellEditor
method pastes the
the clipboard contents over the current selection.
performPaste
in class CellEditor
public void performSelectAll()
TextCellEditor
implementation of this
CellEditor
method selects all of the
current text.
performSelectAll
in class CellEditor
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |