com.tssap.util.ui.dialog
Class ObjectSelectionDialog
com.tssap.util.ui.dialog.ObjectSelectionDialog
- public class ObjectSelectionDialog
|
Constructor Summary |
ObjectSelectionDialog(org.eclipse.swt.widgets.Shell parentShell,
java.lang.String title,
java.lang.String message)
Creates a new instance of the Dialog. |
|
Method Summary |
java.lang.Object[] |
openDialog(java.lang.Object[] selectableElements)
Opens the dialog window presenting the user the given Objects to choose from.
|
void |
setLabelProvider(org.eclipse.jface.viewers.ILabelProvider lProvider)
The @see ILabelProvider to be used in the presentation of the Object to choose from.
|
void |
setObjectSorter(org.eclipse.jface.viewers.ViewerSorter viewerSorter)
The @see ViewerSorter to be used in the presentation of the Object to choose from. |
void |
setSingleSelection(boolean singleSelection)
Determines if the UI user is allowed to choose a single element or a subset from the set of Objects.
|
ObjectSelectionDialog
public ObjectSelectionDialog(org.eclipse.swt.widgets.Shell parentShell,
java.lang.String title,
java.lang.String message)
- Creates a new instance of the Dialog. @see #openDialog(Object[])
- Parameters:
parentShell - the parent shell of the dialog. Given null a new shell will be createdtitle - window titlemessage - message to be shown above the selection area. normaly exlaining the UI user what to do
openDialog
public java.lang.Object[] openDialog(java.lang.Object[] selectableElements)
- Opens the dialog window presenting the user the given Objects to choose from.
In multi selection mode @see #setSingleSelection(boolean) the Objects will be presented in a checked table viewer.
In single selection mode a table will be shown.
- Parameters:
selectableElements - the set of Objects the UI user can choose from- Returns:
- the subset of the given Objects selected by the UI user. null when the Dialog was closed in any way exept via OK button.
setLabelProvider
public void setLabelProvider(org.eclipse.jface.viewers.ILabelProvider lProvider)
- The @see ILabelProvider to be used in the presentation of the Object to choose from.
If no such provider is given a default will be used
- Parameters:
lProvider -
setObjectSorter
public void setObjectSorter(org.eclipse.jface.viewers.ViewerSorter viewerSorter)
- The @see ViewerSorter to be used in the presentation of the Object to choose from.
- Parameters:
viewerSorter -
setSingleSelection
public void setSingleSelection(boolean singleSelection)
- Determines if the UI user is allowed to choose a single element or a subset from the set of Objects.
The Objects will the Objects will be presented in a checked table viewer when set false and in a a table when set true.
The default is true.
- Parameters:
singleSelection -
Copyright © 2005 SAP AG. All Rights Reserved.