com.ibm.etools.systems.core.ui.dialogs
Class SystemSimpleSelectDialog
java.lang.Object
org.eclipse.jface.dialogs.Dialog
com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog
com.ibm.etools.systems.core.ui.dialogs.SystemSimpleSelectDialog
- All Implemented Interfaces:
- ISystemMessageLine, ISystemPromptDialog, ISystemPropertyConstants, Runnable
- public class SystemSimpleSelectDialog
- extends SystemPromptDialog
- implements ISystemPropertyConstants
Dialog that uses a checkbox tree viewer to prompt users to select hierarchical items.
* Works in concert with SystemSimpleContentElement
* and SystemSimpleContentProvider
.
*
* The setInputObject(java.lang.Object)
method is used to populate the selection tree:
*
* - The passed object must be of type SystemSimpleContentElement
*
- The method getChildren will be called on that object to get initial visible elements
*
- As user expands each item, getChildren() is progressively called
*
- The initial selection state of each item is determined by calling isSelected on that item
*
*
* The trick to using this is to first populate a hierarchy of SystemSimpleContentElement elements,
* each one wrapping one of your own model objects, and then passing to this constructor the root
* element.
*
* Upon successful completion of this dialog (wasCancelled() returns false), the model is
* updated to reflect the selections. Call getUpdatedContent() to return the root node, if need be,
* and then walk the nodes. The selected items are those that return true
* to SystemSimpleContentElement.isSelected()
.
*
* @see com.ibm.etools.systems.core.ui.dialogs.SystemSimpleContentElement
* @see com.ibm.etools.systems.core.ui.dialogs.SystemSimpleContentProvider
- See Also:
- Serialized Form
Fields inherited from class com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog |
activeRunningOperations, ADD_BUTTON_NO, ADD_BUTTON_YES, ADD_ID, addButton, arrowCursor, BROWSE_BUTTON_NO, BROWSE_BUTTON_YES, BROWSE_ID, browseButton, buttonsComposite, cancelButton, cancelListener, DETAILS_BUTTON_NO, DETAILS_BUTTON_YES, DETAILS_ID, detailsButton, detailsButtonHideMode, detailsHideLabel, detailsShowLabel, dialogAreaComposite, dialogMnemonics, fMessageLine, helpId, horizontalSpacing, initialAddButtonEnabledState, initialDetailsButtonEnabledState, initialOKButtonEnabledState, inputObject, labelAdd, labelBrowse, labelCancel, labelDetailsHide, labelDetailsShow, labelOk, labelTest, marginHeight, marginWidth, minHeight, minWidth, needsProgressMonitor, okButton, okPressed, operationCancelableState, outputObject, outputObjectValidator, overallShell, pack, parentComposite, pendingErrorMessage, pendingMessage, progressMonitorPart, showAddButton, showBrowseButton, showDetailsButton, showOkButton, showTestButton, TEST_BUTTON_NO, TEST_BUTTON_YES, TEST_ID, testButton, tipAdd, tipBrowse, tipCancel, tipDetailsHide, tipDetailsShow, tipOk, tipTest, title, titleImage, verticalSpacing, waitCursor, windowClosingDialog |
Fields inherited from interface com.ibm.etools.systems.core.ui.view.ISystemPropertyConstants |
P_ARCHIVE_COMMENT, P_ARCHIVE_EXPANDEDSIZE, P_CCSID, P_COMMAND, P_COMMENT, P_COMPILETYPE_TYPES, P_DEFAULTUSERID, P_DESCRIPTION, P_ENVLIST, P_ERROR, P_ERROR_FILENAME, P_ERROR_LINENO, P_FILE_CANONICAL_PATH, P_FILE_CLASSIFICATION, P_FILE_HIDDEN, P_FILE_LASTMODIFIED, P_FILE_PATH, P_FILE_READABLE, P_FILE_READONLY, P_FILE_SIZE, P_FILE_WRITABLE, P_FILTER, P_FILTERS, P_FILTERSTRING, P_FILTERSTRINGS, P_FILTERSTRINGS_COUNT, P_HAS_CHILDREN, P_HOSTNAME, P_IS_ACTIVE, P_IS_CONNECTED, P_IS_CONNECTION_PRIVATE, P_NBRCHILDREN, P_NEWNAME, P_OK, P_ORIGIN, P_PARENT_FILTER, P_PARENT_FILTERPOOL, P_PASSWORD, P_PORT, P_PREFIX, P_PROFILE, P_RELATED_CONNECTION, P_SEARCH_LINE, P_SHELL_CONTEXT, P_SHELL_STATUS, P_SYSTEMTYPE, P_TYPE, P_USERACTION_DOMAIN, P_USERID, P_VENDOR, P_VIRTUAL_COMMENT, P_VIRTUAL_COMPRESSEDSIZE, P_VIRTUAL_COMPRESSIONMETHOD, P_VIRTUAL_COMPRESSIONRATIO, P_VRM |
Methods inherited from class com.ibm.etools.systems.core.ui.dialogs.SystemPromptDialog |
aboutToStart, addFillerLine, addGrowableFillerLine, addSeparatorLine, adjustButtonWidth, applyMnemonics, buttonPressed, clearErrorMessage, clearMessage, close, configureShell, createButtonBar, createButtonsForButtonBar, createContents, createControl, createDialogArea, createWizardClosingDialog, dispose, enableAddButton, enableBrowseButton, enableCancelButton, enableDetailsButton, enableOkButton, enableTestButton, getAddButton, getBrowseButton, getCancelOrCloseButton, getControl, getDescription, getDetailsButton, getDialogMnemonics, getErrorMessage, getHelpContextId, getImage, getInputObject, getMessage, getMessageLine, getOkButton, getOutputObject, getOutputObjectValidator, getProgressMonitor, getSystemErrorMessage, getTestButton, getTitle, handleEvent, hardClose, okToClose, pack, performHelp, processAdd, processBrowse, processCancel, processDetails, processTest, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, restoreEnableState, restoreUIState, run, run, saveEnableStateAndSet, saveUIState, setAddButtonLabel, setAddButtonToolTipText, setBrowseButtonLabel, setBrowseButtonToolTipText, setBusyCursor, setCancelButtonLabel, setCancelButtonToolTipText, setControl, setDescription, setDetailsButtonLabel, setDetailsButtonToolTipText, setDisplayCursor, setDisplayCursor, setErrorMessage, setErrorMessage, setErrorMessage, setHelp, setHelp, setImageDescriptor, setInitialOKButtonEnabledState, setMessage, setMessage, setMinimumSize, setNeedsProgressMonitor, setOkButtonLabel, setOkButtonToolTipText, setOutputObject, setOutputObjectValidator, setPageComplete, setShowAddButton, setShowBrowseButton, setShowDetailsButton, setShowOkButton, setShowTestButton, setTestButtonLabel, setTestButtonToolTipText, setTitle, setVisible, wasCancelled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
copyright
public static final String copyright
- See Also:
- Constant Field Values
SystemSimpleSelectDialog
public SystemSimpleSelectDialog(Shell shell,
String title,
String prompt)
- Constructor
setRootToPreselect
public void setRootToPreselect(SystemSimpleContentElement preSelectedRoot)
- Set the root to preselect
createMessageLine
protected ISystemMessageLine createMessageLine(Composite c)
- Create message line. Intercept so we can set msg line of form.
- Overrides:
createMessageLine
in class SystemPromptDialog
getInitialFocusControl
protected Control getInitialFocusControl()
- Description copied from class:
SystemPromptDialog
- Return the Control to be given initial focus.
Child classes must override this, but can return null.
- Specified by:
getInitialFocusControl
in class SystemPromptDialog
- See Also:
SystemPromptDialog.getInitialFocusControl()
createInner
protected Control createInner(Composite parent)
- Description copied from class:
SystemPromptDialog
- Called by createContents method.
Create this dialog's widgets inside a composite.
Child classes must override this.
- Specified by:
createInner
in class SystemPromptDialog
- See Also:
SystemPromptDialog.createInner(Composite)
checkStateChanged
public void checkStateChanged(CheckStateChangedEvent event)
- ICheckStateChangedListener method. Called when user changes selection in tree
setInputObject
public void setInputObject(Object inputObject)
- Override of parent. We only support a specific type of input, so we test for it and
* throw it out if we don't get it. This is necessary to defeat some default action.
* Called by SystemDialogAction's default run() method after dialog instantiated.
- Specified by:
setInputObject
in interface ISystemPromptDialog
- Overrides:
setInputObject
in class SystemPromptDialog
setInputObject
public void setInputObject(SystemSimpleContentElement inputObject)
- Override of parent. Must pass selected object onto the form for initializing fields.
Called by SystemDialogAction's default run() method after dialog instantiated.
getShouldBeGrayed
public boolean getShouldBeGrayed(SystemSimpleContentElement parent)
- Dynamically determine grayed state of parent element
getShouldBeChecked
public boolean getShouldBeChecked(SystemSimpleContentElement parent)
- Dynamically determine checked state of parent element
getUpdatedContent
public SystemSimpleContentElement getUpdatedContent()
- Return updated input model
processOK
protected boolean processOK()
- Called when user presses OK button.
Return true to close dialog.
Return false to not close dialog.
- Overrides:
processOK
in class SystemPromptDialog
verify
public boolean verify()
- Verifies all input.
- Returns:
- true if there are no errors in the user input
isPageComplete
public boolean isPageComplete()
- This method can be called by the dialog or wizard page host, to decide whether to enable
or disable the next, final or ok buttons. It returns true if the minimal information is
available and is correct.
setPageComplete
public void setPageComplete()
- Inform caller of page-complete status of this form
Copyright © 2005 IBM Corp. All Rights Reserved.
Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.