Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.common.definition.selector
Class PropertyDefinitionDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by eu.esdihumboldt.hale.ui.util.selector.AbstractViewerSelectionDialog<EntityDefinition,org.eclipse.jface.viewers.TreeViewer>
              extended by eu.esdihumboldt.hale.ui.common.definition.selector.PropertyDefinitionDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class PropertyDefinitionDialog
extends AbstractViewerSelectionDialog<EntityDefinition,org.eclipse.jface.viewers.TreeViewer>

Dialog for selecting a PropertyDefinition with its complete property path (represented in an EntityDefinition).

Author:
Simon Templer

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
PropertyDefinitionDialog(org.eclipse.swt.widgets.Shell parentShell, SchemaSpaceID ssid, TypeDefinition parentType, String title, EntityDefinition initialSelection)
          Create a property entity dialog
 
Method Summary
protected  org.eclipse.jface.viewers.TreeViewer createViewer(org.eclipse.swt.widgets.Composite parent)
          Create the tree viewer.
protected  EntityDefinition getObjectFromSelection(org.eclipse.jface.viewers.ISelection selection)
          Retrieve the selected entity from the given selection
protected  void setupViewer(org.eclipse.jface.viewers.TreeViewer viewer, EntityDefinition initialSelection)
          Setup the tree viewer with label provider, content provider and input.
 
Methods inherited from class eu.esdihumboldt.hale.ui.util.selector.AbstractViewerSelectionDialog
acceptObject, buttonPressed, cancelPressed, configureShell, createButtonsForButtonBar, createContents, createDialogArea, getFilters, getObject, okPressed, setFilters
 
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

PropertyDefinitionDialog

public PropertyDefinitionDialog(org.eclipse.swt.widgets.Shell parentShell,
                                SchemaSpaceID ssid,
                                TypeDefinition parentType,
                                String title,
                                EntityDefinition initialSelection)
Create a property entity dialog

Parameters:
parentShell - the parent shall
ssid - the schema space used for creating PropertyEntityDefinition, may be null if not needed
parentType - the parent type for the property to be selected
title - the dialog title
initialSelection - the entity definition to select initially (if possible), may be null
Method Detail

createViewer

protected org.eclipse.jface.viewers.TreeViewer createViewer(org.eclipse.swt.widgets.Composite parent)
Description copied from class: AbstractViewerSelectionDialog
Create the tree viewer.

Specified by:
createViewer in class AbstractViewerSelectionDialog<EntityDefinition,org.eclipse.jface.viewers.TreeViewer>
Parameters:
parent - the parent composite
Returns:
the tree viewer
See Also:
AbstractViewerSelectionDialog.createViewer(Composite)

setupViewer

protected void setupViewer(org.eclipse.jface.viewers.TreeViewer viewer,
                           EntityDefinition initialSelection)
Description copied from class: AbstractViewerSelectionDialog
Setup the tree viewer with label provider, content provider and input. Don't set any viewer filters as they will be overridden by those provided through AbstractViewerSelectionDialog.setFilters(ViewerFilter[]).

Specified by:
setupViewer in class AbstractViewerSelectionDialog<EntityDefinition,org.eclipse.jface.viewers.TreeViewer>
Parameters:
viewer - the tree viewer
initialSelection - the object to select (if possible), may be null

getObjectFromSelection

protected EntityDefinition getObjectFromSelection(org.eclipse.jface.viewers.ISelection selection)
Description copied from class: AbstractViewerSelectionDialog
Retrieve the selected entity from the given selection

Specified by:
getObjectFromSelection in class AbstractViewerSelectionDialog<EntityDefinition,org.eclipse.jface.viewers.TreeViewer>
Parameters:
selection - the selection
Returns:
the selected entity or null

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d