|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
eu.esdihumboldt.hale.ui.util.selector.AbstractViewerSelectionDialog<T,V>
T
- the type of object that can be selected in the dialogV
- the type of the viewerpublic abstract class AbstractViewerSelectionDialog<T,V extends org.eclipse.jface.viewers.StructuredViewer>
Abstract selection dialog based on a structured viewer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
---|
org.eclipse.jface.window.Window.IExceptionHandler |
Field Summary |
---|
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 |
Constructor Summary | |
---|---|
AbstractViewerSelectionDialog(org.eclipse.swt.widgets.Shell parentShell,
String title,
T initialSelection)
Constructor. |
Method Summary | |
---|---|
static boolean |
acceptObject(org.eclipse.jface.viewers.Viewer viewer,
org.eclipse.jface.viewers.ViewerFilter[] filters,
Object candidate)
Determines if the given object matches the given filters. |
protected void |
buttonPressed(int buttonId)
|
protected void |
cancelPressed()
|
protected void |
configureShell(org.eclipse.swt.widgets.Shell newShell)
|
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
|
protected org.eclipse.swt.widgets.Control |
createContents(org.eclipse.swt.widgets.Composite parent)
|
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
|
protected abstract V |
createViewer(org.eclipse.swt.widgets.Composite parent)
Create the tree viewer. |
org.eclipse.jface.viewers.ViewerFilter[] |
getFilters()
|
T |
getObject()
Get the selected object. |
protected abstract T |
getObjectFromSelection(org.eclipse.jface.viewers.ISelection selection)
Retrieve the selected entity from the given selection |
protected void |
okPressed()
|
void |
setFilters(org.eclipse.jface.viewers.ViewerFilter[] filters)
Set the viewer filters |
protected abstract void |
setupViewer(V viewer,
T initialSelection)
Setup the tree viewer with label provider, content provider and input. |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
---|
applyDialogFont, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, 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 |
Constructor Detail |
---|
public AbstractViewerSelectionDialog(org.eclipse.swt.widgets.Shell parentShell, String title, T initialSelection)
parentShell
- the parent shelltitle
- the dialog titleinitialSelection
- the entity definition to select initially (if
possible), may be null
Method Detail |
---|
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
createContents
in class org.eclipse.jface.dialogs.Dialog
Dialog.createContents(Composite)
protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
configureShell
in class org.eclipse.jface.window.Window
Window.configureShell(Shell)
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
createDialogArea
in class org.eclipse.jface.dialogs.Dialog
Dialog.createDialogArea(Composite)
protected abstract V createViewer(org.eclipse.swt.widgets.Composite parent)
parent
- the parent composite
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
createButtonsForButtonBar
in class org.eclipse.jface.dialogs.Dialog
Dialog.createButtonsForButtonBar(Composite)
protected void buttonPressed(int buttonId)
buttonPressed
in class org.eclipse.jface.dialogs.Dialog
Dialog.buttonPressed(int)
public static boolean acceptObject(org.eclipse.jface.viewers.Viewer viewer, org.eclipse.jface.viewers.ViewerFilter[] filters, Object candidate)
viewer
- the viewerfilters
- the viewer filterscandidate
- the object to test
protected abstract void setupViewer(V viewer, T initialSelection)
setFilters(ViewerFilter[])
.
viewer
- the tree viewerinitialSelection
- the object to select (if possible), may be
null
protected void okPressed()
okPressed
in class org.eclipse.jface.dialogs.Dialog
Dialog.okPressed()
protected abstract T getObjectFromSelection(org.eclipse.jface.viewers.ISelection selection)
selection
- the selection
null
protected void cancelPressed()
cancelPressed
in class org.eclipse.jface.dialogs.Dialog
Dialog.cancelPressed()
public T getObject()
null
public void setFilters(org.eclipse.jface.viewers.ViewerFilter[] filters)
filters
- the filterspublic org.eclipse.jface.viewers.ViewerFilter[] getFilters()
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |