public abstract class ElementListSelectionDialog
extends org.eclipse.jface.dialogs.TrayDialog
| Modifier and Type | Field and Description |
|---|---|
static long |
serialVersionUID
Serial version UID for RAP.
|
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS| Constructor and Description |
|---|
ElementListSelectionDialog(org.eclipse.swt.widgets.Shell parent,
org.eclipse.jface.viewers.ILabelProvider renderer)
Creates a list selection dialog.
|
| Modifier and Type | Method and Description |
|---|---|
void |
create() |
String |
getFilter()
Returns the current filter pattern.
|
org.eclipse.ui.dialogs.FilteredList |
getFilteredList()
Returns the filtered list.
|
Object |
getFirstResult()
Returns the first element from the list of results.
|
Object[] |
getFoldedElements(int index)
Returns all elements which are folded together to one entry in the list.
|
org.eclipse.swt.widgets.Button |
getOkButton()
Returns the ok button.
|
Object[] |
getResult()
Returns the list of selections made by the user, or
null if the selection was canceled. |
boolean |
isCaseIgnored()
Returns if sorting, filtering and folding is case sensitive.
|
int |
open() |
void |
setAllowDuplicates(boolean allowDuplicates)
Specifies whether duplicate entries are displayed or not.
|
void |
setDialogBoundsSettings(org.eclipse.jface.dialogs.IDialogSettings settings,
int strategy)
Set the dialog settings that should be used to save the bounds of this
dialog.
|
void |
setElements(Object[] elements)
Sets the elements of the list.
|
void |
setEmptyListMessage(String message)
Sets the message to be displayed if the list is empty.
|
void |
setEmptySelectionMessage(String message)
Sets the message to be displayed if the selection is empty.
|
void |
setFilter(String filter)
Sets the filter pattern.
|
void |
setIgnoreCase(boolean ignoreCase)
Specifies if sorting, filtering and folding is case sensitive.
|
void |
setImage(org.eclipse.swt.graphics.Image image)
Sets the image for this dialog.
|
void |
setInitialElementSelections(List<Object> selectedElements)
Sets the initial selection in this selection dialog to the given
elements.
|
void |
setInitialSelections(Object[] selectedElements)
Sets the initial selection in this selection dialog to the given
elements.
|
void |
setMatchEmptyString(boolean matchEmptyString)
Specifies whether everything or nothing should be filtered on
empty filter string.
|
void |
setMessage(String message)
Sets the message for this dialog.
|
void |
setMultipleSelection(boolean isMultipleSelectionAllowed)
Specifies if multiple selection is allowed.
|
void |
setSize(int width,
int height)
Sets the list size in unit of characters.
|
void |
setStatusLineAboveButtons(boolean aboveButtons)
Controls whether status line appears to the left of the buttons (default)
or above them.
|
void |
setTitle(String title)
Sets the title for this dialog.
|
void |
setValidator(org.eclipse.ui.dialogs.ISelectionStatusValidator validator)
Sets an optional validator to check if the selection is valid.
|
closeTray, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailableapplyDialogFont, close, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getBlockedHandler, getImage, setBlockedHandler, shortenTextpublic static final long serialVersionUID
public ElementListSelectionDialog(org.eclipse.swt.widgets.Shell parent,
org.eclipse.jface.viewers.ILabelProvider renderer)
parent - the parent widget.renderer - the label renderer.public void setStatusLineAboveButtons(boolean aboveButtons)
aboveButtons - if true status line is placed above buttons; if false to the rightpublic org.eclipse.swt.widgets.Button getOkButton()
null if the button is not created
yet.public Object[] getResult()
null if the selection was canceled.null if Cancel
was pressedpublic void setInitialSelections(Object[] selectedElements)
selectedElements - the array of elements to selectpublic void setInitialElementSelections(List<Object> selectedElements)
selectedElements - the List of elements to selectpublic void setMessage(String message)
message - the messagepublic void setTitle(String title)
title - the titlepublic void setDialogBoundsSettings(org.eclipse.jface.dialogs.IDialogSettings settings,
int strategy)
settings - the IDialogSettings that should be used to store the
bounds of the dialogstrategy - the integer constant specifying how the bounds are saved.
Specified using Dialog.DIALOG_PERSISTLOCATION and Dialog.DIALOG_PERSISTSIZE.Dialog.getDialogBoundsStrategy(),
Dialog.getDialogBoundsSettings()public void setImage(org.eclipse.swt.graphics.Image image)
image - the image.public Object getFirstResult()
null if no element has been selected.null is
returned.public void setIgnoreCase(boolean ignoreCase)
ignoreCase - whether casing should be ignoredpublic boolean isCaseIgnored()
public void setMatchEmptyString(boolean matchEmptyString)
matchEmptyString - booleanpublic void setMultipleSelection(boolean isMultipleSelectionAllowed)
isMultipleSelectionAllowed - whether multiple selection is allowedpublic void setAllowDuplicates(boolean allowDuplicates)
allowDuplicates - whether duplicates are allowedpublic void setSize(int width,
int height)
width - the width of the list.height - the height of the list.public void setEmptyListMessage(String message)
message - the message to be displayed.public void setEmptySelectionMessage(String message)
message - the message to be displayed.public void setValidator(org.eclipse.ui.dialogs.ISelectionStatusValidator validator)
validator - the validator to validate the selection.public void setFilter(String filter)
filter - the filter pattern.public String getFilter()
null if filter was not set.public Object[] getFoldedElements(int index)
index - the index selecting the entry in the list.public int open()
open in class org.eclipse.jface.window.Windowpublic void create()
create in class org.eclipse.jface.dialogs.Dialogpublic void setElements(Object[] elements)
elements - the elements of the list.public org.eclipse.ui.dialogs.FilteredList getFilteredList()
FilteredListCopyright © 2017. All rights reserved.