org.eclipse.uml2.uml.editor.dialogs
Class ChoicesDialog<T>

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.uml2.uml.editor.dialogs.ChoicesDialog<T>
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class ChoicesDialog<T>
extends org.eclipse.jface.dialogs.Dialog

A two-pane dialog, adapted from FeatureEditorDialog in EMF, that lets the user choose elements from the left-side list to add to the right-side list. The elements on the right-side list may optionally be ordered by moving them up and down. The dialog delegates a variety of decisions to a delegate.

Since:
5.0
See Also:
IChoicesDialogDelegate

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
protected  java.util.List<T> choiceOfValues
           
protected  org.eclipse.jface.viewers.TableViewer choiceTableViewer
           
protected  org.eclipse.jface.viewers.IContentProvider contentProvider
           
protected  IChoicesDialogDelegate<T> delegate
           
protected  java.lang.String displayName
           
protected  java.lang.Object object
           
protected  org.eclipse.emf.common.util.EList<T> result
           
protected  org.eclipse.emf.edit.provider.ItemProvider values
           
protected  org.eclipse.jface.viewers.TableViewer valuesTableViewer
           
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, 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
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
 
Constructor Summary
ChoicesDialog(org.eclipse.swt.widgets.Shell parent, java.lang.Object object, java.lang.String displayName, IChoicesDialogDelegate<T> delegate)
           
 
Method Summary
 boolean close()
           
protected  void configureLabelProvider(org.eclipse.jface.viewers.TableViewer viewer)
           
protected  void configureShell(org.eclipse.swt.widgets.Shell shell)
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
protected  java.util.Collection<T> getChoices()
           
 org.eclipse.emf.common.util.EList<T> getResult()
           
protected  org.eclipse.emf.common.util.EList<T> getValues()
           
protected  void okPressed()
           
 void updateChoiceOfValues()
          Updates me to reflect a change in the choice of values provided by my delegate.
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contentProvider

protected org.eclipse.jface.viewers.IContentProvider contentProvider

object

protected java.lang.Object object

displayName

protected java.lang.String displayName

values

protected org.eclipse.emf.edit.provider.ItemProvider values

choiceOfValues

protected java.util.List<T> choiceOfValues

choiceTableViewer

protected org.eclipse.jface.viewers.TableViewer choiceTableViewer

valuesTableViewer

protected org.eclipse.jface.viewers.TableViewer valuesTableViewer

result

protected org.eclipse.emf.common.util.EList<T> result

delegate

protected final IChoicesDialogDelegate<T> delegate
Constructor Detail

ChoicesDialog

public ChoicesDialog(org.eclipse.swt.widgets.Shell parent,
                     java.lang.Object object,
                     java.lang.String displayName,
                     IChoicesDialogDelegate<T> delegate)
Method Detail

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell shell)
Overrides:
configureShell in class org.eclipse.jface.window.Window

updateChoiceOfValues

public void updateChoiceOfValues()
Updates me to reflect a change in the choice of values provided by my delegate.


createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.Dialog

configureLabelProvider

protected void configureLabelProvider(org.eclipse.jface.viewers.TableViewer viewer)

getChoices

protected java.util.Collection<T> getChoices()

getValues

protected org.eclipse.emf.common.util.EList<T> getValues()

okPressed

protected void okPressed()
Overrides:
okPressed in class org.eclipse.jface.dialogs.Dialog

close

public boolean close()
Overrides:
close in class org.eclipse.jface.dialogs.Dialog

getResult

public org.eclipse.emf.common.util.EList<T> getResult()

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.