|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.SystemBaseForm
org.eclipse.rse.ui.filters.SystemChangeFilterPane
public class SystemChangeFilterPane
Since we have decided to allow the same editing in both the Change Filter dialog and the Properties page, we have to abstract the meat of the change filter dialog into a re-usable composite. That is what this is, and it is used by both the dialog and the property page.
Fields inherited from class org.eclipse.rse.ui.SystemBaseForm |
---|
alreadyNotified, verifyListeners |
Constructor Summary | |
---|---|
SystemChangeFilterPane(Shell shell,
ISystemMessageLine msgLine,
ISystemChangeFilterPaneEditPaneSupplier editPaneSupplier)
Constructor. |
Method Summary | |
---|---|
protected void |
applyPressed()
User pressed Apply to save the pending changes the current filter string |
void |
backupChangedState()
Callback method. |
boolean |
canCopy()
Decide if we can do the copy or not. |
boolean |
canDelete()
Decide if we can do the delete or not. |
boolean |
canMoveDown()
Decide if we can do the move down or not. |
boolean |
canMoveUp()
Decide if we can do the move up or not. |
boolean |
canPaste()
Decide if we can do the paste or not. |
protected String |
checkForDuplicates()
This hook method is called when ok is pressed. |
boolean |
compareFilterStrings(boolean caseSensitive,
String filterString1,
String filterString2)
Compares one filter string to another, while searching for duplicates. |
Control |
createContents(Composite parent)
Populates the content area |
protected String |
createFilterString()
Create a new filter string from the contents of the filter string edit pane |
void |
createStandardGroups(IMenuManager menu)
Creates the Systems plugin standard groups in a context menu. |
void |
doCopy()
Actually do the copy of the current filter string to the clipboard. |
void |
doDelete()
Perform the delete action |
void |
doMoveDown()
Perform the move down action |
void |
doMoveUp()
Perform the move up action |
void |
doPaste()
Actually do the copy of the current filter string to the clipboard. |
void |
fillContextMenu(IMenuManager menu)
This is method is called to populate the popup menu |
void |
filterStringChanged(SystemMessage message)
Callback method from the edit pane. |
Button |
getApplyButton()
Return the Apply button |
protected String |
getCurrentSelection()
Return currently selected filter string |
SystemMessage |
getDuplicateFilterStringErrorMessage()
Return results of setDuplicateFilterStringErrorMessage(SystemMessage) |
boolean |
getEditable()
Return whether the edit pane is editable, as set by setEditable(boolean) |
protected SystemFilterStringEditPane |
getFilterStringEditPane(Shell shell)
Return our edit pane, by referring back to our caller. |
ISystemValidator |
getFilterStringValidator()
Return the result of setFilterStringValidator(ISystemValidator) . |
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) |
Button |
getRevertButton()
Return the Revert button |
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 void |
handleNewFilterStringItemSelection()
Handles new filter string selection from the filter string list. |
protected boolean |
isNewSelected()
Return true if currently selected item is "New" |
void |
menuAboutToShow(IMenuManager menu)
Called when the context menu is about to open. |
boolean |
processCancel()
Call when user presses Cancel button in containing dialog. |
boolean |
processOK()
Call when user presses OK button on containing dialog or pane. |
void |
restoreChangedState()
Callback method. |
protected void |
revertPressed()
User pressed Revert to discard the pending changes the current filter string |
protected void |
saveFilterString(String editedFilterString,
int currSelectionIndex)
Update the current selection with the values in the edit pane |
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 |
setFilterStringValidator(ISystemValidator v)
Configuration method Call this to specify a validator for the filter string. |
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 completeness 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. |
boolean |
verify(boolean doSave)
Perform the same validation that is done when OK is pressed. |
void |
widgetDefaultSelected(SelectionEvent e)
Handles events generated by controls on this page. |
void |
widgetSelected(SelectionEvent e)
Handles events generated by controls on this page. |
Methods inherited from class org.eclipse.rse.ui.SystemBaseForm |
---|
addFillerLine, addGrowableFillerLine, addPageCompleteListener, addSeparatorLine, addVerifyListener, getInputObject, getMessageLine, getOutputObject, getShell, getTheErrorMessage, handleEvent, isPageComplete, notifyVerifyListeners, removePageCompleteListener, removePageCompleteListener, setMessageLine, setOutputObject, setShell, showErrorMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Button applyButton
protected Button revertButton
protected Button testButton
protected SystemEditPaneStateMachine sm
protected List listView
protected Label filterNameLabel
protected Label filterPoolNameLabel
protected Label fsLabel
protected ISystemChangeFilterPaneEditPaneSupplier editPaneSupplier
protected ISystemFilter inputFilter
protected ISystemFilterPoolReferenceManagerProvider refProvider
protected ISystemFilterPoolManagerProvider provider
protected String namePromptLabel
protected String namePromptTip
protected String poolPromptLabel
protected String poolPromptTip
protected String listPromptLabel
protected String listPromptTip
protected String newEntryLabel
protected ISystemValidator filterStringValidator
protected SystemMessage duplicateFilterStringMsg
protected boolean wantTestButton
protected boolean editable
protected boolean caseSensitiveStrings
protected boolean allowDuplicateStrings
protected boolean ignoreEvents
protected boolean resetting
protected boolean giveEditorFocus
protected boolean showingNew
protected boolean supportsMultipleStrings
protected String[] listItems
Constructor Detail |
---|
public SystemChangeFilterPane(Shell shell, ISystemMessageLine msgLine, ISystemChangeFilterPaneEditPaneSupplier editPaneSupplier)
Method Detail |
---|
public void setSystemFilterPoolReferenceManagerProvider(ISystemFilterPoolReferenceManagerProvider provider)
This is passed into the filter and filter string wizards and dialogs in case it is needed for context.
public void setSystemFilterPoolManagerProvider(ISystemFilterPoolManagerProvider provider)
This is passed into the filter and filter string wizards and dialogs in case it is needed for context.
public void setParentPoolPromptLabel(String label, String tip)
public String getParentPoolPromptLabel()
setParentPoolPromptLabel(String, String)
public String getParentPoolPromptTip()
setParentPoolPromptLabel(String, String)
public void setNamePromptLabel(String label, String tip)
public String getNamePromptLabel()
setNamePromptLabel(String, String)
public String getNamePromptTip()
setNamePromptLabel(String, String)
public void setListLabel(String label, String tip)
public String getListLabel()
setListLabel(String, String)
public String getListTip()
setListLabel(String, String)
public void setNewListItemText(String label)
public String getNewListItemText()
setNewListItemText(String)
,
or the default if not set.
public void setFilterStringValidator(ISystemValidator v)
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.
public ISystemValidator getFilterStringValidator()
setFilterStringValidator(ISystemValidator)
.
public void setDuplicateFilterStringErrorMessage(SystemMessage msg)
public SystemMessage getDuplicateFilterStringErrorMessage()
setDuplicateFilterStringErrorMessage(SystemMessage)
public void setWantTestButton(boolean wantTestButton)
public boolean getWantTestButton()
setWantTestButton(boolean)
public void setEditable(boolean editable)
public boolean getEditable()
setEditable(boolean)
public void setSupportsMultipleStrings(boolean multi)
public boolean getSupportsMultipleStrings()
public void setInputObject(Object inputObject)
setInputObject
in class SystemBaseForm
public Control getInitialFocusControl()
public Control createContents(Composite parent)
createContents
in class SystemBaseForm
parent
- The parent compositeprotected SystemFilterStringEditPane getFilterStringEditPane(Shell shell)
public Button getApplyButton()
public Button getRevertButton()
public boolean processOK()
public boolean verify(boolean doSave)
doSave
- - true to actually save pending changes in filter string editor (eg, when called when actually processing OK).public boolean processCancel()
public void widgetSelected(SelectionEvent e)
widgetSelected
in interface SelectionListener
protected void applyPressed()
protected void revertPressed()
public void widgetDefaultSelected(SelectionEvent e)
widgetDefaultSelected
in interface SelectionListener
public void setPageComplete(boolean complete)
setPageComplete
in class SystemBaseForm
SystemBaseForm.addPageCompleteListener(ISystemPageCompleteListener)
protected boolean isNewSelected()
protected String getCurrentSelection()
protected String createFilterString()
protected void saveFilterString(String editedFilterString, int currSelectionIndex)
public void filterStringChanged(SystemMessage message)
filterStringChanged
in interface ISystemFilterStringEditPaneListener
public void backupChangedState()
backupChangedState
in interface ISystemFilterStringEditPaneListener
public void restoreChangedState()
restoreChangedState
in interface ISystemFilterStringEditPaneListener
public void menuAboutToShow(IMenuManager menu)
fillContextMenu(IMenuManager)
menuAboutToShow
in interface IMenuListener
public void fillContextMenu(IMenuManager menu)
public void createStandardGroups(IMenuManager menu)
public boolean canDelete()
public void doDelete()
protected void handleNewFilterStringItemSelection()
public boolean canMoveUp()
public void doMoveUp()
public boolean canMoveDown()
public void doMoveDown()
public boolean canCopy()
public void doCopy()
public boolean canPaste()
public void doPaste()
protected String checkForDuplicates()
public boolean compareFilterStrings(boolean caseSensitive, String filterString1, String filterString2)
|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |