de.cau.cs.kieler.sim.kiem.config.ui
Class AbstractPropertiesDialog<T>

java.lang.Object
  extended by org.eclipse.swt.widgets.Dialog
      extended by de.cau.cs.kieler.sim.kiem.config.ui.AbstractPropertiesDialog<T>
Type Parameters:
T - the type of object returned by the open() method
Direct Known Subclasses:
NewPropertyDialog, SingleStringInputDialog

public abstract class AbstractPropertiesDialog<T>
extends Dialog

An abstract dialog that creates a number of text fields with custom labels and Ok/Cancel option.

Rating proposed yellow
(2010-01-27)

Constructor Summary
AbstractPropertiesDialog(Shell parent, String[] newLabels, String[] toolTipsParam, String newTitle)
          Creates a new AbstractPropertiesDialog.
AbstractPropertiesDialog(Shell parent, String newLabel, String tooltipParam, String newTitle)
          Creates a new AbstractPropertiesDialog.
 
Method Summary
abstract  T open()
          Open the dialog and return a specific object.
 String[] openDialog()
          Opens the dialog and returns the input.
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPropertiesDialog

public AbstractPropertiesDialog(Shell parent,
                                String newLabel,
                                String tooltipParam,
                                String newTitle)
Creates a new AbstractPropertiesDialog.

Parameters:
parent - the parent component
newLabel - a single label
tooltipParam - a tooltip
newTitle - the title of the dialog

AbstractPropertiesDialog

public AbstractPropertiesDialog(Shell parent,
                                String[] newLabels,
                                String[] toolTipsParam,
                                String newTitle)
Creates a new AbstractPropertiesDialog.

Parameters:
parent - the parent component
newLabels - the list of labels for the input fields
toolTipsParam - the list of tooltip for the input fields has to be same length as labels or null
newTitle - the title for the dialog
Method Detail

openDialog

public String[] openDialog()
Opens the dialog and returns the input.

Returns:
The entered input

open

public abstract T open()
Open the dialog and return a specific object.

Returns:
some object.