Runtime

org.eclipse.gmf.runtime.common.ui.services.properties.extended
Class ExtendedComboBoxCellEditor

java.lang.Object
  extended by org.eclipse.jface.viewers.CellEditor
      extended by org.eclipse.gmf.runtime.common.ui.services.properties.extended.ExtendedComboBoxCellEditor

public class ExtendedComboBoxCellEditor
extends CellEditor


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor
CellEditor.LayoutData
 
Field Summary
protected  java.util.List list
          This keeps track of the list of model objects.
 
Fields inherited from class org.eclipse.jface.viewers.CellEditor
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO
 
Constructor Summary
ExtendedComboBoxCellEditor(Composite parent, java.util.List list, ILabelProvider labelProvider, int style)
          Convenience constructor for ExtendedComboBoxCellEditor
ExtendedComboBoxCellEditor(Composite parent, java.lang.String[] items, int style)
          Creates a new cell editor with a combo containing the given list of choices and parented under the given control.
ExtendedComboBoxCellEditor(Composite parent, java.lang.String[] items, java.lang.String emptyItem, int style)
          Creates a new cell editor with a combo containing the given list of choices and parented under the given control.
 
Method Summary
protected  Control createControl(Composite parent)
           
static java.lang.String[] createItems(java.util.List list, ILabelProvider labelProvider)
          Create a list of String items.
 java.lang.Object doGetValue()
           
protected  void doSetFocus()
           
 void doSetValue(java.lang.Object value)
           
 CellEditor.LayoutData getLayoutData()
          Sets the minimum width of the cell to 30 pixels to make sure the arrow button is visible even when the list contains long strings.
 
Methods inherited from class org.eclipse.jface.viewers.CellEditor
activate, activate, addListener, addPropertyChangeListener, create, deactivate, deactivate, dependsOnExternalFocusListener, dispose, fireApplyEditorValue, fireCancelEditor, fireEditorValueChanged, fireEnablementChanged, focusLost, getControl, getDoubleClickTimeout, getErrorMessage, getStyle, getValidator, getValue, isActivated, isCopyEnabled, isCorrect, isCutEnabled, isDeleteEnabled, isDirty, isFindEnabled, isPasteEnabled, isRedoEnabled, isSelectAllEnabled, isUndoEnabled, isValueValid, keyReleaseOccured, markDirty, performCopy, performCut, performDelete, performFind, performPaste, performRedo, performSelectAll, performUndo, removeListener, removePropertyChangeListener, setErrorMessage, setFocus, setStyle, setValidator, setValue, setValueValid, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

protected java.util.List list
This keeps track of the list of model objects.

Constructor Detail

ExtendedComboBoxCellEditor

public ExtendedComboBoxCellEditor(Composite parent,
                                  java.util.List list,
                                  ILabelProvider labelProvider,
                                  int style)
Convenience constructor for ExtendedComboBoxCellEditor

Parameters:
parent - the parent control
list - the list of strings for the combo box
labelProvider - - label rpovider to create an array of strings from the list
style - the style

ExtendedComboBoxCellEditor

public ExtendedComboBoxCellEditor(Composite parent,
                                  java.lang.String[] items,
                                  int style)
Creates a new cell editor with a combo containing the given list of choices and parented under the given control.

Parameters:
parent - the parent control
items - the list of strings for the combo box
style - the style

ExtendedComboBoxCellEditor

public ExtendedComboBoxCellEditor(Composite parent,
                                  java.lang.String[] items,
                                  java.lang.String emptyItem,
                                  int style)
Creates a new cell editor with a combo containing the given list of choices and parented under the given control.

Parameters:
parent - the parent control
items - the list of strings for the combo box
emptyItem - the combo box item which maps to an empty string in the text box
style - the style
Method Detail

createItems

public static java.lang.String[] createItems(java.util.List list,
                                             ILabelProvider labelProvider)
Create a list of String items.

Parameters:
list -
labelProvider -
Returns:
list of String items

createControl

protected Control createControl(Composite parent)
Specified by:
createControl in class CellEditor
See Also:
CellEditor.createControl(org.eclipse.swt.widgets.Composite)

doSetFocus

protected void doSetFocus()
Specified by:
doSetFocus in class CellEditor
See Also:
CellEditor.doSetFocus()

getLayoutData

public CellEditor.LayoutData getLayoutData()
Sets the minimum width of the cell to 30 pixels to make sure the arrow button is visible even when the list contains long strings.

Overrides:
getLayoutData in class CellEditor

doGetValue

public java.lang.Object doGetValue()
Specified by:
doGetValue in class CellEditor

doSetValue

public void doSetValue(java.lang.Object value)
Specified by:
doSetValue in class CellEditor

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.