RSE
Release 1.0

org.eclipse.rse.ui.filters.actions
Class SystemFilterSelectFilterPoolsAction

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.action.AbstractAction
          extended byorg.eclipse.jface.action.Action
              extended byorg.eclipse.rse.ui.actions.SystemBaseAction
                  extended byorg.eclipse.rse.ui.actions.SystemBaseDialogAction
                      extended byorg.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction
                          extended byorg.eclipse.rse.ui.filters.actions.SystemFilterSelectFilterPoolsAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISystemAction, ISystemDialogAction

public class SystemFilterSelectFilterPoolsAction
extends SystemFilterAbstractFilterPoolAction

The action that displays the Select Filter Pools dialog, and which returns an array of selected filter pools.

Dialog will display a root node for each manager, and then the filter pools within each manager as children. User can select any pool from any of the given managers.

Uses getName() on manager for display name of root nodes.

Typically, such a dialog is used to allow the user to select a subset of pools that they will access in some context. There is framework support for such selections, via SystemFilterPoolReferences. Each of these are a reference to a filter pool, and the SystemFilterPoolReferenceManager class offers full support for manager a list of such references, optionally even saving and restoring such a list.

You call the setFilterPoolManagers method to set the array of filter pool managers this dialog allows the user to select from.

If you also call the optional method setFilterPoolReferenceManager, you need not subclass this action. It will handle everything for you!!

You can either supply the label, dialog title, dialog prompt, filter pool image, input filter pool managers and filter pool reference manager by calling the appropriate setXXX methods, or by overriding the related getXXX methods.


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction
dlgInputs, mgrNamePreselect
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction
cancelled, dlgHelpId, needsProgressMonitor, needsProgressMonitorSet, processAll, value
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseAction
allowOnMultipleSelection, arrowCursor, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
SystemFilterSelectFilterPoolsAction(Shell parent)
          Constructor when default label desired.
SystemFilterSelectFilterPoolsAction(Shell parent, String title)
          Constructor when given the translated action label
SystemFilterSelectFilterPoolsAction(Shell parent, String title, String tooltip)
          Constructor when given the translated action label
 
Method Summary
protected  Dialog createDialog(Shell parent)
          Creates our select-filter-pools dialog, and populates it with the list of filter pools to select from.
 SystemFilterPoolDialogInterface createFilterPoolDialog(Shell parent)
          We override createDialog from parent, so this is a no-op.
 void doOKprocessing(Object dlgOutput)
          Method called when ok pressed on dialog and after getDialogValue has set the value attribute to an array of SystemFilterPool objects for the selected pools.
protected  Object getDialogValue(Dialog dlg)
          Called by parent class after dialog returns.
protected  boolean getFilterPoolPreSelection(ISystemFilterPool pool)
          Decide per pool if it should be selected or not.
protected  void init()
          Override of init in parent
protected  void preSelect(SystemSimpleContentElement inputElement)
          Walk elements deciding pre-selection
 
Methods inherited from class org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction
checkObjectType, getDialogFilterPoolManagerNamePrompt, getDialogFilterPoolManagerNameTip, getDialogFilterPoolNamePrompt, getDialogFilterPoolNameTip, getDialogPreSelectInput, getDialogPrompt, getDialogTitle, getFilterPoolManagerNameSelectionIndex, getFilterPoolManagerProvider, getFilterPoolManagers, getFilterPoolReferenceManager, getReferenceManagerProviderSelection, run, setDialogFilterPoolManagerNamePrompt, setDialogFilterPoolNamePrompt, setDialogPreSelectInput, setDialogPrompt, setDialogTitle, setFilterPoolManagerNamePreSelection, setFilterPoolManagerNameSelectionIndex, setFilterPoolManagerProvider, setFilterPoolManagers, setFilterPoolReferenceManager, setHelpContextId, setSelection
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction
getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasCancelled, wasNeedsProgressMonitorSet
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseAction
allowOnMultipleSelection, getAdapter, getContextMenuGroup, getCurrentTreeView, getFirstSelection, getHelpContextId, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getSystemConnection, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setHost, setInputs, setSelectionProvider, setSelectionSensitive, setShell, setTracing, setTracing, setViewer, updateSelection
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.actions.ISystemAction
allowOnMultipleSelection, getContextMenuGroup, getHelpContextId, getSelection, getShell, getViewer, isDummy, isSelectionSensitive, setContextMenuGroup, setHelp, setInputs, setSelectionSensitive, setShell, setViewer
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from interface org.eclipse.jface.viewers.ISelectionChangedListener
selectionChanged
 

Constructor Detail

SystemFilterSelectFilterPoolsAction

public SystemFilterSelectFilterPoolsAction(Shell parent)
Constructor when default label desired.


SystemFilterSelectFilterPoolsAction

public SystemFilterSelectFilterPoolsAction(Shell parent,
                                           String title)
Constructor when given the translated action label


SystemFilterSelectFilterPoolsAction

public SystemFilterSelectFilterPoolsAction(Shell parent,
                                           String title,
                                           String tooltip)
Constructor when given the translated action label

Method Detail

init

protected void init()
Override of init in parent

Overrides:
init in class SystemFilterAbstractFilterPoolAction

createDialog

protected Dialog createDialog(Shell parent)
Creates our select-filter-pools dialog, and populates it with the list of filter pools to select from.

Assumes setFilterPoolManagers has been called.

Dialog will display a root node for each manager, and then the filter pools within each manager as children. User can select any pool from any of the given managers.

Uses getName() on manager for display name of root nodes.

Overrides:
createDialog in class SystemFilterAbstractFilterPoolAction
See Also:
SystemBaseDialogAction.run()

createFilterPoolDialog

public SystemFilterPoolDialogInterface createFilterPoolDialog(Shell parent)
We override createDialog from parent, so this is a no-op.

Specified by:
createFilterPoolDialog in class SystemFilterAbstractFilterPoolAction

preSelect

protected void preSelect(SystemSimpleContentElement inputElement)
Walk elements deciding pre-selection

Overrides:
preSelect in class SystemFilterAbstractFilterPoolAction

getFilterPoolPreSelection

protected boolean getFilterPoolPreSelection(ISystemFilterPool pool)
Decide per pool if it should be selected or not. Default behaviour is to select it if it is currently referenced.

Overrides:
getFilterPoolPreSelection in class SystemFilterAbstractFilterPoolAction

getDialogValue

protected Object getDialogValue(Dialog dlg)
Called by parent class after dialog returns. We set the internal value attribute to be the array of user selected filter pools.

After this action executes, simply call getValue() to get an array of SystemFilterPool objects representing what pools the user selected. A result of null means the dialog was cancelled.

Specified by:
getDialogValue in class SystemFilterAbstractFilterPoolAction
Parameters:
dlg - The dialog object, after it has returned from open.

doOKprocessing

public void doOKprocessing(Object dlgOutput)
Method called when ok pressed on dialog and after getDialogValue has set the value attribute to an array of SystemFilterPool objects for the selected pools.

By default, if the current selected object implements SystemFilterPoolReferenceManagerProvider, then this will call setFilterPoolReferences on that selected object.

Specified by:
doOKprocessing in class SystemFilterAbstractFilterPoolAction
Parameters:
dlgOutput - The array of SystemFilterPools selected by the user, as set in getDialogValue()

RSE
Release 1.0

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