public class NumberCellEditor
extends org.eclipse.jface.viewers.CellEditor
Number.
This class may be instantiated; it is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.swt.widgets.Text |
text
The text control; initially
null. |
| Constructor and Description |
|---|
NumberCellEditor(Class<T> typeClass)
Creates a new text string cell editor with no control The cell editor
value is the string itself, which is initially the empty string.
|
NumberCellEditor(org.eclipse.swt.widgets.Composite parent,
Class<T> clazz)
Creates a new text string cell editor parented under the given control.
|
NumberCellEditor(org.eclipse.swt.widgets.Composite parent,
int style,
Class<T> clazz)
Creates a new text string cell editor parented under the given control.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.swt.widgets.Control |
createControl(org.eclipse.swt.widgets.Composite parent) |
protected Object |
doGetValue()
The
NumberCellEditor implementation of this
CellEditor framework method returns the text string. |
protected void |
doSetFocus() |
protected void |
doSetValue(Object value)
The
NumberCellEditor implementation of this
CellEditor framework method accepts a text string (type
String). |
protected void |
editOccured(org.eclipse.swt.events.ModifyEvent e)
Processes a modify event that occurred in this text cell editor.
|
org.eclipse.jface.viewers.CellEditor.LayoutData |
getLayoutData()
Since a text editor field is scrollable we don't set a minimumSize.
|
protected void |
handleDefaultSelection(org.eclipse.swt.events.SelectionEvent event)
Handles a default selection event from the text control by applying the
editor value and deactivating this cell editor.
|
protected static Object |
invoke(String name,
Object object) |
boolean |
isCopyEnabled()
The
NumberCellEditor implementation of this
CellEditor method returns true if the current
selection is not empty. |
boolean |
isCutEnabled()
The
NumberCellEditor implementation of this
CellEditor method returns true if the current
selection is not empty. |
boolean |
isDeleteEnabled()
The
NumberCellEditor 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 |
isNullAllowed() |
boolean |
isPasteEnabled()
The
NumberCellEditor implementation of this
CellEditor method always returns true. |
boolean |
isSaveAllEnabled()
The
NumberCellEditor implementation of this
CellEditor method always returns true. |
boolean |
isSelectAllEnabled()
Returns
true if this cell editor is able to perform the
select all action. |
protected void |
keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent)
Processes a key release event that occurred in this cell editor.
|
void |
performCopy()
The
NumberCellEditor implementation of this
CellEditor method copies the current selection to the
clipboard. |
void |
performCut()
The
NumberCellEditor implementation of this
CellEditor method cuts the current selection to the
clipboard. |
void |
performDelete()
The
NumberCellEditor 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
NumberCellEditor implementation of this
CellEditor method pastes the the clipboard contents over the
current selection. |
void |
performSelectAll()
The
NumberCellEditor implementation of this
CellEditor method selects all of the current text. |
void |
setNullAllowed(boolean isNullAllowed) |
activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, 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, valueChangedpublic NumberCellEditor(Class<T> typeClass)
public NumberCellEditor(org.eclipse.swt.widgets.Composite parent,
Class<T> clazz)
parent - the parent controlpublic NumberCellEditor(org.eclipse.swt.widgets.Composite parent,
int style,
Class<T> clazz)
parent - the parent controlstyle - the style bitsprotected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
createControl in class org.eclipse.jface.viewers.CellEditorprotected Object doGetValue()
NumberCellEditor implementation of this
CellEditor framework method returns the text string.doGetValue in class org.eclipse.jface.viewers.CellEditorprotected void doSetFocus()
doSetFocus in class org.eclipse.jface.viewers.CellEditorprotected void doSetValue(Object value)
NumberCellEditor implementation of this
CellEditor framework method accepts a text string (type
String).doSetValue in class org.eclipse.jface.viewers.CellEditorvalue - a text string (type String)protected void editOccured(org.eclipse.swt.events.ModifyEvent e)
fireEditorValueChanged. Subclasses should call this method
at appropriate times. Subclasses may extend or reimplement.e - the SWT modify eventpublic org.eclipse.jface.viewers.CellEditor.LayoutData getLayoutData()
getLayoutData in class org.eclipse.jface.viewers.CellEditorprotected void handleDefaultSelection(org.eclipse.swt.events.SelectionEvent event)
event - the selection eventpublic boolean isCopyEnabled()
NumberCellEditor implementation of this
CellEditor method returns true if the current
selection is not empty.isCopyEnabled in class org.eclipse.jface.viewers.CellEditorpublic boolean isCutEnabled()
NumberCellEditor implementation of this
CellEditor method returns true if the current
selection is not empty.isCutEnabled in class org.eclipse.jface.viewers.CellEditorpublic boolean isDeleteEnabled()
NumberCellEditor 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 org.eclipse.jface.viewers.CellEditorpublic boolean isPasteEnabled()
NumberCellEditor implementation of this
CellEditor method always returns true.isPasteEnabled in class org.eclipse.jface.viewers.CellEditorpublic boolean isSaveAllEnabled()
NumberCellEditor 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 org.eclipse.jface.viewers.CellEditortrue if select all is possible, false
otherwiseprotected void keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent)
The NumberCellEditor implementation 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.
keyReleaseOccured in class org.eclipse.jface.viewers.CellEditorkeyEvent - the key eventpublic void performCopy()
NumberCellEditor implementation of this
CellEditor method copies the current selection to the
clipboard.performCopy in class org.eclipse.jface.viewers.CellEditorpublic void performCut()
NumberCellEditor implementation of this
CellEditor method cuts the current selection to the
clipboard.performCut in class org.eclipse.jface.viewers.CellEditorpublic void performDelete()
NumberCellEditor 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 org.eclipse.jface.viewers.CellEditorpublic void performPaste()
NumberCellEditor implementation of this
CellEditor method pastes the the clipboard contents over the
current selection.performPaste in class org.eclipse.jface.viewers.CellEditorpublic void performSelectAll()
NumberCellEditor implementation of this
CellEditor method selects all of the current text.performSelectAll in class org.eclipse.jface.viewers.CellEditorpublic boolean isNullAllowed()
public void setNullAllowed(boolean isNullAllowed)
Copyright © 2022 Fraunhofer IWU. All rights reserved.