|
Eclipse Platform Release 3.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 org.eclipse.ui.dialogs.SelectionStatusDialog org.eclipse.ui.dialogs.ElementTreeSelectionDialog
A class to select elements out of a tree structure.
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 |
blockedHandler, buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
Constructor Summary | |
ElementTreeSelectionDialog(Shell parent,
ILabelProvider labelProvider,
ITreeContentProvider contentProvider)
Constructs an instance of ElementTreeSelectionDialog. |
Method Summary | |
protected void | access$setResult(List result)
Set the result using the super class implementation of setResult. |
protected void | access$superButtonPressed(int id)
Set the result using the super class implementation of buttonPressed. |
void | addFilter(ViewerFilter filter)
Adds a filter to the tree viewer. |
protected void | cancelPressed()
Handles cancel button pressed event. |
protected void | computeResult()
Compute the result and return it. |
void | create()
Creates this window's widgetry in a new top-level shell. |
protected Control | createDialogArea(Composite parent)
Creates and returns the contents of the upper part of this dialog (above the button bar). |
protected TreeViewer | createTreeViewer(Composite parent)
Creates the tree viewer. |
protected TreeViewer | getTreeViewer()
Returns the tree viewer. |
protected void | handleShellCloseEvent()
Notifies that the window's close button was pressed, the close menu was selected, or the ESCAPE key pressed. |
int | open()
Opens this window, creating it first if it has not yet been created. |
void | setAllowMultiple(boolean allowMultiple)
Specifies if multiple selection is allowed. |
void | setDoubleClickSelects(boolean doubleClickSelects)
Specifies if default selected events (double click) are created. |
void | setEmptyListMessage(String message)
Sets the message to be displayed if the list is empty. |
void | setInitialSelection(Object selection)
Sets the initial selection. |
void | setInput(Object input)
Sets the tree input. |
void | setSize(int width,
int height)
Sets the size of the tree in unit of characters. |
void | setSorter(ViewerSorter sorter)
Sets the sorter used by the tree viewer. |
void | setValidator(ISelectionStatusValidator validator)
Sets an optional validator to check if the selection is valid. |
protected void | updateOKStatus()
Validate the receiver and update the ok status. |
Methods inherited from class org.eclipse.ui.dialogs.SelectionStatusDialog |
configureShell, createButtonBar, getFirstResult, okPressed, setImage, setResult, setStatusLineAboveButtons, updateButtonsEnableState, updateStatus |
Methods inherited from class org.eclipse.ui.dialogs.SelectionDialog |
createButtonsForButtonBar, createMessageArea, getInitialElementSelections, getInitialSelections, getMessage, getOkButton, getResult, setInitialElementSelections, setInitialSelections, setMessage, setResult, setSelectionResult, setTitle |
Methods inherited from class org.eclipse.jface.window.Window |
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getInitialLocation, getInitialSize, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, setBlockOnOpen, setDefaultImage, setDefaultImages, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ElementTreeSelectionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider)
Method Detail |
public void setInitialSelection(Object selection)
public void setEmptyListMessage(String message)
public void setAllowMultiple(boolean allowMultiple)
public void setDoubleClickSelects(boolean doubleClickSelects)
public void setSorter(ViewerSorter sorter)
public void addFilter(ViewerFilter filter)
public void setValidator(ISelectionStatusValidator validator)
public void setInput(Object input)
public void setSize(int width, int height)
protected void updateOKStatus()
public int open()
If this window has been configured to block on open (setBlockOnOpen), this method waits until the window is closed by the end user, and then it returns the window's return code; otherwise, this method returns immediately. A window's return codes are window-specific, although two standard return codes are predefined: OK and CANCEL.
protected void cancelPressed()
protected void computeResult()
public void create()
The default implementation of this framework method creates this window's shell (by calling createShell), and its controls (by calling createContents), then initializes this window's shell bounds (by calling initializeBounds).
protected Control createDialogArea(Composite parent)
The Dialog implementation of this framework method creates and returns a new Composite with standard margins and spacing.
The returned control's layout data must be an instance of GridData. This method must not modify the parent's layout.
Subclasses must override this method but may call super as in the following example:
Composite composite = (Composite) super.createDialogArea(parent); //add controls to composite as necessary return composite;
protected TreeViewer createTreeViewer(Composite parent)
protected TreeViewer getTreeViewer()
protected void access$superButtonPressed(int id)
protected void access$setResult(List result)
protected void handleShellCloseEvent()
The default implementation of this framework method sets the window's return code to CANCEL and closes the window using close. Subclasses may extend or reimplement.
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.