|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jaret.util.ui.table.editor.CellEditorBase
de.jaret.util.ui.table.editor.ObjectComboEditor
public class ObjectComboEditor
Editor using a ComboBox for selecting one of several objects supplied to the editor at creation time. A label provider is used for toString conversion.
| Nested Class Summary | |
|---|---|
class |
ObjectComboEditor.ToStringLabelProvider
Simple Labelprovider just using the toString method of any supplied object. |
| Field Summary | |
|---|---|
protected boolean |
_allowNull
if true allow null as a possible selection. |
protected org.eclipse.swt.widgets.Combo |
_combo
combox widget. |
protected java.util.List<? extends java.lang.Object> |
_itemList
object list for selection. |
protected org.eclipse.jface.viewers.ILabelProvider |
_labelProvider
label provider used. |
protected java.lang.String |
_nullText
the text displayed for null. |
protected java.lang.Object |
_oldVal
old value. |
protected java.lang.String[] |
_stringItems
list of items displayed. |
| Fields inherited from class de.jaret.util.ui.table.editor.CellEditorBase |
|---|
_column, _row, _table |
| Constructor Summary | |
|---|---|
ObjectComboEditor(java.util.List<? extends java.lang.Object> list,
org.eclipse.jface.viewers.ILabelProvider labelProvider,
boolean allowNull,
java.lang.String nullText)
Construct a new ObjectComboEditor with a list of selectabel Objects and an ILabelprovider. |
|
| Method Summary | |
|---|---|
void |
dispose()
Dispose whatever resouces have been allocated. |
void |
focusGained(org.eclipse.swt.events.FocusEvent arg0)
Nothing to do on gaining focus. |
void |
focusLost(org.eclipse.swt.events.FocusEvent arg0)
Store and end editing when focus is taken away. |
org.eclipse.swt.widgets.Control |
getEditorControl(JaretTable table,
IRow row,
IColumn column,
char typedKey)
Provide the Control for editing the value at row/column. |
int |
getPreferredHeight()
If the renderer *wishes* to be sized not the height of the cell, this method may be used to announce the preferred height of the control. |
protected void |
initItems()
|
void |
stopEditing(boolean storeInput)
End editing. |
| Methods inherited from class de.jaret.util.ui.table.editor.CellEditorBase |
|---|
handleClick |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.jaret.util.ui.table.editor.ICellEditor |
|---|
handleClick |
| Field Detail |
|---|
protected org.eclipse.swt.widgets.Combo _combo
protected java.lang.Object _oldVal
protected java.lang.String[] _stringItems
protected org.eclipse.jface.viewers.ILabelProvider _labelProvider
protected boolean _allowNull
protected java.lang.String _nullText
null.
protected java.util.List<? extends java.lang.Object> _itemList
| Constructor Detail |
|---|
public ObjectComboEditor(java.util.List<? extends java.lang.Object> list,
org.eclipse.jface.viewers.ILabelProvider labelProvider,
boolean allowNull,
java.lang.String nullText)
list - list of Objects that may be selected.labelProvider - label provider to be used or null. In the latter case a simple toString
label provider will be used.allowNull - if true null will always be a possible value in the comboBoxnullText - string to be displyed for the null value if allowed| Method Detail |
|---|
protected void initItems()
public org.eclipse.swt.widgets.Control getEditorControl(JaretTable table,
IRow row,
IColumn column,
char typedKey)
This method may return null indicating that the editor will not supply a control.
getEditorControl in interface ICellEditorgetEditorControl in class CellEditorBasetable - the table requesting the editorrow - rowcolumn - columntypedKey - the character typed when invoking the editor (may be 0 if the editor was invoked without typing
any key)
public void stopEditing(boolean storeInput)
stopEditing in interface ICellEditorstoreInput - if true the editor shall save the current input.public void dispose()
dispose in interface ICellEditordispose in class CellEditorBasepublic void focusGained(org.eclipse.swt.events.FocusEvent arg0)
focusGained in interface org.eclipse.swt.events.FocusListenerpublic void focusLost(org.eclipse.swt.events.FocusEvent arg0)
focusLost in interface org.eclipse.swt.events.FocusListenerpublic int getPreferredHeight()
getPreferredHeight in interface ICellEditorgetPreferredHeight in class CellEditorBase
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||