|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.wizard.Wizard
org.eclipse.rse.ui.wizards.AbstractSystemWizard
org.eclipse.rse.ui.filters.dialogs.SystemNewFilterWizard
public class SystemNewFilterWizard
Base Wizard for users to define a new system filter. While subsystem providers are free to offer their own wizards, this abstracts out much of it and makes it easy to simply override and supply a couple classes to offer a totally unique presentation to the user.
Some guiding design rules for this wizard:
While this class can be subclassed, you should find all attributes can be configured via setters.
Field Summary | |
---|---|
protected ISystemNewFilterWizardConfigurator |
configurator
|
protected String[] |
defaultFilterStrings
|
protected SystemFilterStringEditPane |
editPane
|
protected ISystemFilterContainer |
filterContainer
|
protected ISystemFilterPoolSelectionValidator |
filterPoolSelectionValidator
|
protected boolean |
fromRSE
|
protected SystemNewFilterWizardInfoPage |
infoPage
|
protected SystemNewFilterWizardMainPage |
mainPage
|
protected ISystemFilter |
newFilter
|
protected boolean |
page1DescriptionSet
|
protected ISystemFilterPool |
parentPool
|
protected ISystemFilterPool[] |
poolsToSelectFrom
|
protected ISystemFilterPoolWrapperInformation |
poolWrapperInformation
|
protected ISystemFilterPoolReferenceManagerProvider |
provider
|
protected boolean |
showFilterStrings
|
protected boolean |
showInfoPage
|
protected boolean |
showNamePrompt
|
protected String |
type
|
Fields inherited from class org.eclipse.rse.ui.wizards.AbstractSystemWizard |
---|
cancelled, finishPressed, helpId, input, minPageHeight, minPageWidth, output, owningDialog, pageTitle, selection, viewer |
Fields inherited from class org.eclipse.jface.wizard.Wizard |
---|
DEFAULT_IMAGE |
Constructor Summary | |
---|---|
SystemNewFilterWizard(ISystemFilterPool parentPool)
Constructor when you want to use the default page title and image, or want to supply it via setWizardTitle and setWizardImage. |
|
SystemNewFilterWizard(ISystemNewFilterWizardConfigurator data,
ImageDescriptor wizardImage,
ISystemFilterPool parentPool)
Constructor when you want to supply all your own configuration data |
|
SystemNewFilterWizard(String title,
ImageDescriptor wizardImage,
ISystemFilterPool parentPool)
Constructor when you want to supply your own title and image |
Method Summary | |
---|---|
void |
addPages()
Override of parent to do nothing |
boolean |
areStringsCaseSensitive()
Override if necessary. |
protected SystemNewFilterWizardInfoPage |
createInfoPage()
Extendable point for child classes. |
protected SystemNewFilterWizardMainPage |
createMainPage()
Extendable point for child classes. |
protected SystemNewFilterWizardNamePage |
createNamePage()
By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor. |
ISystemFilter |
createNewFilter(Shell shell,
ISystemFilterContainer filterParent,
String aliasName,
Vector filterStringsVector,
String type)
Extendable point for child classes. |
void |
createPageControls(Composite c)
Creates the wizard pages. |
String |
getDefaultFilterName()
For page 2 of the New Filter wizard, if it is possible to deduce a reasonable default name from the user input here, then return it here. |
protected ISystemFilterContainer |
getFilterContainer()
Return parent filter container to contain this filter |
protected ISystemValidator |
getFilterNameValidator(ISystemFilterContainer container)
Extendable point for child classes. |
static ISystemValidator |
getFilterNameValidator(ISystemFilterContainer container,
ISystemFilter filter)
Reusable method to return a name validator for renaming a filter. |
protected Object |
getParent()
Return the parent into which we are creating a filter. |
ISystemFilter |
getSystemFilter()
Return the filter created upon successful finish |
String |
getType()
Get the type of filter as set by setType(String) |
protected boolean |
isFromRSE()
Return true if this filter is an RSE filter or not |
boolean |
performFinish()
Completes processing of the wizard. |
void |
setAllowFilterPoolSelection(ISystemFilterPool[] poolsToSelectFrom)
If you want to prompt the user for the parent filter pool to create this filter in, call this with the list of filter pools. |
void |
setAllowFilterPoolSelection(ISystemFilterPoolWrapperInformation poolsToSelectFrom)
This is an alternative to 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. |
void |
setDefaultFilterStrings(String[] defaultFilterStrings)
Call this if you want the filter to auto-include some default filter strings. |
void |
setFilterContainer(ISystemFilterContainer container)
Set parent filter container to contain this filter |
void |
setFilterContainer(ISystemFilterContainerReference containerRef)
Set parent filter container to contain this filter |
void |
setFilterPoolSelectionValidator(ISystemFilterPoolSelectionValidator validator)
Set the validator to call when the user selects a filter pool. |
void |
setFilterStringEditPane(SystemFilterStringEditPane editPane)
Specify an edit pane that prompts the user for the contents of a filter string. |
void |
setFromRSE(boolean rse)
Set if we are creating a filter for use in the RSE or not. |
void |
setNamePageHelp(String helpId)
Specify the help to show for the name page (page 2) |
void |
setPage1Description(String description)
Set the description to display on the first page of the wizard |
void |
setShowFilterStrings(boolean show)
Call in order to not have the first page, but instead the name-prompt page. |
void |
setShowInfoPage(boolean show)
Call in order to not show the final info-only page of the wizard. |
void |
setShowNamePrompt(boolean show)
Call in order to not prompt the user for a filter name. |
void |
setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
Set the contextual system filter pool reference manager provider. |
void |
setType(String type)
Set the type of filter we are creating. |
void |
setVerbiage(String verbiage)
Set the verbiage to show on the final page. |
void |
setWizardPageTitle(String pageTitle)
Set the wizard page title. |
Methods inherited from class org.eclipse.rse.ui.wizards.AbstractSystemWizard |
---|
addPage, getCurrentTreeView, getHelpContextId, getInputObject, getMinimumPageHeight, getMinimumPageWidth, getOutputObject, getSystemWizardDialog, getViewer, getWizardPageTitle, init, performCancel, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, setHelp, setInputObject, setMinimumPageSize, setOutputObject, setPageError, setSystemWizardDialog, setViewer, setWasCancelled, setWizardImage, setWizardTitle, updateSize, wasCancelled |
Methods inherited from class org.eclipse.jface.wizard.Wizard |
---|
canFinish, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.wizard.IWizard |
---|
canFinish, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, setContainer |
Field Detail |
---|
protected SystemNewFilterWizardMainPage mainPage
protected SystemNewFilterWizardInfoPage infoPage
protected ISystemFilterContainer filterContainer
protected ISystemFilterPool parentPool
protected ISystemFilterPool[] poolsToSelectFrom
protected String type
protected String[] defaultFilterStrings
protected boolean showFilterStrings
protected boolean showNamePrompt
protected boolean showInfoPage
protected boolean fromRSE
protected boolean page1DescriptionSet
protected ISystemFilter newFilter
protected SystemFilterStringEditPane editPane
protected ISystemFilterPoolReferenceManagerProvider provider
protected ISystemFilterPoolWrapperInformation poolWrapperInformation
protected ISystemFilterPoolSelectionValidator filterPoolSelectionValidator
protected ISystemNewFilterWizardConfigurator configurator
Constructor Detail |
---|
public SystemNewFilterWizard(String title, ImageDescriptor wizardImage, ISystemFilterPool parentPool)
title
- - title to show for this wizard. This is used as the page title! The title is always "New"!wizardImage
- - title bar image for this wizardparentPool
- - the filter pool we are to create this filter in.public SystemNewFilterWizard(ISystemFilterPool parentPool)
parentPool
- - the filter pool we are to create this filter in.public SystemNewFilterWizard(ISystemNewFilterWizardConfigurator data, ImageDescriptor wizardImage, ISystemFilterPool parentPool)
data
- - configuration datawizardImage
- - title bar image for this wizardparentPool
- - the filter pool we are to create this filter in.Method Detail |
---|
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)
public String getType()
setType(String)
public void setShowFilterStrings(boolean show)
setDefaultFilterStrings(String[])
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 setNamePageHelp(String helpId)
public void setShowInfoPage(boolean show)
public void setDefaultFilterStrings(String[] defaultFilterStrings)
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 setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
Will be non-null if the current selection is a reference to a filter pool or filter, or a reference manager provider.
This is passed into the filter and filter string wizards and dialogs in case it is needed for context.
public void setVerbiage(String verbiage)
public void setWizardPageTitle(String pageTitle)
This is not used by default, but can be queried via getPageTitle() when constructing pages.
setWizardPageTitle
in interface ISystemWizard
setWizardPageTitle
in class AbstractSystemWizard
public void setPage1Description(String description)
public void setFilterStringEditPane(SystemFilterStringEditPane editPane)
protected SystemNewFilterWizardMainPage createMainPage()
By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor.
protected SystemNewFilterWizardNamePage createNamePage()
protected SystemNewFilterWizardInfoPage createInfoPage()
By default, this page uses the wizard page title as set in setWizardPageTitle(...) or the constructor.
public void addPages()
addPages
in interface IWizard
addPages
in class AbstractSystemWizard
public void createPageControls(Composite c)
createPageControls
in interface IWizard
createPageControls
in class Wizard
protected ISystemValidator getFilterNameValidator(ISystemFilterContainer container)
public static ISystemValidator getFilterNameValidator(ISystemFilterContainer container, ISystemFilter filter)
container
- the current filter object on updates. Can be null for new names. Used
to remove from the existing name list the current filter's name.filter
- the filter whose name should be removed from the validation list. May be null if the list from the container
should be used intact.
public boolean areStringsCaseSensitive()
By default, returns the value in the selected filter container. If this is null, returns false.
public boolean performFinish()
performFinish
in interface IWizard
performFinish
in class AbstractSystemWizard
protected Object getParent()
protected ISystemFilterContainer getFilterContainer()
public void setFilterContainer(ISystemFilterContainer container)
public void setFilterContainer(ISystemFilterContainerReference containerRef)
public ISystemFilter createNewFilter(Shell shell, ISystemFilterContainer filterParent, String aliasName, Vector filterStringsVector, String type) throws Exception
shell
- the shell that hosts this wizard.filterParent
- the parent of this filter - usually a filter poolaliasName
- the name of the filter itselffilterStringsVector
- a Vector of string that contain the specification of this filtertype
- the type of the filter used when interpreting the filter, usually supplied by a subsystem
Exception
- if an error occursprotected boolean isFromRSE()
public String getDefaultFilterName()
public ISystemFilter getSystemFilter()
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |