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

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

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

A table-based editor for adding, changing, and removing options for a deployer. This is a heavily changed copy of org.eclipse.jface.preference.ListEditor, extended to use a table instead of a list and accomodating methods targeted at editing deployment options.

Version:
$Id$
Author:
Philip Mayer

Field Summary
 
Fields inherited from class org.eclipse.jface.preference.FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE
 
Constructor Summary
OptionTableFieldEditor(String name, String labelText, org.eclipse.swt.widgets.Composite parent)
           
 
Method Summary
protected  boolean addVariable(ConfigurationOption variable)
          Attempts to add the given variable.
protected  void adjustForNumColumns(int numColumns)
           
 void createSelectionListener()
          Creates a selection listener.
protected  void doFillIntoGrid(org.eclipse.swt.widgets.Composite parent, int numColumns)
           
protected  void doLoad()
           
protected  void doLoadDefault()
           
protected  void doStore()
           
 org.eclipse.swt.widgets.Composite getButtonBoxControl(org.eclipse.swt.widgets.Composite parent)
           
 int getNumberOfControls()
           
 String getPreferenceName()
           
 org.eclipse.jface.viewers.TableViewer getTableControl(org.eclipse.swt.widgets.Composite parent)
           
protected  void handleTableSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
          Responds to a selection changed event in the environment table
protected  void removePressed()
           
 void setDeployer(DeployerExtension deployerExtension)
           
 
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, 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

OptionTableFieldEditor

public OptionTableFieldEditor(String name,
                              String labelText,
                              org.eclipse.swt.widgets.Composite parent)
Method Detail

adjustForNumColumns

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

doFillIntoGrid

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

getTableControl

public org.eclipse.jface.viewers.TableViewer getTableControl(org.eclipse.swt.widgets.Composite parent)

getButtonBoxControl

public org.eclipse.swt.widgets.Composite getButtonBoxControl(org.eclipse.swt.widgets.Composite parent)

doLoad

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

doLoadDefault

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

doStore

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

getNumberOfControls

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

createSelectionListener

public void createSelectionListener()
Creates a selection listener.


removePressed

protected void removePressed()

addVariable

protected boolean addVariable(ConfigurationOption variable)
Attempts to add the given variable. Returns whether the variable was added or not (as when the user answers not to overwrite an existing variable).

Parameters:
variable - the variable to add
Returns:
whether the variable was added

handleTableSelectionChanged

protected void handleTableSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Responds to a selection changed event in the environment table

Parameters:
event - the selection change event

setDeployer

public void setDeployer(DeployerExtension deployerExtension)

getPreferenceName

public String getPreferenceName()
Overrides:
getPreferenceName in class org.eclipse.jface.preference.FieldEditor


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