|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.etools.systems.filters.ui.SystemFilterStringEditPane
This class prompts the user to create or edit the contents of a single filter string. This edit pane is used in many places, so creating a decent looking subclass is important:
Field Summary | |
---|---|
protected boolean |
changeFilterMode
|
static String |
copyright
|
protected int |
currentSelectionIndex
|
protected Button |
dlgTestButton
|
protected SystemMessage |
errorMessage
|
protected boolean |
ignoreChanges
|
protected String |
inputFilterString
|
protected Label |
labelString
|
protected Vector |
listeners
|
protected boolean |
newMode
|
protected SystemFilterPoolManagerProvider |
provider
|
protected SystemFilterPoolReferenceManagerProvider |
refProvider
|
protected Shell |
shell
|
protected boolean |
skipEventFiring
|
protected Text |
textString
|
protected String |
type
|
Constructor Summary | |
---|---|
SystemFilterStringEditPane(Shell shell)
Constructor for SystemFilterStringEditPane. |
Method Summary | |
---|---|
void |
addChangeListener(ISystemFilterStringEditPaneListener l)
Configuration method, called from Change Filter dialog and New Filter wizard. |
protected void |
addFillerLine(Composite parent,
int nbrColumns)
Helper method. |
protected void |
addGrowableFillerLine(Composite parent,
int nbrColumns)
Helper method. |
protected void |
addSeparatorLine(Composite parent,
int nbrColumns)
Helper method. |
boolean |
areErrorsPending()
Lifecycle method. |
protected boolean |
areFieldsComplete()
Overridable lifecycle method. |
boolean |
canSaveImplicitly()
Returns whether filter string can be saved implicitly. |
void |
clearErrorsPending()
Lifecycle method. |
void |
configureHeadingLabel(Label label)
Overridable configuration method, called from Change Filter dialog and New Filter wizard. |
Control |
createContents(Composite parent)
Overridable lifecycle method. |
protected void |
doInitializeFields()
Overridable lifecycle method. |
protected void |
fireBackupChangeEvent()
Tell interested callers to backup changes-pending state, as we are about to fire a change event, after which we will want to restore state. |
protected void |
fireChangeEvent(SystemMessage error)
Private method. |
protected void |
fireRestoreChangeEvent()
Private method. |
int |
getCurrentSelectionIndex()
Getter method. |
String |
getDefaultFilterName()
Overridable getter method. |
String |
getFilterString()
Overridable getter method. |
protected String |
getFilterStringPromptRBKey()
Overridable lifecycle method. |
Control |
getInitialFocusControl()
Overridable lifecycle method. |
protected String |
getInputFilterString()
Helper method. |
protected ResourceBundle |
getResourceBundle()
Overridable lifecycle method. |
protected Shell |
getShell()
Helper method. |
SystemFilterPoolManagerProvider |
getSystemFilterPoolManagerProvider()
Getter method, for the use of subclasses. |
SystemFilterPoolReferenceManagerProvider |
getSystemFilterPoolReferenceManagerProvider()
Getter method, for the use of subclasses. |
boolean |
isComplete()
Lifecycle method. |
void |
processTest(Shell shell)
Overridable method, if subclass supports a Test button. |
void |
removeChangeListener(ISystemFilterStringEditPaneListener l)
Configuration method, called from Change Filter dialog and New Filter wizard. |
protected void |
resetFields()
Overridable lifecycle method. |
void |
setChangeFilterMode(boolean changeMode)
Configuration method, called from Change Filter dialog. |
void |
setFilterString(String filterString,
int selectionIndex)
Configuration method, called from Change Filter dialog and New Filter wizard. |
protected void |
setIgnoreChanges(boolean ignoreChanges)
Lifecyle method. |
void |
setInputFilterString(String filterString)
Configuration method, called from Change Filter dialog and New Filter wizard. |
void |
setSystemFilterPoolManagerProvider(SystemFilterPoolManagerProvider provider)
Configuration method, called from Change Filter dialog and New Filter wizard. |
void |
setSystemFilterPoolReferenceManagerProvider(SystemFilterPoolReferenceManagerProvider provider)
Configuration method, called from Change Filter dialog and New Filter wizard. |
void |
setTestButton(Button button)
Configuration method, called from Change Filter dialog and New Filter wizard. |
void |
setType(String type)
Helper method you do not need to ever override. |
protected SystemMessage |
validateStringInput()
Overridable lifecycle method. |
SystemMessage |
verify()
Overridable lifecycle method. |
void |
widgetDefaultSelected(SelectionEvent event)
Overridable lifecycle method. |
void |
widgetSelected(SelectionEvent event)
Overridable lifecycle method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String copyright
protected Shell shell
protected String inputFilterString
protected Vector listeners
protected SystemFilterPoolReferenceManagerProvider refProvider
protected SystemFilterPoolManagerProvider provider
protected String type
protected boolean newMode
protected boolean changeFilterMode
protected boolean ignoreChanges
protected Label labelString
protected Text textString
protected Button dlgTestButton
protected SystemMessage errorMessage
protected boolean skipEventFiring
protected int currentSelectionIndex
Constructor Detail |
public SystemFilterStringEditPane(Shell shell)
shell
- - the shell of the wizard or dialog host thisMethod Detail |
protected Shell getShell()
protected String getInputFilterString()
protected void addSeparatorLine(Composite parent, int nbrColumns)
protected void addFillerLine(Composite parent, int nbrColumns)
protected void addGrowableFillerLine(Composite parent, int nbrColumns)
public void setFilterString(String filterString, int selectionIndex)
filterString
- - the filter string to edit or null if new modeselectionIndex
- - the index of the currently selected filter string. Only used for getCurrentSelectionIndex().public void setInputFilterString(String filterString)
protected void setIgnoreChanges(boolean ignoreChanges)
public void addChangeListener(ISystemFilterStringEditPaneListener l)
public void removeChangeListener(ISystemFilterStringEditPaneListener l)
public void setSystemFilterPoolReferenceManagerProvider(SystemFilterPoolReferenceManagerProvider 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 not used by default but made available for subclasses.
setSystemFilterPoolManagerProvider(SystemFilterPoolManagerProvider)
public void setSystemFilterPoolManagerProvider(SystemFilterPoolManagerProvider provider)
Will be non-null if the current selection is a reference to a filter pool or filter, or a filter pool or filter, or a manager provider itself.
This is not used by default but made available for subclasses.
setSystemFilterPoolReferenceManagerProvider(SystemFilterPoolReferenceManagerProvider)
public SystemFilterPoolReferenceManagerProvider getSystemFilterPoolReferenceManagerProvider()
This is not used by default but made available for subclasses.
public SystemFilterPoolManagerProvider getSystemFilterPoolManagerProvider()
This is not used by default but made available for subclasses.
public void setType(String type)
This simply sets the type instance variable, so that subclassing code may access it if it needs to know what type of filter is being created. This method is called by the setType method in the SystemNewFilterWizard wizard.
public void setChangeFilterMode(boolean changeMode)
public void setTestButton(Button button)
public void processTest(Shell shell)
public String getFilterString()
This is the functional opposite of doInitializeFields, which tears apart the input string in update mode, to populate the GUIs. This method creates the filter string from the information in the GUI.
public int getCurrentSelectionIndex()
public String getDefaultFilterName()
public void configureHeadingLabel(Label label)
This method gives subclasses the opportunity to specify unique values for this label. In addition to setting the text, the tooltip text should also be set.
Defaults are supplied.
public Control createContents(Composite parent)
parent
- - the composite that will be the parent of the returned client area composite
SystemWidgetHelpers
public Control getInitialFocusControl()
protected ResourceBundle getResourceBundle()
Not used if you override createContents
protected String getFilterStringPromptRBKey()
Not used if you override createContents
protected void doInitializeFields()
protected void resetFields()
public boolean isComplete()
areFieldsComplete()
.
This is called by the wizard page when first shown, to decide if the default information is complete enough to enable finish. It doesn't do validation, that will be done when finish is pressed.
protected boolean areFieldsComplete()
This is called by the isComplete, to decide if the default information is complete enough to enable finish. It doesn't do validation, that will be done when finish is pressed.
public boolean areErrorsPending()
public void clearErrorsPending()
protected void fireChangeEvent(SystemMessage error)
Because this is used to enable/disable the Next and Finish buttons it is important to call it when asked to do verification, even if nothing has changed.
It is more efficient, however, to defer the event firing during a full verification until after the last widget has been verified. To enable this, set the protected variable "skipEventFiring" to true at the top of your verify event, then to "false" at the end. Then do fireChangeEvent(errorMessage);
protected void fireBackupChangeEvent()
protected void fireRestoreChangeEvent()
protected SystemMessage validateStringInput()
public SystemMessage verify()
Default implementation calls validateStringInput()
.
public void widgetSelected(SelectionEvent event)
public void widgetDefaultSelected(SelectionEvent event)
public boolean canSaveImplicitly()
false
,
and the user has pending changes when he clicks on another entry in the filter string list, we will
not ask user to save pending changes.
By default, returns true
true
to query user to save pending changes, false
otherwise.
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |