|
org.eclipse.rse.ui.filters.dialogs
Class SystemChangeFilterDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.rse.ui.dialogs.SystemPromptDialog
org.eclipse.rse.ui.filters.dialogs.SystemChangeFilterDialog
-
All Implemented Interfaces:
-
Runnable,
IDialogPage,
IRunnableContext,
IShellProvider,
ISystemPromptDialog,
ISystemChangeFilterPaneEditPaneSupplier,
ISystemPageCompleteListener,
ISystemMessageLine,
Listener
-
public class SystemChangeFilterDialog
- extends
SystemPromptDialog
- implements
ISystemPageCompleteListener,
ISystemChangeFilterPaneEditPaneSupplier
A dialog that allows the user to change a filter. It allows update of the filter strings.
We do not typically override this to produce our own change filter dialog ... rather we usually
call the configuration methods to affect it. At a minimum, we usually want to set the
editpane ,
which is used to prompt for a new filter string or change an existing one. We usually share the
same edit pane with the
SystemNewFilterWizard wizard.
Fields inherited from class org.eclipse.rse.ui.dialogs.
SystemPromptDialog
|
activeRunningOperations,
ADD_BUTTON_NO,
ADD_BUTTON_YES,
ADD_ID,
addButton,
arrowCursor,
BROWSE_BUTTON_NO,
BROWSE_BUTTON_YES,
BROWSE_ID,
browseButton,
buttonsComposite,
CANCEL_ALL_ID,
cancelAllButton,
cancelAllPressed,
cancelButton,
cancelListener,
DETAILS_BUTTON_NO,
DETAILS_BUTTON_YES,
DETAILS_ID,
detailsButton,
detailsButtonHideMode,
detailsHideLabel,
detailsShowLabel,
dialogAreaComposite,
dialogMnemonics,
fMessageLine,
helpId,
horizontalSpacing,
initialAddButtonEnabledState,
initialDetailsButtonEnabledState,
initialOKButtonEnabledState,
inputObject,
labelAdd,
labelBrowse,
labelCancel,
labelCancelAll,
labelDetailsHide,
labelDetailsShow,
labelOk,
labelTest,
marginHeight,
marginWidth,
minHeight,
minWidth,
needsProgressMonitor,
noShowAgainButton,
noShowAgainOption,
okButton,
okPressed,
operationCancelableState,
outputObject,
outputObjectValidator,
overallShell,
pack,
parentComposite,
pendingErrorMessage,
pendingMessage,
prefId,
prefStore,
prefValAsSelected,
progressMonitorPart,
showAddButton,
showBrowseButton,
showCancelAllButton,
showDetailsButton,
showOkButton,
showTestButton,
TEST_BUTTON_NO,
TEST_BUTTON_YES,
TEST_ID,
testButton,
tipAdd,
tipBrowse,
tipCancel,
tipCancelAll,
tipDetailsHide,
tipDetailsShow,
tipOk,
tipTest,
title,
titleImage,
verticalSpacing,
waitCursor,
windowClosingDialog
|
Fields inherited from class org.eclipse.jface.dialogs.
Dialog
|
blockedHandler,
buttonBar,
DIALOG_DEFAULT_BOUNDS,
DIALOG_PERSISTLOCATION,
DIALOG_PERSISTSIZE,
dialogArea,
DLG_IMG_ERROR,
DLG_IMG_HELP,
DLG_IMG_INFO,
DLG_IMG_MESSAGE_ERROR,
DLG_IMG_MESSAGE_INFO,
DLG_IMG_MESSAGE_WARNING,
DLG_IMG_QUESTION,
DLG_IMG_WARNING,
ELLIPSIS
|
Fields inherited from class org.eclipse.jface.window.
Window
|
CANCEL,
OK
|
Method Summary
|
protected void
|
createButtonsForButtonBar
(
Composite parent)
Intercept of parent so we can reset the default button |
protected
Control
|
createInner
(
Composite parent)
Populates the content area |
SystemMessage
|
getDuplicateFilterStringErrorMessage
()
Return results of
setDuplicateFilterStringErrorMessage(SystemMessage)
|
boolean
|
getEditable
()
Return whether the edit pane is editable, as set by
setEditable(boolean)
|
SystemFilterStringEditPane
|
getFilterStringEditPane
(
Shell shell)
Return our edit pane. |
ISystemValidator
|
getFilterStringValidator
()
Return the result of
setFilterStringValidator(ISystemValidator) . |
protected
Control
|
getInitialFocusControl
()
Returns the control (the list view) to recieve initial focus control |
String
|
getListLabel
()
Return list label as set by
setListLabel(String, String)
|
String
|
getListTip
()
Return list tip as set by
setListLabel(String, String)
|
String
|
getNamePromptLabel
()
Return the name prompt label as set by
setNamePromptLabel(String, String)
|
String
|
getNamePromptTip
()
Return the name prompt tip as set by
setNamePromptLabel(String, String)
|
String
|
getNewListItemText
()
Return the text for the list item, as set by
setNewListItemText(String) ,
or the default if not set. |
String
|
getParentPoolPromptLabel
()
Return the parent filter pool prompt label, as set by
setParentPoolPromptLabel(String, String)
|
String
|
getParentPoolPromptTip
()
Return the parent filter pool prompt tip, as set by
setParentPoolPromptLabel(String, String)
|
Shell
|
getParentShell
()
Returns parent shell, under which this window's shell is created. |
boolean
|
getSupportsMultipleStrings
()
Return whether the user is to be allowed to create multiple filter strings or not. |
boolean
|
getWantTestButton
()
Return whether a test button is wanted or not, as set by
setWantTestButton(boolean)
|
protected boolean
|
processCancel
()
Parent override. |
protected boolean
|
processOK
()
Parent override. |
void
|
setDuplicateFilterStringErrorMessage
(
SystemMessage msg)
Configuration method
Set the error message to use when the user is editing or creating a filter string, and the
Apply processing detects a duplicate filter string in the list. |
void
|
setEditable
(boolean editable)
Set if the edit pane is not to be editable |
void
|
setFilterStringEditPane
(
SystemFilterStringEditPane editPane)
Configuration method
Specify an edit pane that prompts the user for the contents of a filter string. |
void
|
setFilterStringValidator
(
ISystemValidator v)
Configuration method
Call this to specify a validator for the filter string. |
protected void
|
setHelp
()
Overridable extension point for setting dialog help |
void
|
setInputObject
(
Object inputObject)
Intercept of parent so we can set the input filter, and deduce whether
strings are case sensitive and if duplicates are allowed. |
void
|
setListLabel
(
String label,
String tip)
Configuration method
Set the label shown in group box around the filter string list, and the tooltip text for the
list box. |
void
|
setNamePromptLabel
(
String label,
String tip)
Configuration method
Set the name prompt label and tooltip text. |
void
|
setNewListItemText
(
String label)
Set the string to show as the first item in the list. |
void
|
setPageComplete
(boolean complete)
The comleteness of the page has changed. |
void
|
setParentPoolPromptLabel
(
String label,
String tip)
Configuration method
Set the Parent Filter Pool prompt label and tooltip text. |
void
|
setSupportsMultipleStrings
(boolean multi)
Set if the user is to be allowed to create multiple filter strings or not. |
void
|
setSystemFilterPoolManagerProvider
(
ISystemFilterPoolManagerProvider provider)
Configuration method
Set the contextual system filter pool manager provider. |
void
|
setSystemFilterPoolReferenceManagerProvider
(
ISystemFilterPoolReferenceManagerProvider provider)
Configuration method
Set the contextual system filter pool reference manager provider. |
void
|
setWantTestButton
(boolean wantTestButton)
Configuration method
Specify if you want to include a test button or not. |
Methods inherited from class org.eclipse.rse.ui.dialogs.
SystemPromptDialog
|
aboutToStart,
addFillerLine,
addGrowableFillerLine,
addSeparatorLine,
adjustButtonWidth,
applyMnemonics,
buttonPressed,
clearErrorMessage,
clearMessage,
close,
configureShell,
createButtonBar,
createContents,
createControl,
createDialogArea,
createMessageLine,
createNoShowAgainButton,
createWizardClosingDialog,
dispose,
enableAddButton,
enableBrowseButton,
enableCancelAllButton,
enableCancelButton,
enableDetailsButton,
enableOkButton,
enableTestButton,
getAddButton,
getBrowseButton,
getCancelAllButton,
getCancelOrCloseButton,
getControl,
getDescription,
getDetailsButton,
getDialogMnemonics,
getErrorMessage,
getHelpContextId,
getImage,
getInputObject,
getMessage,
getMessageLine,
getOkButton,
getOutputObject,
getOutputObjectValidator,
getProgressMonitor,
getSystemErrorMessage,
getTestButton,
getTitle,
handleEvent,
hardClose,
okToClose,
performHelp,
processAdd,
processBrowse,
processCancelAll,
processDetails,
processTest,
publicConvertHeightInCharsToPixels,
publicConvertWidthInCharsToPixels,
restoreEnableState,
restoreUIState,
run,
run,
saveEnableStateAndSet,
saveUIState,
setAddButtonLabel,
setAddButtonToolTipText,
setBrowseButtonLabel,
setBrowseButtonToolTipText,
setBusyCursor,
setCancelAllButtonLabel,
setCancelAllButtonToolTipText,
setCancelButtonLabel,
setCancelButtonToolTipText,
setControl,
setDescription,
setDetailsButtonLabel,
setDetailsButtonToolTipText,
setDisplayCursor,
setDisplayCursor,
setErrorMessage,
setErrorMessage,
setErrorMessage,
setHelp,
setHelp,
setImageDescriptor,
setInitialOKButtonEnabledState,
setMessage,
setMessage,
setMinimumSize,
setNeedsProgressMonitor,
setNoShowAgainOption,
setOkButtonLabel,
setOkButtonToolTipText,
setOutputObject,
setOutputObjectValidator,
setShowAddButton,
setShowBrowseButton,
setShowCancelAllButton,
setShowDetailsButton,
setShowOkButton,
setShowTestButton,
setTestButtonLabel,
setTestButtonToolTipText,
setTitle,
setVisible,
wasCancelled,
wasCancelledAll
|
Methods inherited from class org.eclipse.jface.dialogs.
Dialog
|
applyDialogFont,
cancelPressed,
convertHeightInCharsToPixels,
convertHeightInCharsToPixels,
convertHorizontalDLUsToPixels,
convertHorizontalDLUsToPixels,
convertVerticalDLUsToPixels,
convertVerticalDLUsToPixels,
convertWidthInCharsToPixels,
convertWidthInCharsToPixels,
create,
createButton,
dialogFontIsDefault,
getBlockedHandler,
getButton,
getButtonBar,
getCancelButton,
getDialogArea,
getDialogBoundsSettings,
getDialogBoundsStrategy,
getImage,
getInitialLocation,
getInitialSize,
getOKButton,
initializeBounds,
initializeDialogUnits,
isResizable,
okPressed,
setBlockedHandler,
setButtonLayoutData,
setButtonLayoutFormData,
shortenText
|
Methods inherited from class org.eclipse.jface.window.
Window
|
canHandleShellCloseEvent,
constrainShellSize,
createShell,
getConstrainedShellBounds,
getContents,
getDefaultImage,
getDefaultImages,
getDefaultOrientation,
getLayout,
getReturnCode,
getShell,
getShellListener,
getShellStyle,
getWindowManager,
handleFontChange,
handleShellCloseEvent,
open,
setBlockOnOpen,
setDefaultImage,
setDefaultImages,
setDefaultModalParent,
setDefaultOrientation,
setExceptionHandler,
setParentShell,
setReturnCode,
setShellStyle,
setWindowManager
|
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
changeFilterPane
protected
SystemChangeFilterPane changeFilterPane
editPane
protected
SystemFilterStringEditPane editPane
SystemChangeFilterDialog
public SystemChangeFilterDialog(
Shell shell)
- Constructor
SystemChangeFilterDialog
public SystemChangeFilterDialog(
Shell shell,
String title)
- Constructor, when unique title desired
setHelp
protected void setHelp()
- Overridable extension point for setting dialog help
-
-
setFilterStringEditPane
public void setFilterStringEditPane(
SystemFilterStringEditPane editPane)
-
Configuration method
Specify an edit pane that prompts the user for the contents of a filter string.
-
-
setSystemFilterPoolReferenceManagerProvider
public void setSystemFilterPoolReferenceManagerProvider(
ISystemFilterPoolReferenceManagerProvider provider)
-
Configuration method
Set the contextual system filter pool reference manager 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.
-
-
setSystemFilterPoolManagerProvider
public void setSystemFilterPoolManagerProvider(
ISystemFilterPoolManagerProvider provider)
-
Configuration method
Set the contextual system filter pool manager provider. Will be non-null if the
current selection is a filter pool or filter, or reference to them, or a manager provider.
Generally this is called when the setSystemFilterPoolReferenceManagerProvider can't be called
for some reason.
This is passed into the filter and filter string wizards and dialogs in case it is needed
for context.
-
-
setParentPoolPromptLabel
public void setParentPoolPromptLabel(
String label,
String tip)
-
Configuration method
Set the Parent Filter Pool prompt label and tooltip text.
-
-
getParentPoolPromptLabel
public
String getParentPoolPromptLabel()
- Return the parent filter pool prompt label, as set by
setParentPoolPromptLabel(String, String)
-
-
getParentPoolPromptTip
public
String getParentPoolPromptTip()
- Return the parent filter pool prompt tip, as set by
setParentPoolPromptLabel(String, String)
-
-
setNamePromptLabel
public void setNamePromptLabel(
String label,
String tip)
-
Configuration method
Set the name prompt label and tooltip text.
-
-
getNamePromptLabel
public
String getNamePromptLabel()
- Return the name prompt label as set by
setNamePromptLabel(String, String)
-
-
getNamePromptTip
public
String getNamePromptTip()
- Return the name prompt tip as set by
setNamePromptLabel(String, String)
-
-
setListLabel
public void setListLabel(
String label,
String tip)
-
Configuration method
Set the label shown in group box around the filter string list, and the tooltip text for the
list box.
-
-
getListLabel
public
String getListLabel()
- Return list label as set by
setListLabel(String, String)
-
-
getListTip
public
String getListTip()
- Return list tip as set by
setListLabel(String, String)
-
-
setNewListItemText
public void setNewListItemText(
String label)
- Set the string to show as the first item in the list.
The default is "New filter string"
-
-
getNewListItemText
public
String getNewListItemText()
- Return the text for the list item, as set by
setNewListItemText(String) ,
or the default if not set.
-
-
setFilterStringValidator
public void setFilterStringValidator(
ISystemValidator v)
-
Configuration method
Call this to specify a validator for the filter string. It will be called per keystroke.
A default validator is supplied otherwise: ValidatorFilterString.
Your validator should extend ValidatorFilterString to inherited the uniqueness error checking.
Alternatively, if all you want is a unique error message for the case when duplicates are found,
call setDuplicateFilterStringErrorMessage, and it will be used in the default validator.
-
-
getFilterStringValidator
public
ISystemValidator getFilterStringValidator()
- Return the result of
setFilterStringValidator(ISystemValidator) .
-
-
setDuplicateFilterStringErrorMessage
public void setDuplicateFilterStringErrorMessage(
SystemMessage msg)
-
Configuration method
Set the error message to use when the user is editing or creating a filter string, and the
Apply processing detects a duplicate filter string in the list.
-
-
getDuplicateFilterStringErrorMessage
public
SystemMessage getDuplicateFilterStringErrorMessage()
- Return results of
setDuplicateFilterStringErrorMessage(SystemMessage)
-
-
setWantTestButton
public void setWantTestButton(boolean wantTestButton)
-
Configuration method
Specify if you want to include a test button or not. Appears with "Apply" and "Reset"
-
-
getWantTestButton
public boolean getWantTestButton()
- Return whether a test button is wanted or not, as set by
setWantTestButton(boolean)
-
-
setEditable
public void setEditable(boolean editable)
- Set if the edit pane is not to be editable
-
-
getEditable
public boolean getEditable()
- Return whether the edit pane is editable, as set by
setEditable(boolean)
-
-
setSupportsMultipleStrings
public void setSupportsMultipleStrings(boolean multi)
- Set if the user is to be allowed to create multiple filter strings or not. Default is true
-
-
getSupportsMultipleStrings
public boolean getSupportsMultipleStrings()
- Return whether the user is to be allowed to create multiple filter strings or not. Default is true
-
-
setInputObject
public void setInputObject(
Object inputObject)
- Intercept of parent so we can set the input filter, and deduce whether
strings are case sensitive and if duplicates are allowed.
Not typically overridden, but if you do, be sure to call super!
-
-
Specified by:
-
setInputObject
in interface
ISystemPromptDialog
-
Overrides:
-
setInputObject
in class
SystemPromptDialog
-
getInitialFocusControl
protected
Control getInitialFocusControl()
- Returns the control (the list view) to recieve initial focus control
-
-
Specified by:
-
getInitialFocusControl
in class
SystemPromptDialog
-
createInner
protected
Control createInner(
Composite parent)
- Populates the content area
-
-
Specified by:
-
createInner
in class
SystemPromptDialog
-
createButtonsForButtonBar
protected void createButtonsForButtonBar(
Composite parent)
- Intercept of parent so we can reset the default button
-
-
Overrides:
-
createButtonsForButtonBar
in class
SystemPromptDialog
-
-
Parameters:
-
parent - the button bar composite
getFilterStringEditPane
public
SystemFilterStringEditPane getFilterStringEditPane(
Shell shell)
- Return our edit pane. Overriding this is an alternative to calling setEditPane.
Method is declared in
ISystemChangeFilterPaneEditPaneSupplier .
-
-
Specified by:
-
getFilterStringEditPane
in interface
ISystemChangeFilterPaneEditPaneSupplier
-
processOK
protected boolean processOK()
- Parent override.
Called when user presses OK button.
This is when we save all the changes the user made.
-
-
Overrides:
-
processOK
in class
SystemPromptDialog
-
processCancel
protected boolean processCancel()
- Parent override.
Called when user presses CLOSE button. We simply blow away all their changes!
-
-
Overrides:
-
processCancel
in class
SystemPromptDialog
-
setPageComplete
public void setPageComplete(boolean complete)
- The comleteness of the page has changed.
This is a callback from SystemChangeFilterPane.
-
-
Specified by:
-
setPageComplete
in interface
ISystemPageCompleteListener
-
Overrides:
-
setPageComplete
in class
SystemPromptDialog
-
-
Parameters:
-
complete - complete indicator as set by the caller -
See Also:
-
SystemBaseForm.addPageCompleteListener(ISystemPageCompleteListener)
getParentShell
public
Shell getParentShell()
- Returns parent shell, under which this window's shell is created.
-
-
Overrides:
-
getParentShell
in class
Window
-
-
Returns:
- the parent shell, or
null if there is no parent shell
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|