public class TextDialogCellEditor
extends org.eclipse.jface.viewers.CellEditor
Initially focus will be on the text. On tabbing focus will be on the button. If the focus is on the button and the return key is pressed, the dialog will open. On tabbing the button focus will shift to next cell.
Dialog to be opened must be coded in the selection listener of the button. The value to be set to the text from dialog if any must be set using setTextValue method.
Do not instantiate or extend this class. Use CellEditorFactory to instantiate this class.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
Constructor and Description |
---|
TextDialogCellEditor()
Deprecated.
This constructor is for internal use only. Use CellEditorFactory to instantiate this class.
|
TextDialogCellEditor(org.eclipse.swt.widgets.Composite parent)
Deprecated.
This constructor is for internal use only. Use CellEditorFactory to instantiate this class.
|
TextDialogCellEditor(org.eclipse.swt.widgets.Composite parent, int style)
Deprecated.
This constructor is for internal use only. Use CellEditorFactory to instantiate this class.
|
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Control | createControl(org.eclipse.swt.widgets.Composite parent)
Creates the composite control with a text and button for this cell editor under the given parent control.
|
protected java.lang.Object | doGetValue()
The TextDialogCellEditor implementation of this CellEditor framework method returns the text string.
|
protected void | doSetFocus()
Sets the focus to the cell editor's text control.
|
protected void | doSetValue(java.lang.Object value)
The TextDialogCellEditor implementation of this CellEditor framework method accepts a text string (type String).
|
org.eclipse.swt.widgets.Button | getButton()
Returns the button control in the editor composite.
|
org.eclipse.swt.graphics.Image | getButtonImage()
Returns the button display image.
|
java.lang.String | getButtonText()
Returns button display text.
|
org.eclipse.jface.viewers.CellEditor.LayoutData | getLayoutData()
Creates a new layout with no value.
|
org.eclipse.swt.widgets.Text | getText()
Returns the text control in the editor composite.
|
boolean | isCopyEnabled()
The TextDialogCellEditor implementation of this CellEditor method returns true if the current selection is not empty.
|
boolean | isCutEnabled()
The TextDialogCellEditor implementation of this CellEditor method returns true if the current selection is not empty.
|
boolean | isDeleteEnabled()
The TextDialogCellEditor 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 TextDialogCellEditor implementation of this CellEditor returns true if the text is not null and is not disposed.
|
boolean | isSaveAllEnabled()
The TextDialogCellEditor implementation of this CellEditor method returns true if the text is not null and is not disposed.
|
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 TextDialogCellEditor implementation of this CellEditor method copies the current selection to the clipboard.
|
void | performCut()
The TextDialogCellEditor implementation of this CellEditor method cuts the current selection to the clipboard.
|
void | performDelete()
The TextDialogCellEditor implementation of this CellEditor method deletes the current selection or, if there is no selection, deletes the character next character from the current position.
|
void | performPaste()
The TextDialogCellEditor implementation of this CellEditor method pastes the clipboard contents over the current selection.
|
void | performSelectAll()
The TextDialogCellEditor implementation of this CellEditor method selects all of the current text.
|
void | setButtonImage(org.eclipse.swt.graphics.Image image)
Sets the button display image.
|
void | setButtonText(java.lang.String text)
Sets the button display text.
|
void | setTextValue(java.lang.Object newValue)
This method must be used by the caller to set the text on to the text box.
|
public static final java.lang.String COPYRIGHT
public TextDialogCellEditor()
public TextDialogCellEditor(org.eclipse.swt.widgets.Composite parent)
public TextDialogCellEditor(org.eclipse.swt.widgets.Composite parent, int style)
protected org.eclipse.swt.widgets.Control createControl(org.eclipse.swt.widgets.Composite parent)
protected java.lang.Object doGetValue()
protected void doSetFocus()
protected void doSetValue(java.lang.Object value)
public org.eclipse.jface.viewers.CellEditor.LayoutData getLayoutData()
public boolean isCopyEnabled()
public boolean isCutEnabled()
public boolean isDeleteEnabled()
public boolean isPasteEnabled()
public boolean isSaveAllEnabled()
public boolean isSelectAllEnabled()
protected void keyReleaseOccured(org.eclipse.swt.events.KeyEvent keyEvent)
The TextDialogCellEditor implementation of this framework method ignores when the RETURN key except for Ctrl+Enter for multi-line texts.
public void performCopy()
public void performCut()
public void performDelete()
public void performPaste()
public void performSelectAll()
public void setButtonImage(org.eclipse.swt.graphics.Image image)
public void setButtonText(java.lang.String text)
public org.eclipse.swt.graphics.Image getButtonImage()
public java.lang.String getButtonText()
public void setTextValue(java.lang.Object newValue)
public org.eclipse.swt.widgets.Text getText()
public org.eclipse.swt.widgets.Button getButton()