net.bpelunit.framework.client.eclipse.preferences
Class ComboFieldEditor

java.lang.Object
  extended by org.eclipse.jface.preference.FieldEditor
      extended by net.bpelunit.framework.client.eclipse.preferences.ComboFieldEditor

public class ComboFieldEditor
extends org.eclipse.jface.preference.FieldEditor

A field editor for a combo box that allows the drop-down selection of one of a list of items. Taken from org.eclipse.jdt.internal.debug.ui.launcher.ComboFieldEditor and extended to allow external reactions to selections.

Version:
$Id$
Author:
Philip Mayer

Field Summary
 
Fields inherited from class org.eclipse.jface.preference.FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
 
Constructor Summary
ComboFieldEditor(String name, String labelText, String[][] entryNamesAndValues, org.eclipse.swt.widgets.Composite parent)
           
 
Method Summary
protected  void adjustForNumColumns(int numColumns)
           
protected  void doFillIntoGrid(org.eclipse.swt.widgets.Composite parent, int numColumns)
           
protected  void doLoad()
           
protected  void doLoadDefault()
           
protected  void doStore()
           
 org.eclipse.swt.widgets.Combo getComboBoxControl(org.eclipse.swt.widgets.Composite parent)
          Lazily create and return the Combo control.
 String getCurrentSelectionString()
           
 int getNumberOfControls()
           
protected  String getValueForName(String name)
          Given the name (label) of an entry, return the corresponding value.
protected  void updateComboForValue(String value)
          Set the name in the combo widget to match the specified value.
 
Methods inherited from class org.eclipse.jface.preference.FieldEditor
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, isValid, load, loadDefault, presentsDefaultValue, refreshValidState, setButtonLayoutData, setEnabled, setFocus, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComboFieldEditor

public ComboFieldEditor(String name,
                        String labelText,
                        String[][] entryNamesAndValues,
                        org.eclipse.swt.widgets.Composite parent)
Method Detail

adjustForNumColumns

protected void adjustForNumColumns(int numColumns)
Specified by:
adjustForNumColumns in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.adjustForNumColumns(int)

doFillIntoGrid

protected void doFillIntoGrid(org.eclipse.swt.widgets.Composite parent,
                              int numColumns)
Specified by:
doFillIntoGrid in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doFillIntoGrid(Composite, int)

doLoad

protected void doLoad()
Specified by:
doLoad in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doLoad()

doLoadDefault

protected void doLoadDefault()
Specified by:
doLoadDefault in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doLoadDefault()

doStore

protected void doStore()
Specified by:
doStore in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.doStore()

getNumberOfControls

public int getNumberOfControls()
Specified by:
getNumberOfControls in class org.eclipse.jface.preference.FieldEditor
See Also:
FieldEditor.getNumberOfControls()

getComboBoxControl

public org.eclipse.swt.widgets.Combo getComboBoxControl(org.eclipse.swt.widgets.Composite parent)
Lazily create and return the Combo control.


getValueForName

protected String getValueForName(String name)
Given the name (label) of an entry, return the corresponding value.


updateComboForValue

protected void updateComboForValue(String value)
Set the name in the combo widget to match the specified value.


getCurrentSelectionString

public String getCurrentSelectionString()


Copyright © 2013 Leibniz Universität Hannover. All Rights Reserved.