|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.window.Window | +--org.eclipse.jface.dialogs.Dialog | +--org.eclipse.ui.dialogs.SelectionDialog
The abstract implementation of a selection dialog. It can be primed with
initial selections (setElementSelections
), and returns
the final selection (via getResult
) after completion.
Clients may subclass this dialog to inherit its selection facilities.
Nested Class Summary |
Nested classes inherited from class org.eclipse.jface.window.Window |
Window.IExceptionHandler |
Field Summary |
Fields inherited from class org.eclipse.jface.dialogs.Dialog |
DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING |
Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
Constructor Summary | |
protected |
SelectionDialog(Shell parentShell)
Creates a dialog instance. |
Method Summary | |
protected void |
configureShell(Shell shell)
Configures the given shell in preparation for opening this window in it. |
protected void |
createButtonsForButtonBar(Composite parent)
Adds buttons to this dialog's button bar. |
protected Label |
createMessageArea(Composite composite)
Creates the message area for this dialog. |
protected List |
getInitialSelections()
Returns the initial selection in this selection dialog. |
protected String |
getMessage()
Returns the message for this dialog. |
Button |
getOkButton()
Returns the ok button. |
Object[] |
getResult()
Returns the list of selections made by the user, or null if
the selection was canceled. |
void |
setInitialSelections(Object[] selectedElements)
Sets the initial selection in this selection dialog to the given elements. |
void |
setMessage(String message)
Sets the message for this dialog. |
protected void |
setResult(List newResult)
Set the selections made by the user, or null if
the selection was canceled. |
protected void |
setSelectionResult(Object[] newResult)
Set the selections made by the user, or null if
the selection was canceled. |
void |
setTitle(String title)
Sets the title for this dialog. |
Methods inherited from class org.eclipse.jface.window.Window |
close, create, createShell, getContents, getDefaultImage, getInitialLocation, getInitialSize, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, open, setBlockOnOpen, setDefaultImage, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SelectionDialog(Shell parentShell)
parentShell
- the parent shellMethod Detail |
protected void configureShell(Shell shell)
Window
The default implementation of this framework method sets the shell's image and gives it a grid layout. Subclasses may extend or reimplement.
configureShell
in class Window
shell
- the shellprotected void createButtonsForButtonBar(Composite parent)
Dialog
The Dialog
implementation of this framework method adds
standard ok and cancel buttons using the createButton
framework method. These standard buttons will be accessible from
getCancelButton
, and getOKButton
.
Subclasses may override.
createButtonsForButtonBar
in class Dialog
parent
- the button bar compositeprotected Label createMessageArea(Composite composite)
This method is provided to allow subclasses to decide where the message will appear on the screen.
protected List getInitialSelections()
protected String getMessage()
public 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 setMessage(String message)
message
- the messageprotected void setResult(List newResult)
null
if
the selection was canceled.
protected void setSelectionResult(Object[] newResult)
null
if
the selection was canceled.
The selections may accessed using getResult
.
public void setTitle(String title)
title
- the title
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |