| |
|
| java.lang.Object org.eclipse.jface.viewers.CellEditor org.eclipse.jface.viewers.DialogCellEditor
All known Subclasses: org.eclipse.jface.viewers.ColorCellEditor,
DialogCellEditor | abstract public class DialogCellEditor extends CellEditor (Code) | | An abstract cell editor that uses a dialog.
Dialog cell editors usually have a label control on the left and a button on
the right. Pressing the button opens a dialog window (for example, a color dialog
or a file dialog) to change the cell editor's value.
The cell editor's value is the value of the dialog.
Subclasses may override the following methods:
createButton : creates the cell editor's button control
createContents : creates the cell editor's 'display value' control
updateContents : updates the cell editor's 'display value' control
after its value has changed
openDialogBox : opens the dialog box when the end user presses
the button
|
Constructor Summary | |
public | DialogCellEditor() | protected | DialogCellEditor(Composite parent) Creates a new dialog cell editor parented under the given control. | protected | DialogCellEditor(Composite parent, int style) Creates a new dialog cell editor parented under the given control. |
Method Summary | |
protected Button | createButton(Composite parent) Creates the button for this cell editor under the given parent control.
The default implementation of this framework method creates the button
display on the right hand side of the dialog cell editor. | protected Control | createContents(Composite cell) Creates the controls used to show the value of this cell editor.
The default implementation of this framework method creates
a label widget, using the same font and background color as the parent control.
Subclasses may reimplement. | protected Control | createControl(Composite parent) | public void | deactivate() | protected Object | doGetValue() | protected void | doSetFocus() | protected void | doSetValue(Object value) | protected Label | getDefaultLabel() Returns the default label widget created by createContents . | abstract protected Object | openDialogBox(Control cellEditorWindow) Opens a dialog box under the given parent control and returns the
dialog's value when it closes, or null if the dialog
was canceled or no selection was made in the dialog. | protected void | updateContents(Object value) Updates the controls showing the value of this cell editor.
The default implementation of this framework method just converts
the passed object to a string using toString and
sets this as the text of the label widget.
Subclasses may reimplement. |
CELL_EDITOR_IMG_DOTS_BUTTON | final public static String CELL_EDITOR_IMG_DOTS_BUTTON(Code) | | Image registry key for three dot image (value "cell_editor_dots_button_image" ).
|
DialogCellEditor | public DialogCellEditor()(Code) | | Creates a new dialog cell editor with no control
since: 2.1 |
DialogCellEditor | protected DialogCellEditor(Composite parent)(Code) | | Creates a new dialog cell editor parented under the given control.
The cell editor value is null initially, and has no
validator.
Parameters: parent - the parent control |
DialogCellEditor | protected DialogCellEditor(Composite parent, int style)(Code) | | Creates a new dialog cell editor parented under the given control.
The cell editor value is null initially, and has no
validator.
Parameters: parent - the parent control Parameters: style - the style bits since: 2.1 |
createButton | protected Button createButton(Composite parent)(Code) | | Creates the button for this cell editor under the given parent control.
The default implementation of this framework method creates the button
display on the right hand side of the dialog cell editor. Subclasses
may extend or reimplement.
Parameters: parent - the parent control the new button control |
createContents | protected Control createContents(Composite cell)(Code) | | Creates the controls used to show the value of this cell editor.
The default implementation of this framework method creates
a label widget, using the same font and background color as the parent control.
Subclasses may reimplement. If you reimplement this method, you
should also reimplement updateContents .
Parameters: cell - the control for this cell editor the underlying control |
createControl | protected Control createControl(Composite parent)(Code) | | |
deactivate | public void deactivate()(Code) | | |
doSetFocus | protected void doSetFocus()(Code) | | |
getDefaultLabel | protected Label getDefaultLabel()(Code) | | Returns the default label widget created by createContents .
the default label widget |
openDialogBox | abstract protected Object openDialogBox(Control cellEditorWindow)(Code) | | Opens a dialog box under the given parent control and returns the
dialog's value when it closes, or null if the dialog
was canceled or no selection was made in the dialog.
This framework method must be implemented by concrete subclasses.
It is called when the user has pressed the button and the dialog
box must pop up.
Parameters: cellEditorWindow - the parent control cell editor's windowso that a subclass can adjust the dialog box accordingly the selected value, or null if the dialog was canceled or no selection was made in the dialog |
updateContents | protected void updateContents(Object value)(Code) | | Updates the controls showing the value of this cell editor.
The default implementation of this framework method just converts
the passed object to a string using toString and
sets this as the text of the label widget.
Subclasses may reimplement. If you reimplement this method, you
should also reimplement createContents .
Parameters: value - the new value of this cell editor |
|
|
|