Package com.iizigo.text
Class TTextCellEditor
java.lang.Object
org.eclipse.jface.viewers.CellEditor
com.iizigo.text.TTextCellEditor
A cell editor that manages a text entry field. The cell editor's value is the text string itself.
This class may be instantiated or subclassed.
- Nested Class Summary- Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor- CellEditor.LayoutData
- Field SummaryFields- Fields inherited from class org.eclipse.jface.viewers.CellEditor- COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
- Constructor SummaryConstructorsConstructorDescription- TTextCellEditor- (int column, Composite parent) Creates a new text string cell editor parented under the given control.
- Method SummaryModifier and TypeMethodDescription- protected Control- createControl- (Composite parent) - protected booleanThis implementation of- CellEditor.dependsOnExternalFocusListener()returns false if the current instance's class is TextCellEditor, and true otherwise.- protected ObjectThe- TextCellEditorimplementation of this- CellEditorframework method returns the text string.- protected void- protected void- doSetValue- (Object value) The- TextCellEditorimplementation of this- CellEditorframework method accepts a text string (type- String).- protected voidProcesses a modify event that occurred in this text cell editor.Since a text editor field is scrollable we don't set a minimumSize.- protected voidHandles a default selection event from the text control by applying the editor value and deactivating this cell editor.- booleanThe- TextCellEditorimplementation of this- CellEditormethod returns- trueif the current selection is not empty.- booleanThe- TextCellEditorimplementation of this- CellEditormethod returns- trueif the current selection is not empty.- booleanThe- TextCellEditorimplementation of this- CellEditormethod returns- trueif there is a selection or if the caret is not positioned at the end of the text.- booleanThe- TextCellEditorimplementation of this- CellEditormethod always returns- true.- booleanCheck if save all is enabled- booleanReturns- trueif this cell editor is able to perform the select all action.- protected void- keyReleaseOccured- (KeyEvent keyEvent) Processes a key release event that occurred in this cell editor.- voidThe- TextCellEditorimplementation of this- CellEditormethod copies the current selection to the clipboard.- voidThe- TextCellEditorimplementation of this- CellEditormethod cuts the current selection to the clipboard.- voidThe- TextCellEditorimplementation of this- CellEditormethod deletes the current selection or, if there is no selection, the character next character from the current position.- voidThe- TextCellEditorimplementation of this- CellEditormethod pastes the the clipboard contents over the current selection.- voidThe- TextCellEditorimplementation of this- CellEditormethod selects all of the current text.- Methods inherited from class org.eclipse.jface.viewers.CellEditor- activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCorrect, isDirty, isFindEnabled, isRedoEnabled, isUndoEnabled, isValueValid, markDirty, performFind, performRedo, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
- Field Details- textThe text control; initially- null.
 
- Constructor Details- TTextCellEditorCreates a new text string cell editor parented under the given control. The cell editor value is the string itself, which is initially the empty string. Initially, the cell editor has no cell validator.- Parameters:
- parent- the parent control
 
 
- Method Details- createControl- Specified by:
- createControlin class- CellEditor
 
- doGetValueThe- TextCellEditorimplementation of this- CellEditorframework method returns the text string.- Specified by:
- doGetValuein class- CellEditor
- Returns:
- the text string
 
- doSetFocusprotected void doSetFocus()- Specified by:
- doSetFocusin class- CellEditor
 
- doSetValueThe- TextCellEditorimplementation of this- CellEditorframework method accepts a text string (type- String).- Specified by:
- doSetValuein class- CellEditor
- Parameters:
- value- a text string (type- String)
 
- editOccuredProcesses a modify event that occurred in this text cell editor. This framework method performs validation and sets the error message accordingly, and then reports a change via- fireEditorValueChanged. Subclasses should call this method at appropriate times. Subclasses may extend or reimplement.- Parameters:
- e- the SWT modify event
 
- getLayoutDataSince a text editor field is scrollable we don't set a minimumSize.- Overrides:
- getLayoutDatain class- CellEditor
 
- handleDefaultSelectionHandles a default selection event from the text control by applying the editor value and deactivating this cell editor.- Parameters:
- event- the selection event
- Since:
- 3.0
 
- isCopyEnabledpublic boolean isCopyEnabled()The- TextCellEditorimplementation of this- CellEditormethod returns- trueif the current selection is not empty.- Overrides:
- isCopyEnabledin class- CellEditor
 
- isCutEnabledpublic boolean isCutEnabled()The- TextCellEditorimplementation of this- CellEditormethod returns- trueif the current selection is not empty.- Overrides:
- isCutEnabledin class- CellEditor
 
- isDeleteEnabledpublic boolean isDeleteEnabled()The- TextCellEditorimplementation of this- CellEditormethod returns- trueif there is a selection or if the caret is not positioned at the end of the text.- Overrides:
- isDeleteEnabledin class- CellEditor
 
- isPasteEnabledpublic boolean isPasteEnabled()The- TextCellEditorimplementation of this- CellEditormethod always returns- true.- Overrides:
- isPasteEnabledin class- CellEditor
 
- isSaveAllEnabledpublic boolean isSaveAllEnabled()Check if save all is enabled- Returns:
- true if it is
 
- isSelectAllEnabledpublic boolean isSelectAllEnabled()Returns- trueif this cell editor is able to perform the select all action.- This default implementation always returns - false.- Subclasses may override - Overrides:
- isSelectAllEnabledin class- CellEditor
- Returns:
- trueif select all is possible,- falseotherwise
 
- keyReleaseOccuredProcesses a key release event that occurred in this cell editor.- The - TextCellEditorimplementation of this framework method ignores when the RETURN key is pressed since this is handled in- handleDefaultSelection. An exception is made for Ctrl+Enter for multi-line texts, since a default selection event is not sent in this case.- Overrides:
- keyReleaseOccuredin class- CellEditor
- Parameters:
- keyEvent- the key event
 
- performCopypublic void performCopy()The- TextCellEditorimplementation of this- CellEditormethod copies the current selection to the clipboard.- Overrides:
- performCopyin class- CellEditor
 
- performCutpublic void performCut()The- TextCellEditorimplementation of this- CellEditormethod cuts the current selection to the clipboard.- Overrides:
- performCutin class- CellEditor
 
- performDeletepublic void performDelete()The- TextCellEditorimplementation of this- CellEditormethod deletes the current selection or, if there is no selection, the character next character from the current position.- Overrides:
- performDeletein class- CellEditor
 
- performPastepublic void performPaste()The- TextCellEditorimplementation of this- CellEditormethod pastes the the clipboard contents over the current selection.- Overrides:
- performPastein class- CellEditor
 
- performSelectAllpublic void performSelectAll()The- TextCellEditorimplementation of this- CellEditormethod selects all of the current text.- Overrides:
- performSelectAllin class- CellEditor
 
- dependsOnExternalFocusListenerprotected boolean dependsOnExternalFocusListener()This implementation of- CellEditor.dependsOnExternalFocusListener()returns false if the current instance's class is TextCellEditor, and true otherwise. Subclasses that hook their own focus listener should override this method and return false. See also bug 58777.- Overrides:
- dependsOnExternalFocusListenerin class- CellEditor
- Since:
- 3.4