|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFilesForm
public class SystemSelectRemoteFilesForm
This re-usable composite widget is for prompting the user to select multiple files from a remote system.
The composite is layed as follows:
Folder: ______________V Browse...
.________________. ____________.
| + folder | | file1 |
| + subfolder | | file2 |
| + subfolder | | file3 |
.---------------. .-----------.
The tree and list boxes are checkbox widgets, standard in Eclipse.
You can also optionally decide to show the standard buttons at the
button of the checkbox boxes:
.-----------------. .------------. .--------------.
| Select Types... | | Select All | | Deselect All |
.-----------------. .------------. .--------------.
To allow error messages to be issued on a message line versus in message dialogs,
pass in an ISystemMessageLine reference. This usually represents the message line
of a dialog or wizard. If supplied, messages are written to it.
To specify it, call setMessageLine(ISystemMessageLine)
.
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Composite |
---|
embeddedHandle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
---|
handle |
Constructor Summary | |
---|---|
SystemSelectRemoteFilesForm(Composite parent,
int style)
Constructor when you want to use the default history key and want to show the standard buttons. |
|
SystemSelectRemoteFilesForm(Composite parent,
int style,
boolean showSelectTypesButton,
boolean showSelectAllButtons)
Constructor when you want to use the default history key, meaning you share the qualified-folder history with other dialogs/wizards that use the same widget. |
|
SystemSelectRemoteFilesForm(Composite parent,
int style,
boolean showSelectTypesButton,
boolean showSelectAllButtons,
String key)
Constructor when you want to specify your own history key for the qualified folder nested widget. |
Method Summary | |
---|---|
void |
addCheckStateListener(ICheckStateListener l)
Add a checkstate listener to be called whenever the checked state of a remote file is changed. |
protected void |
addDeselectAllButtonSelectionListener()
|
protected void |
addOurQualifiedFolderSelectionListener()
|
protected void |
addSelectAllButtonSelectionListener()
|
protected void |
addSelectTypesButtonSelectionListener()
|
void |
clearAll()
Clear the contents of the file selector widgets |
protected void |
clearErrorMessage()
|
protected void |
createButtons(Composite parent,
boolean showSelectTypes,
boolean showSelectAll)
Create three buttons under checkbox viewers |
protected void |
createFilesSelectorGroup(Composite parent)
Create folder and files selection checkbox viewers |
protected void |
createFolderPrompt(Composite parent)
Create qualified-folder prompt |
static Button |
createPushButton(Composite group,
String label)
|
protected static Button |
createPushButton(Composite group,
String label,
String tooltip)
|
protected void |
displayErrorMessage(String msgText)
|
protected void |
displayErrorMessage(SystemMessage msg)
|
protected void |
displayExceptionMessage(Exception exc)
|
protected void |
enableButtonGroup(boolean enable)
Enable or disable the button group. |
String |
getFilterString()
Get the current filter string being used to subset the list by. |
SystemQualifiedRemoteFolderCombo |
getFolderCombo()
Return the nested qualified-folder combo widget |
ISystemMessageLine |
getMessageLine()
Get the message line specified in setMessageLine. |
IRemoteFile[] |
getSelectedFiles()
Get the list of selected IRemoteFile objects. |
protected void |
handleTypesEditButtonPressed()
Open a registered type selection dialog and note the selections in the receivers types-to-export field |
protected boolean |
isExportableExtension(String extension)
Returns whether the extension provided is an extension that has been specified for export by the user. |
protected Composite |
prepareComposite(int numColumns)
Prepares this composite control and sets the default layout data. |
void |
refresh()
Refesh the contents of the folder and file-selection checkbox viewers |
void |
removeCheckStateListener(ICheckStateListener l)
Remove a checkstate listener |
void |
setEnabled(boolean enabled)
Disable/Enable all the child controls. |
void |
setFilterString(String filterString)
Set a filter string to subset the list by. |
boolean |
setFocus()
Set the focus to the combo field |
void |
setMessageLine(ISystemMessageLine msgLine)
Specify a message line so error messages are written to it versus in message dialogs. |
void |
setRootFolder(IRemoteFile rootFolder)
Set the root folder from which to populate the widgets |
void |
setSystemType(IRSESystemType systemType)
Convenience method to restrict to a single system type. |
void |
setSystemTypes(IRSESystemType[] systemTypes)
Set the system types to restrict what connections the user sees, and what types of connections they can create. |
protected void |
setupSelectionsBasedOnSelectedTypes()
Update the tree to only select those elements that match the selected types |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SystemSelectRemoteFilesForm(Composite parent, int style, boolean showSelectTypesButton, boolean showSelectAllButtons, String key)
parent
- The owning compositestyle
- The swt style to apply to the overall composite. Typically it is just SWT.NULLshowSelectTypesButton
- Specify if you want to have Select Types buttonshowSelectAllButtons
- Specify if you want to have Select All and Deselect All buttonskey
- The unique string used as a preferences key to persist the qualified-folder historypublic SystemSelectRemoteFilesForm(Composite parent, int style, boolean showSelectTypesButton, boolean showSelectAllButtons)
parent
- The owning compositestyle
- The swt style to apply to the overall composite. Typically it is just SWT.NULLshowSelectTypesButton
- Specify if you want to have Select Types buttonshowSelectAllButtons
- Specify if you want to have Select All and Deselect All buttonspublic SystemSelectRemoteFilesForm(Composite parent, int style)
parent
- The owning compositestyle
- The swt style to apply to the overall composite. Typically it is just SWT.NULLMethod Detail |
---|
public void setMessageLine(ISystemMessageLine msgLine)
msgLine
- An object implementing ISystemMessageLine. Typically pass "this" for
your dialog or wizard page, and implement the interface there.public ISystemMessageLine getMessageLine()
public void setSystemTypes(IRSESystemType[] systemTypes)
systemTypes
- An array of system types, or
null
to allow all registered valid system types.
A system type is valid if at least one subsystem configuration
is registered against it.public void setSystemType(IRSESystemType systemType)
systemType
- The system type to restrict to, or
null
to allow all registered valid system types.
A system type is valid if at least one subsystem configuration
is registered against it.public void setFilterString(String filterString)
public String getFilterString()
public SystemQualifiedRemoteFolderCombo getFolderCombo()
public void setEnabled(boolean enabled)
setEnabled
in class Control
public boolean setFocus()
setFocus
in class Composite
public void clearAll()
public void setRootFolder(IRemoteFile rootFolder)
rootFolder
- The root folder from which to start the treepublic void refresh()
public void addCheckStateListener(ICheckStateListener l)
public void removeCheckStateListener(ICheckStateListener l)
public IRemoteFile[] getSelectedFiles()
protected Composite prepareComposite(int numColumns)
numColumns
- Number of columns the new group will contain.protected void createFolderPrompt(Composite parent)
protected void createFilesSelectorGroup(Composite parent)
protected void createButtons(Composite parent, boolean showSelectTypes, boolean showSelectAll)
protected static Button createPushButton(Composite group, String label, String tooltip)
public static Button createPushButton(Composite group, String label)
protected void addOurQualifiedFolderSelectionListener()
protected void addSelectTypesButtonSelectionListener()
protected void addSelectAllButtonSelectionListener()
protected void addDeselectAllButtonSelectionListener()
protected void handleTypesEditButtonPressed()
protected void setupSelectionsBasedOnSelectedTypes()
protected boolean isExportableExtension(String extension)
extension
- the resource name
true
if the resource name is suitable for export based
upon its extensionprotected void enableButtonGroup(boolean enable)
protected void clearErrorMessage()
protected void displayErrorMessage(String msgText)
protected void displayErrorMessage(SystemMessage msg)
protected void displayExceptionMessage(Exception exc)
|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |