RSE
Release 1.0

org.eclipse.rse.ui.filters.dialogs
Class SystemFilterWorkWithFilterPoolsDialog

java.lang.Object
  extended byorg.eclipse.jface.window.Window
      extended byorg.eclipse.jface.dialogs.Dialog
          extended byorg.eclipse.rse.ui.dialogs.SystemPromptDialog
              extended byorg.eclipse.rse.ui.filters.dialogs.SystemFilterWorkWithFilterPoolsDialog
All Implemented Interfaces:
IBasicPropertyConstants, IDialogConstants, IDialogPage, IRunnableContext, ISelectionChangedListener, ISelectionProvider, IShellProvider, ISystemDeleteTarget, ISystemMessageLine, ISystemPromptDialog, ISystemPropertyConstants, ISystemRenameTarget, Listener, Runnable, SystemFilterPoolDialogInterface

public class SystemFilterWorkWithFilterPoolsDialog
extends SystemPromptDialog
implements ISystemPropertyConstants, ISelectionChangedListener, ISystemDeleteTarget, ISystemRenameTarget, SystemFilterPoolDialogInterface

Dialog for working with filter pools.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.jface.window.Window
Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.rse.ui.dialogs.SystemPromptDialog
activeRunningOperations, ADD_BUTTON_NO, ADD_BUTTON_YES, ADD_ID, addButton, arrowCursor, BROWSE_BUTTON_NO, BROWSE_BUTTON_YES, BROWSE_ID, browseButton, buttonsComposite, CANCEL_ALL_ID, cancelAllButton, cancelAllPressed, 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, labelCancelAll, labelDetailsHide, labelDetailsShow, labelOk, labelTest, marginHeight, marginWidth, minHeight, minWidth, needsProgressMonitor, noShowAgainButton, noShowAgainOption, okButton, okPressed, operationCancelableState, outputObject, outputObjectValidator, overallShell, pack, parentComposite, pendingErrorMessage, pendingMessage, prefId, prefStore, prefValAsSelected, progressMonitorPart, showAddButton, showBrowseButton, showCancelAllButton, showDetailsButton, showOkButton, showTestButton, TEST_BUTTON_NO, TEST_BUTTON_YES, TEST_ID, testButton, tipAdd, tipBrowse, tipCancel, tipCancelAll, tipDetailsHide, tipDetailsShow, tipOk, tipTest, title, titleImage, verticalSpacing, waitCursor, windowClosingDialog
 
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
 
Fields inherited from interface org.eclipse.rse.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
 
Fields inherited from interface org.eclipse.jface.viewers.IBasicPropertyConstants
P_CHILDREN, P_IMAGE, P_PARENT, P_TEXT
 
Fields inherited from interface org.eclipse.jface.dialogs.IDialogConstants
ABORT_ID, ABORT_LABEL, BACK_ID, BACK_LABEL, BUTTON_BAR_HEIGHT, BUTTON_HEIGHT, BUTTON_MARGIN, BUTTON_WIDTH, CANCEL_ID, CANCEL_LABEL, CLIENT_ID, CLOSE_ID, CLOSE_LABEL, DESELECT_ALL_ID, ENTRY_FIELD_WIDTH, FINISH_ID, FINISH_LABEL, HELP_ID, HELP_LABEL, HIDE_DETAILS_LABEL, HORIZONTAL_MARGIN, HORIZONTAL_SPACING, IGNORE_ID, IGNORE_LABEL, INDENT, INTERNAL_ID, LEFT_MARGIN, MINIMUM_MESSAGE_AREA_WIDTH, NEXT_ID, NEXT_LABEL, NO_ID, NO_LABEL, NO_TO_ALL_ID, NO_TO_ALL_LABEL, OK_ID, OK_LABEL, OPEN_ID, OPEN_LABEL, PROCEED_ID, PROCEED_LABEL, RETRY_ID, RETRY_LABEL, SELECT_ALL_ID, SELECT_TYPES_ID, SHOW_DETAILS_LABEL, SKIP_ID, SKIP_LABEL, SMALL_INDENT, STOP_ID, STOP_LABEL, VERTICAL_MARGIN, VERTICAL_SPACING, YES_ID, YES_LABEL, YES_TO_ALL_ID, YES_TO_ALL_LABEL
 
Constructor Summary
SystemFilterWorkWithFilterPoolsDialog(Shell shell, String title, String prompt, SystemFilterPoolManagerUIProvider caller)
          Constructor
 
Method Summary
 void addNewFilterPool(Shell shell, ISystemFilterPool pool)
          Callback from new action when new pool created
 void addSelectionChangedListener(ISelectionChangedListener listener)
           
 boolean canDelete()
          Return true if delete should be enabled based on your current selection.
 boolean canRename()
          Return true if rename should be enabled based on your current selection.
 void clearSelection()
           
 boolean close()
           
protected  Control createInner(Composite parent)
          Called by createContents method.
protected  ISystemMessageLine createMessageLine(Composite c)
          Create message line.
protected  void createToolBar(Composite parent)
          Create the toolbar displayed at the top of the dialog
 boolean doDelete(IProgressMonitor monitor)
          Actually do the delete of currently selected items.
 boolean doRename(String[] newNames)
          Actually do the rename of currently selected items.
 SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs()
          Return an object containing user-specified information pertinent to filter pool actions
 ISystemFilterPoolManager[] getFilterPoolManagers()
          Callback from new action to get array of managers
 int getFilterPoolManagerSelection()
          Callback from new action to get index of initial manager to select
protected  Control getInitialFocusControl()
          Return the Control to be given initial focus.
 SystemSimpleContentElement getSelectedElement()
          Return current selection
 ISelection getSelection()
           
 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.
 boolean isSelectionEmpty()
          Return true if something selected
protected  void populateToolBar(Shell shell, SystemFilterWorkWithFilterPoolsTreeViewer tree)
          Populate the toolbar displayed at the top of the dialog
protected  boolean processOK()
          Called when user presses OK button.
 boolean refreshTree()
          Callback from tree when refresh is done
 void removeSelectionChangedListener(ISelectionChangedListener listener)
           
 void selectionChanged(SelectionChangedEvent event)
          ISelectionChangedListener method.
 void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller)
          Allow base action to pass instance of itself for callback to get info
 void setFilterPoolNameValidator(ValidatorFilterPoolName pnv)
          Set the pool name validator for the rename action.
 void setHelpContextId(String id)
          Set the help context id for this wizard
 void setPageComplete()
          Inform caller of page-complete status of this form
 void setRootToPreselect(SystemSimpleContentElement preSelectedRoot)
          Set the root to preselect
 void setSelection(ISelection selection)
           
 boolean showDelete()
          Return true if delete should even be shown in the popup menu
 boolean showRename()
          Return true if rename should even be shown in the popup menu
 boolean verify()
          Verifies all input.
 
Methods inherited from class org.eclipse.rse.ui.dialogs.SystemPromptDialog
aboutToStart, addFillerLine, addGrowableFillerLine, addSeparatorLine, adjustButtonWidth, applyMnemonics, buttonPressed, clearErrorMessage, clearMessage, configureShell, createButtonBar, createButtonsForButtonBar, createContents, createControl, createDialogArea, createNoShowAgainButton, createWizardClosingDialog, dispose, enableAddButton, enableBrowseButton, enableCancelAllButton, enableCancelButton, enableDetailsButton, enableOkButton, enableTestButton, getAddButton, getBrowseButton, getCancelAllButton, 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, processCancelAll, processDetails, processTest, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, restoreEnableState, restoreUIState, run, run, saveEnableStateAndSet, saveUIState, setAddButtonLabel, setAddButtonToolTipText, setBrowseButtonLabel, setBrowseButtonToolTipText, setBusyCursor, setCancelAllButtonLabel, setCancelAllButtonToolTipText, setCancelButtonLabel, setCancelButtonToolTipText, setControl, setDescription, setDetailsButtonLabel, setDetailsButtonToolTipText, setDisplayCursor, setDisplayCursor, setErrorMessage, setErrorMessage, setErrorMessage, setHelp, setHelp, setImageDescriptor, setInitialOKButtonEnabledState, setInputObject, setMessage, setMessage, setMinimumSize, setNeedsProgressMonitor, setNoShowAgainOption, setOkButtonLabel, setOkButtonToolTipText, setOutputObject, setOutputObjectValidator, setPageComplete, setShowAddButton, setShowBrowseButton, setShowCancelAllButton, setShowDetailsButton, setShowOkButton, setShowTestButton, setTestButtonLabel, setTestButtonToolTipText, setTitle, setVisible, wasCancelled, wasCancelledAll
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, okPressed, 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

SystemFilterWorkWithFilterPoolsDialog

public SystemFilterWorkWithFilterPoolsDialog(Shell shell,
                                             String title,
                                             String prompt,
                                             SystemFilterPoolManagerUIProvider caller)
Constructor

Method Detail

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()

setFilterPoolNameValidator

public void setFilterPoolNameValidator(ValidatorFilterPoolName pnv)
Set the pool name validator for the rename action. The work-with dialog automatically calls setExistingNamesList on it for each selection.


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)

refreshTree

public boolean refreshTree()
Callback from tree when refresh is done


createToolBar

protected void createToolBar(Composite parent)
Create the toolbar displayed at the top of the dialog


populateToolBar

protected void populateToolBar(Shell shell,
                               SystemFilterWorkWithFilterPoolsTreeViewer tree)
Populate the toolbar displayed at the top of the dialog


selectionChanged

public void selectionChanged(SelectionChangedEvent event)
ISelectionChangedListener method. Called when user changes selection in tree

Specified by:
selectionChanged in interface ISelectionChangedListener

getSelectedElement

public SystemSimpleContentElement getSelectedElement()
Return current selection


isSelectionEmpty

public boolean isSelectionEmpty()
Return true if something selected


clearSelection

public void clearSelection()

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

close

public boolean close()
Overrides:
close 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


showDelete

public boolean showDelete()
Return true if delete should even be shown in the popup menu

Specified by:
showDelete in interface ISystemDeleteTarget

canDelete

public boolean canDelete()
Return true if delete should be enabled based on your current selection.

Specified by:
canDelete in interface ISystemDeleteTarget

doDelete

public boolean doDelete(IProgressMonitor monitor)
Actually do the delete of currently selected items.

Specified by:
doDelete in interface ISystemDeleteTarget

showRename

public boolean showRename()
Return true if rename should even be shown in the popup menu

Specified by:
showRename in interface ISystemRenameTarget

canRename

public boolean canRename()
Return true if rename should be enabled based on your current selection.

Specified by:
canRename in interface ISystemRenameTarget

doRename

public boolean doRename(String[] newNames)
Actually do the rename of currently selected items. The array of new names matches the currently selected items.

Specified by:
doRename in interface ISystemRenameTarget

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)
Specified by:
addSelectionChangedListener in interface ISelectionProvider

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)
Specified by:
removeSelectionChangedListener in interface ISelectionProvider

setSelection

public void setSelection(ISelection selection)
Specified by:
setSelection in interface ISelectionProvider

getSelection

public ISelection getSelection()
Specified by:
getSelection in interface ISelectionProvider

addNewFilterPool

public void addNewFilterPool(Shell shell,
                             ISystemFilterPool pool)
Callback from new action when new pool created


getFilterPoolManagers

public ISystemFilterPoolManager[] getFilterPoolManagers()
Callback from new action to get array of managers


getFilterPoolManagerSelection

public int getFilterPoolManagerSelection()
Callback from new action to get index of initial manager to select


setFilterPoolDialogActionCaller

public void setFilterPoolDialogActionCaller(SystemFilterAbstractFilterPoolAction caller)
Allow base action to pass instance of itself for callback to get info

Specified by:
setFilterPoolDialogActionCaller in interface SystemFilterPoolDialogInterface

getFilterPoolDialogOutputs

public SystemFilterPoolDialogOutputs getFilterPoolDialogOutputs()
Return an object containing user-specified information pertinent to filter pool actions

Specified by:
getFilterPoolDialogOutputs in interface SystemFilterPoolDialogInterface

setHelpContextId

public void setHelpContextId(String id)
Set the help context id for this wizard

Specified by:
setHelpContextId in interface SystemFilterPoolDialogInterface

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.