hok.ui.wizard
Class ConstraintDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.jface.dialogs.TitleAreaDialog
hok.ui.wizard.ConstraintDialog
- All Implemented Interfaces:
- IShellProvider
public class ConstraintDialog
- extends TitleAreaDialog
The ConstraintDialog is used to select the predicates or - depending on the
type of the dialog - concepts the user can choose from to constrain the
design problem in the wizard.
- Author:
- holger
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 |
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog |
close, closeTray, createButtonBar, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText |
Methods inherited from class org.eclipse.jface.window.Window |
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, 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 |
ConstraintDialog
protected ConstraintDialog(Shell parentShell,
ConstraintDialog.DialogType type)
- The constructor needs a parent shell and the Dialogtype (either
ConceptType or PredicateType). The DialogType decides which icon is
displayed for the tree elements and the content of the title and message
bar
- Parameters:
parentShell
- the parent shell to set.type
- the dialog type to set.
createContents
protected Control createContents(Composite parent)
- Overrides:
createContents
in class TitleAreaDialog
createDialogArea
protected Control createDialogArea(Composite parent)
- Overrides:
createDialogArea
in class TitleAreaDialog
createButtonsForButtonBar
protected void createButtonsForButtonBar(Composite parent)
- Overrides:
createButtonsForButtonBar
in class Dialog
getType
public ConstraintDialog.DialogType getType()
- Returns the type of the Dialog
- Returns:
- either ConceptType or PredicateType.
setType
public void setType(ConstraintDialog.DialogType type)
- Sets the type of the Dialog.
- Parameters:
type
- either ConceptType or PredicateType.
getTreeModel
public ITreeNode getTreeModel()
- Returns the tree model.
- Returns:
- the tree model.
setTreeModel
public void setTreeModel(ITreeNode treeNode)
- Sets the tree model. This method has to be called before open().
- Parameters:
treeNode
- the tree model to set.
getSelectedElement
public ITreeNode getSelectedElement()
- Returns the element that is selected by the user.
- Returns:
- the selected tree element or null.