Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

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


java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.jface.action.AbstractAction
          extended by 

org.eclipse.jface.action.Action
              extended by 

org.eclipse.rse.ui.actions.SystemBaseAction
                  extended by 

org.eclipse.rse.ui.actions.SystemBaseDialogAction
                      extended by 
org.eclipse.rse.ui.filters.actions.SystemFilterAbstractFilterPoolAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISystemAction, ISystemDialogAction
Direct Known Subclasses:
SystemFilterAbstractFilterPoolWizardAction

public abstract class SystemFilterAbstractFilterPoolAction
extends SystemBaseDialogAction

Base class capturing the attributes and operations common to dialog actions that work on system filter pools.


Field Summary
protected   SystemFilterPoolDialogInputs dlgInputs
           
protected   String 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
SystemFilterAbstractFilterPoolAction ( Shell parent, ImageDescriptor image, String label, String tooltip)
          Constructor when given the resource bundle and key for the action label
SystemFilterAbstractFilterPoolAction ( Shell parent, String title)
          Constructor when given the translated action label
SystemFilterAbstractFilterPoolAction ( Shell parent, String title, String tooltip)
          Constructor when given the translated action label
 
Method Summary
 boolean checkObjectType ( Object selectedObject)
          Called by SystemBaseAction when selection is set.
protected   Dialog createDialog ( Shell parent)
          Overrides parent method to allow creating of a dialog meeting our interface, so we can pass instance of ourselves to it for callbacks to get our data.
abstract   SystemFilterPoolDialogInterface createFilterPoolDialog ( Shell parent)
          Where you create the dialog meeting our interface.
abstract  void doOKprocessing ( Object dlgValue)
          Method called when ok pressed on dialog and after getDialogValue has set the value attribute appropriately.
  String getDialogFilterPoolManagerNamePrompt ()
          Get the dialog's filter pool manager name prompt text.
  String getDialogFilterPoolManagerNameTip ()
          Get the dialog's filter pool manager name tooltip text.
  String getDialogFilterPoolNamePrompt ()
          Get the dialog's filter pool name prompt text.
  String getDialogFilterPoolNameTip ()
          Get the dialog's filter pool name tooltip text.
  Object getDialogPreSelectInput ()
          Get the dialog's pre-select information.
  String getDialogPrompt ()
          Get the dialog prompt.
  String getDialogTitle ()
          Get the dialog title.
protected abstract   Object getDialogValue ( Dialog dlg)
          If you decide to use the supplied run method as is, then you must override this method to retrieve the data from the dialog.
 int getFilterPoolManagerNameSelectionIndex ()
          Returns the zero-based index of the manager name to preselect.
  ISystemFilterPoolManagerProvider getFilterPoolManagerProvider ()
          Get the input filter pool manager provider from which to get the list of filter pool managers.
  ISystemFilterPoolManager[] getFilterPoolManagers ()
          Returns the filter pool managers from which to show filter pools for selection.
protected  boolean getFilterPoolPreSelection ( ISystemFilterPool pool)
          Decide per pool if it should be selected or not.
  ISystemFilterPoolReferenceManager getFilterPoolReferenceManager ()
          Returns the filter pool reference manager which contains the list of selected filter pools that this dialog is showing and allowing the user to change.
protected   ISystemFilterPoolReferenceManagerProvider getReferenceManagerProviderSelection ()
          Return the current selection if it implements SystemFilterPoolReferenceManagerProvider
protected  void init ()
          Common initialization code
protected  void preSelect ( SystemSimpleContentElement inputElement)
          Walk elements deciding pre-selection
 void run ()
          Extends run in parent class to call doOKprocessing if the result of calling getDialogValue() resulted in a non-null value.
 void setDialogFilterPoolManagerNamePrompt ( String prompt, String tip)
          Set the dialog's filter pool manager name prompt text and tooltip Either call this or override getDialogFilterPoolManagerNamePrompt/Tip()
 void setDialogFilterPoolNamePrompt ( String prompt, String tip)
          Set the dialog's filter pool name prompt text and tooltip Either call this or override getDialogFilterPoolNamePrompt/Tip()
 void setDialogPreSelectInput ( Object selectData)
          Set the dialog's pre-select information.
 void setDialogPrompt ( String prompt)
          Set the dialog prompt text.
 void setDialogTitle ( String title)
          Set the dialog title.
 void setFilterPoolManagerNamePreSelection ( String name)
          Set the name of the filter pool manager to pre-select
 void setFilterPoolManagerNameSelectionIndex (int index)
          Set the zero-based index of the manager name to preselect.
 void setFilterPoolManagerProvider ( ISystemFilterPoolManagerProvider provider)
          Set the input filter pool manager provider from which to get the list of filter pool managers.
 void setFilterPoolManagers ( ISystemFilterPoolManager[] managers)
          Set the input filter pool managers from which to allow selections of filter pools.
 void setFilterPoolReferenceManager ( ISystemFilterPoolReferenceManager refManager)
          Set the input filter pool reference manager which is holding the references this dialog is allowing the user to select.
 void setHelpContextId ( String id)
          Set the help context Id (infoPop) for this action.
 void setSelection ( ISelection selection)
          This is called by the UI calling the action, if that UI is not a selection provider.
 
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, getContextMenuGroup, getCurrentTreeView, getFirstSelection, getHelpContextId, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getSystemConnection, getViewAdapter, 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
 

Field Detail

dlgInputs

protected 
SystemFilterPoolDialogInputs dlgInputs

mgrNamePreselect

protected 
String mgrNamePreselect
Constructor Detail

SystemFilterAbstractFilterPoolAction

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


SystemFilterAbstractFilterPoolAction

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


SystemFilterAbstractFilterPoolAction

public SystemFilterAbstractFilterPoolAction(
Shell parent,
                                            
ImageDescriptor image,
                                            
String label,
                                            
String tooltip)
Constructor when given the resource bundle and key for the action label

Method Detail

init

protected void init()
Common initialization code


setHelpContextId

public void setHelpContextId(
String id)
Set the help context Id (infoPop) for this action. This must be fully qualified by plugin ID.

Same as #setHelp(String)

See Also:
#getHelpContextId()

setSelection

public void setSelection(
ISelection selection)
This is called by the UI calling the action, if that UI is not a selection provider. That is, this is an alternative to calling selectionChanged when there is no SelectionChangedEvent.

Specified by:
setSelection in interface ISystemAction
Overrides:
setSelection in class SystemBaseAction
See Also:
SystemBaseAction.selectionChanged(SelectionChangedEvent event)

setFilterPoolManagerProvider

public void setFilterPoolManagerProvider(
ISystemFilterPoolManagerProvider provider)
Set the input filter pool manager provider from which to get the list of filter pool managers. Either call this or call setFilterPoolManagers or override getFilterPoolManagerProvider().


getFilterPoolManagerProvider

public 
ISystemFilterPoolManagerProvider getFilterPoolManagerProvider()
Get the input filter pool manager provider from which to get the list of filter pool managers.


setFilterPoolManagers

public void setFilterPoolManagers(
ISystemFilterPoolManager[] managers)
Set the input filter pool managers from which to allow selections of filter pools. Either call this or call setFilterPoolManagerProvider or override getFilterPoolManagers().


getFilterPoolManagers

public 
ISystemFilterPoolManager[] getFilterPoolManagers()
Returns the filter pool managers from which to show filter pools for selection.

By default, tries the following in this order:

  1. calls getFilterPoolManagerProvider if setFilterPoolManagerProvider was called
  2. uses what was given in setFilterPoolManagers
  3. uses what was given in setFilterPoolReferenceManager, calling its getSystemFilterPoolManagers
  4. checks if the current selection is a filterPoolReferenceManager, and if so uses the managers it references from.


getReferenceManagerProviderSelection

protected 
ISystemFilterPoolReferenceManagerProvider getReferenceManagerProviderSelection()
Return the current selection if it implements SystemFilterPoolReferenceManagerProvider


setFilterPoolManagerNameSelectionIndex

public void setFilterPoolManagerNameSelectionIndex(int index)
Set the zero-based index of the manager name to preselect. The default is zero. Either call this or override getFilterPoolManagerNameSelectionIndex or call setFilterPoolManagerNamePreSelection(String)


getFilterPoolManagerNameSelectionIndex

public int getFilterPoolManagerNameSelectionIndex()
Returns the zero-based index of the manager name to preselect. Returns what was set in setFilterPoolManagerNamePreSelection or setFilterPoolManagerNameSelectionIndex by default.


setFilterPoolManagerNamePreSelection

public void setFilterPoolManagerNamePreSelection(
String name)
Set the name of the filter pool manager to pre-select


setFilterPoolReferenceManager

public void setFilterPoolReferenceManager(
ISystemFilterPoolReferenceManager refManager)
Set the input filter pool reference manager which is holding the references this dialog is allowing the user to select.

If you call this, then this action has everything it needs to know to be fully self-contained. It will totally handle updating the reference manager with the user's selections and deselections.


getFilterPoolReferenceManager

public 
ISystemFilterPoolReferenceManager getFilterPoolReferenceManager()
Returns the filter pool reference manager which contains the list of selected filter pools that this dialog is showing and allowing the user to change.

If not set, then the subclass needs to override doOKprocessing.


setDialogTitle

public void setDialogTitle(
String title)
Set the dialog title. Either call this or override getDialogTitle()


getDialogTitle

public 
String getDialogTitle()
Get the dialog title. By default, uses what was given in setDialogTitle, or an english default if nothing set.


setDialogPrompt

public void setDialogPrompt(
String prompt)
Set the dialog prompt text. Either call this or override getDialogPrompt()


getDialogPrompt

public 
String getDialogPrompt()
Get the dialog prompt. By default, uses what was given in setDialogPrompt


setDialogFilterPoolNamePrompt

public void setDialogFilterPoolNamePrompt(
String prompt,
                                          
String tip)
Set the dialog's filter pool name prompt text and tooltip Either call this or override getDialogFilterPoolNamePrompt/Tip()


getDialogFilterPoolNamePrompt

public 
String getDialogFilterPoolNamePrompt()
Get the dialog's filter pool name prompt text. By default, uses what was given in setDialogFilterPoolNamePrompt.


getDialogFilterPoolNameTip

public 
String getDialogFilterPoolNameTip()
Get the dialog's filter pool name tooltip text. By default, uses what was given in setDialogFilterPoolNamePrompt.


setDialogFilterPoolManagerNamePrompt

public void setDialogFilterPoolManagerNamePrompt(
String prompt,
                                                 
String tip)
Set the dialog's filter pool manager name prompt text and tooltip Either call this or override getDialogFilterPoolManagerNamePrompt/Tip()


getDialogFilterPoolManagerNamePrompt

public 
String getDialogFilterPoolManagerNamePrompt()
Get the dialog's filter pool manager name prompt text. By default, uses what was given in setDialogFilterPoolManagerNamePrompt.


getDialogFilterPoolManagerNameTip

public 
String getDialogFilterPoolManagerNameTip()
Get the dialog's filter pool manager name tooltip text. By default, uses what was given in setDialogFilterPoolManagerNamePrompt.


setDialogPreSelectInput

public void setDialogPreSelectInput(
Object selectData)
Set the dialog's pre-select information. Either call this or override getDialogPreSelectInput()


getDialogPreSelectInput

public 
Object getDialogPreSelectInput()
Get the dialog's pre-select information. By default, uses what was given in setDialogPreSelectInput.


checkObjectType

public boolean checkObjectType(
Object selectedObject)
Called by SystemBaseAction when selection is set. Our opportunity to verify we are allowed for this selected type.

Overrides:
checkObjectType in class SystemBaseAction

preSelect

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


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.


run

public void run()
Extends run in parent class to call doOKprocessing if the result of calling getDialogValue() resulted in a non-null value.

Specified by:
run in interface IAction
Overrides:
run in class SystemBaseDialogAction
See Also:
Action.run()

createDialog

protected 
Dialog createDialog(
Shell parent)
Overrides parent method to allow creating of a dialog meeting our interface, so we can pass instance of ourselves to it for callbacks to get our data.

If your dialog does not implement our interface, override this method!

Specified by:
createDialog in class SystemBaseDialogAction
See Also:
SystemBaseDialogAction.run()

createFilterPoolDialog

public abstract 
SystemFilterPoolDialogInterface createFilterPoolDialog(
Shell parent)
Where you create the dialog meeting our interface. If you override createDialog, then override this to return null

Since:
3.0

getDialogValue

protected abstract 
Object getDialogValue(
Dialog dlg)
If you decide to use the supplied run method as is, then you must override this method to retrieve the data from the dialog. For InputDialog dialogs, this is simply a matter of returning dlg.getValue();

This is called by the run method after the dialog returns. Callers of this object can subsequently retrieve it by calling getValue.

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

doOKprocessing

public abstract void doOKprocessing(
Object dlgValue)
Method called when ok pressed on dialog and after getDialogValue has set the value attribute appropriately.

Only called if user pressed OK on dialog.

Parameters:
dlgValue - The output of getDialogValue().

RSE
Release 3.0

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire