|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.rse.ui.dialogs.SystemPromptDialog
org.eclipse.rse.ui.dialogs.SystemRenameDialog
public class SystemRenameDialog
Dialog for renaming multiple resources.
This is a re-usable dialog that you can use directly, or via the SystemCommonRenameAction
action.
To use this dialog, you must call setInputObject with a StructuredSelection of the objects to be renamed.
If those objects adapt to ISystemRemoteElementAdapter or
ISystemRemoteElementAdapter, the dialog will offer built-in error checking.
If the input objects do not adapt to org.eclipse.rse.ui.view.ISystemRemoteElementAdapter or ISystemViewElementAdapter, then you
should call setNameValidator(org.eclipse.rse.ui.validators.ISystemValidator) to
specify a validator that is called to verify the typed new name is valid. Further, to show the type value
of the input objects, they should implement ISystemTypedObject.
This dialog does not do the actual renames. Rather, it will return an array of the user-typed new names. These
are queriable via getNewNames(), after testing that SystemPromptDialog.wasCancelled() is false. The array entries
will match the input order.
SystemCommonRenameAction| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
|---|
Window.IExceptionHandler |
| Field Summary |
|---|
| 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 |
| Fields inherited from interface org.eclipse.jface.dialogs.IDialogConstants |
|---|
ABORT_ID, ABORT_LABEL, BACK_ID, BACK_LABEL, BUTTON_BAR_HEIGHT, BUTTON_HEIGHT, BUTTON_MARGIN, BUTTON_WIDTH, CANCEL_ID, CANCEL_LABEL, CLIENT_ID, CLOSE_ID, CLOSE_LABEL, DESELECT_ALL_ID, ENTRY_FIELD_WIDTH, FINISH_ID, FINISH_LABEL, HELP_ID, HELP_LABEL, HIDE_DETAILS_LABEL, HORIZONTAL_MARGIN, HORIZONTAL_SPACING, IGNORE_ID, IGNORE_LABEL, INDENT, INTERNAL_ID, LEFT_MARGIN, MINIMUM_MESSAGE_AREA_WIDTH, NEXT_ID, NEXT_LABEL, NO_ID, NO_LABEL, NO_TO_ALL_ID, NO_TO_ALL_LABEL, OK_ID, OK_LABEL, OPEN_ID, OPEN_LABEL, PROCEED_ID, PROCEED_LABEL, RETRY_ID, RETRY_LABEL, SELECT_ALL_ID, SELECT_TYPES_ID, SHOW_DETAILS_LABEL, SKIP_ID, SKIP_LABEL, SMALL_INDENT, STOP_ID, STOP_LABEL, VERTICAL_MARGIN, VERTICAL_SPACING, YES_ID, YES_LABEL, YES_TO_ALL_ID, YES_TO_ALL_LABEL |
| Constructor Summary | |
|---|---|
SystemRenameDialog(Shell shell)
Constructor for SystemRenameDialog |
|
SystemRenameDialog(Shell shell,
String title)
Constructor when you have your own title |
|
| Method Summary | |
|---|---|
void |
applyEditorValue()
|
void |
cancelEditor()
|
protected Control |
createInner(Composite parent)
Called by createContents method. |
protected ISystemMessageLine |
createMessageLine(Composite c)
Create message line. |
void |
editorValueChanged(boolean oldValidState,
boolean newValidState)
|
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
|
protected Control |
getInitialFocusControl()
Return the Control to be given initial focus. |
String[] |
getNewNames()
Returns an array of the new names. |
protected ISystemRemoteElementAdapter |
getRemoteAdapter(Object o)
Returns the implementation of ISystemRemoteElement for the given object. |
SystemRenameTableRow[] |
getRows()
Returns the rows of rename items. |
boolean |
isPageComplete()
This method can be called by the dialog or wizard page host, to decide whether to enable or disable the next, final or ok buttons. |
void |
keyTraversed(TraverseEvent e)
Required by TraverseListener. |
protected boolean |
processOK()
Called when user presses OK button. |
void |
run()
Runnable method |
void |
selectionChanged(SelectionChangedEvent event)
|
void |
setInputObject(Object inputObject)
Override of parent. |
void |
setNameValidator(ISystemValidator nameValidator)
Set the validator for the new name,as supplied by the adaptor for name checking. |
void |
setPageComplete()
Inform caller of page-complete status of this form |
protected ValidatorUniqueString |
setUniqueNameValidator(Object inputElement,
ISystemValidator nameValidator)
Given an input element and externally-suppplied name validator for it, determine if we need to augment that validator with one that will check for uniqueness, and if so create and register that uniqueness validator |
void |
setVerbiage(String verbiage)
Set the verbiage to show above the table. |
protected SystemMessage |
validateNameInput()
This hook method is called whenever the text changes in the input field. |
boolean |
verify()
Verifies all input. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SystemRenameDialog(Shell shell)
public SystemRenameDialog(Shell shell,
String title)
| Method Detail |
|---|
public void setVerbiage(String verbiage)
public void setNameValidator(ISystemValidator nameValidator)
protected ISystemMessageLine createMessageLine(Composite c)
createMessageLine in class SystemPromptDialogprotected Control getInitialFocusControl()
SystemPromptDialog
getInitialFocusControl in class SystemPromptDialogSystemPromptDialog.getInitialFocusControl()protected Control createInner(Composite parent)
SystemPromptDialog
createInner in class SystemPromptDialogSystemPromptDialog.createInner(Composite)public void selectionChanged(SelectionChangedEvent event)
selectionChanged in interface ISelectionChangedListenerpublic void setInputObject(Object inputObject)
setInputObject in interface ISystemPromptDialogsetInputObject in class SystemPromptDialogprotected boolean processOK()
getNewNames(), after ensuring the dialog was not
cancelled by calling SystemPromptDialog.wasCancelled().
processOK in class SystemPromptDialogpublic boolean verify()
protected SystemMessage validateNameInput()
ISystemValidator object.
If the ISystemValidator reports an error the error message is displayed
in the Dialog's message line.
setNameValidator(ISystemValidator)public boolean isPageComplete()
public void setPageComplete()
public void keyTraversed(TraverseEvent e)
keyTraversed in interface TraverseListenerpublic SystemRenameTableRow[] getRows()
public String[] getNewNames()
public void applyEditorValue()
applyEditorValue in interface ICellEditorListenerpublic void cancelEditor()
cancelEditor in interface ICellEditorListener
public void editorValueChanged(boolean oldValidState,
boolean newValidState)
editorValueChanged in interface ICellEditorListenerpublic void run()
run in interface Runnablerun in class SystemPromptDialog
protected ValidatorUniqueString setUniqueNameValidator(Object inputElement,
ISystemValidator nameValidator)
protected ISystemRemoteElementAdapter getRemoteAdapter(Object o)
public void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListener
|
RSE Release 2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||