|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.rse.ui.actions.SystemBaseAction
org.eclipse.rse.ui.actions.SystemBaseDialogAction
org.eclipse.rse.ui.actions.SystemBaseWizardAction
org.eclipse.rse.ui.filters.actions.SystemNewFilterAction
public class SystemNewFilterAction
The action acts as a base class for all "New Filter" wizards so we can get some common functionality.
An interesting capability of this action is to defer configuration, which might be time consuming, until the user selects to run it. That can be done by registering a callback object that implements ISystemNewFilterActionConfigurator.
Field Summary | |
---|---|
protected ISystemNewFilterActionConfigurator |
callbackConfigurator
|
protected boolean |
callbackConfiguratorCalled
|
protected Object |
callbackData
|
protected String[] |
defaultFilterStrings
|
protected SystemFilterStringEditPane |
editPane
|
protected ISystemFilterPoolSelectionValidator |
filterPoolSelectionValidator
|
protected boolean |
fromRSE
|
protected String |
namePageHelp
|
protected boolean |
nested
|
protected String |
page1Description
|
protected ISystemFilterPool |
parentPool
|
protected ISystemFilterPool[] |
poolsToSelectFrom
|
protected ISystemFilterPoolWrapperInformation |
poolWrapperInformation
|
protected boolean |
showFilterStrings
|
protected boolean |
showInfoPage
|
protected boolean |
showNamePrompt
|
protected String |
type
|
protected String |
verbiage
|
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 | |
---|---|
SystemNewFilterAction(Shell shell,
ISystemFilterPool parentPool)
Constructor to use when you want to just use the default action name and image. |
|
SystemNewFilterAction(Shell shell,
ISystemFilterPool parentPool,
String label,
String tooltip,
ImageDescriptor image)
Constructor for non-nested actions. |
|
SystemNewFilterAction(Shell shell,
ISystemFilterPool parentPool,
String label,
String tooltip,
ImageDescriptor image,
boolean nested)
Constructor allowing nested actions. |
Method Summary | |
---|---|
boolean |
checkObjectType(Object selectedObject)
Lifecyle method. |
protected void |
configureNewFilter(ISystemFilter newFilter)
Overridable configuration method. |
protected void |
configureNewFilterWizard(SystemNewFilterWizard wizard)
Overridable configuration method. |
protected SystemNewFilterWizard |
createNewFilterWizard(ISystemFilterPool parentPool)
Overridable lifecyle method. |
protected IWizard |
createWizard()
Lifecyle method. |
String |
getFilterString()
Output method. |
String[] |
getFilterStrings()
Output method. |
ISystemFilter |
getNewFilter()
Output method. |
ISystemFilterPoolReferenceManagerProvider |
getSystemFilterPoolReferenceManagerProvider()
Output method. |
String |
getType()
Getter method. |
protected void |
postProcessWizard(IWizard wizard)
Lifecyle method. |
void |
setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom)
Configuration method. |
void |
setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolsToSelectFrom)
Configuration method. |
void |
setCallBackConfigurator(ISystemNewFilterActionConfigurator caller,
Object data)
Configuration method. |
void |
setDefaultFilterStrings(String[] defaultFilterStrings)
Configuration method. |
void |
setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
Configuration method. |
void |
setFilterStringEditPane(SystemFilterStringEditPane editPane)
Configuration method. |
void |
setFromRSE(boolean rse)
Configuration method. |
void |
setHelpContextId(String id)
Configuration method. |
void |
setNamePageHelp(String helpId)
Configuration method. |
void |
setPage1Description(String description)
Configuration method. |
void |
setParentFilterPool(ISystemFilterPool parentPool)
Configuration method. |
void |
setShowFilterStrings(boolean show)
Configuration method. |
void |
setShowInfoPage(boolean show)
Configuration method. |
void |
setShowNamePrompt(boolean show)
Configuration method. |
void |
setType(String type)
Configuration method. |
void |
setVerbiage(String verbiage)
Configuration method. |
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseWizardAction |
---|
createDialog, doCreateWizardDialog, getDialogValue, getWizardPageTitle, setMinimumPageSize, setWizardImage, setWizardPageTitle, setWizardTitle, wasCancelled |
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseDialogAction |
---|
getDialogHelpContextId, getNeedsProgressMonitor, getProcessAllSelections, getValue, run, setDialogHelp, setNeedsProgressMonitor, setProcessAllSelections, setValue, wasNeedsProgressMonitorSet |
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.ISystemDialogAction |
---|
getValue, setProcessAllSelections, setValue |
Methods inherited from interface org.eclipse.rse.ui.actions.ISystemAction |
---|
allowOnMultipleSelection, getContextMenuGroup, getHelpContextId, getSelection, getShell, getViewer, isDummy, isSelectionSensitive, setContextMenuGroup, setHelp, setInputs, setSelection, 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, run, 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 |
---|
protected ISystemFilterPool parentPool
protected ISystemFilterPool[] poolsToSelectFrom
protected ISystemFilterPoolWrapperInformation poolWrapperInformation
protected boolean nested
protected boolean showFilterStrings
protected boolean showNamePrompt
protected boolean showInfoPage
protected boolean fromRSE
protected String[] defaultFilterStrings
protected String type
protected String verbiage
protected String page1Description
protected String namePageHelp
protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator
protected ISystemNewFilterActionConfigurator callbackConfigurator
protected boolean callbackConfiguratorCalled
protected Object callbackData
protected SystemFilterStringEditPane editPane
Constructor Detail |
---|
public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool, String label, String tooltip, ImageDescriptor image)
public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool, String label, String tooltip, ImageDescriptor image, boolean nested)
public SystemNewFilterAction(Shell shell, ISystemFilterPool parentPool)
Method Detail |
---|
public void setCallBackConfigurator(ISystemNewFilterActionConfigurator caller, Object data)
caller
- - an implementor of the callback interfacedata
- - any data the callback needs. It will be passed back on the callback.public void setHelpContextId(String id)
Same as #setHelp(String)
#getHelpContextId()
public void setParentFilterPool(ISystemFilterPool parentPool)
public void setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom)
public void setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolsToSelectFrom)
setAllowFilterPoolSelection(ISystemFilterPool[])
If you want to prompt the user for the parent filter pool to create this filter in, but want to not use the term "pool" say, you can use an array of euphamisms. That is, you can pass an array of objects that map to filter pools, but have a different display name that is shown in the dropdown.
Of course, if you want to do this, then you will likely want to offer a different label and tooltip for the prompt, and different verbiage above the prompt. The object this method accepts as a parameter encapsulates all that information, and there is a default class you can use for this.
public void setType(String type)
This will also result in a call to setType(String) on the filter string edit pane, which sets the type instance variable in case your edit pane subclass needs to know.
public String getType()
setType(String)
public void setShowFilterStrings(boolean show)
setDefaultFilterStrings(String[])
public void setDefaultFilterStrings(String[] defaultFilterStrings)
public void setShowNamePrompt(boolean show)
This is used when creating temporary filters that won't be saved. In this case, on Finish a filter is not created! Instead, call getFilterStrings() to get the filter strings created by the user ... typically there is just one unless you also called setDefaultFilterStrings, in which case they will also be returned.
For convenience, when this is called, setShowInfoPage(false) is called for you
public void setShowInfoPage(boolean show)
setVerbiage(String)
public void setVerbiage(String verbiage)
public void setPage1Description(String description)
public void setFromRSE(boolean rse)
This is set to true automatically by the subsystem factory base class in the RSE, else it defaults to false.
public void setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
public void setNamePageHelp(String helpId)
protected void configureNewFilterWizard(SystemNewFilterWizard wizard)
Note, at the point this is called, all the base configuration, based on the setters for this action, have been called. There really is nothing much that can't be done via setters. The reason you may want to subclass versus use the setters is defer expensive operations until the user actually selects the New Filter action. Using the setters means this is done at time the popup menu is being construction. Overriding this method allows you to defer the wizard configuration until the user selects the action and the wizard is actually created.
By default, this does nothing.
protected void configureNewFilter(ISystemFilter newFilter)
By default, this does nothing.
protected IWizard createWizard()
createNewFilterWizard(ISystemFilterPool)
.
Note your own wizard must subclass SystemNewFilterWizard
createWizard
in class SystemBaseWizardAction
protected SystemNewFilterWizard createNewFilterWizard(ISystemFilterPool parentPool)
SystemNewFilterWizard
.
You can avoid creating your own wizard subclass by instead overriding
configureNewFilterWizard(SystemNewFilterWizard)
protected void postProcessWizard(IWizard wizard)
configureNewFilter(ISystemFilter)
.
postProcessWizard
in class SystemBaseWizardAction
public boolean checkObjectType(Object selectedObject)
checkObjectType
in class SystemBaseAction
public ISystemFilterPoolReferenceManagerProvider getSystemFilterPoolReferenceManagerProvider()
public ISystemFilter getNewFilter()
Be sure to call wasCancelled() first before calling this.
public String[] getFilterStrings()
Be sure to call wasCancelled() first before calling this.
public String getFilterString()
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |