Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.files.ui.widgets
Class SystemSelectRemoteFilesForm


java.lang.Object
  extended by 

org.eclipse.swt.widgets.Widget
      extended by 

org.eclipse.swt.widgets.Control
          extended by 

org.eclipse.swt.widgets.Scrollable
              extended by 

org.eclipse.swt.widgets.Composite
                  extended by 
org.eclipse.rse.files.ui.widgets.SystemSelectRemoteFilesForm
All Implemented Interfaces:
Drawable

public class SystemSelectRemoteFilesForm
extends Composite

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. Control
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getData, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets. Widget
addDisposeListener, addListener, checkWidget, dispose, 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

SystemSelectRemoteFilesForm

public 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.

Parameters:
parent - The owning composite
style - The swt style to apply to the overall composite. Typically it is just SWT.NULL
showSelectTypesButton - Specify if you want to have Select Types button
showSelectAllButtons - Specify if you want to have Select All and Deselect All buttons
key - The unique string used as a preferences key to persist the qualified-folder history

SystemSelectRemoteFilesForm

public 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.

Parameters:
parent - The owning composite
style - The swt style to apply to the overall composite. Typically it is just SWT.NULL
showSelectTypesButton - Specify if you want to have Select Types button
showSelectAllButtons - Specify if you want to have Select All and Deselect All buttons

SystemSelectRemoteFilesForm

public SystemSelectRemoteFilesForm(
Composite parent,
                                   int style)
Constructor when you want to use the default history key and want to show the standard buttons.

Parameters:
parent - The owning composite
style - The swt style to apply to the overall composite. Typically it is just SWT.NULL
Method Detail

setMessageLine

public void setMessageLine(
ISystemMessageLine msgLine)
Specify a message line so error messages are written to it versus in message dialogs.

Parameters:
msgLine - An object implementing ISystemMessageLine. Typically pass "this" for your dialog or wizard page, and implement the interface there.

getMessageLine

public 
ISystemMessageLine getMessageLine()
Get the message line specified in setMessageLine.


setSystemTypes

public void setSystemTypes(
IRSESystemType[] systemTypes)
Set the system types to restrict what connections the user sees, and what types of connections they can create.

Parameters:
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.

setSystemType

public void setSystemType(
IRSESystemType systemType)
Convenience method to restrict to a single system type. Same as setSystemTypes(new IRSESystemType[] {systemType})

Parameters:
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.

setFilterString

public void setFilterString(
String filterString)
Set a filter string to subset the list by. For example, "A*.java" or "java,class,"


getFilterString

public 
String getFilterString()
Get the current filter string being used to subset the list by. Will be null unless setFilterString has previously been called.


getFolderCombo

public 
SystemQualifiedRemoteFolderCombo getFolderCombo()
Return the nested qualified-folder combo widget


setEnabled

public void setEnabled(boolean enabled)
Disable/Enable all the child controls.

Overrides:
setEnabled in class Control

setFocus

public boolean setFocus()
Set the focus to the combo field

Overrides:
setFocus in class Composite

clearAll

public void clearAll()
Clear the contents of the file selector widgets


setRootFolder

public void setRootFolder(
IRemoteFile rootFolder)
Set the root folder from which to populate the widgets

Parameters:
rootFolder - The root folder from which to start the tree

refresh

public void refresh()
Refesh the contents of the folder and file-selection checkbox viewers


addCheckStateListener

public void addCheckStateListener(
ICheckStateListener l)
Add a checkstate listener to be called whenever the checked state of a remote file is changed.


removeCheckStateListener

public void removeCheckStateListener(
ICheckStateListener l)
Remove a checkstate listener


getSelectedFiles

public 
IRemoteFile[] getSelectedFiles()
Get the list of selected IRemoteFile objects. Will be length 0 if nothing selected


prepareComposite

protected 
Composite prepareComposite(int numColumns)
Prepares this composite control and sets the default layout data.

Parameters:
numColumns - Number of columns the new group will contain.

createFolderPrompt

protected void createFolderPrompt(
Composite parent)
Create qualified-folder prompt


createFilesSelectorGroup

protected void createFilesSelectorGroup(
Composite parent)
Create folder and files selection checkbox viewers


createButtons

protected void createButtons(
Composite parent,
                             boolean showSelectTypes,
                             boolean showSelectAll)
Create three buttons under checkbox viewers


createPushButton

protected static 
Button createPushButton(
Composite group,
                                         
String label,
                                         
String tooltip)

createPushButton

public static 
Button createPushButton(
Composite group,
                                      
String label)

addOurQualifiedFolderSelectionListener

protected void addOurQualifiedFolderSelectionListener()

addSelectTypesButtonSelectionListener

protected void addSelectTypesButtonSelectionListener()

addSelectAllButtonSelectionListener

protected void addSelectAllButtonSelectionListener()

addDeselectAllButtonSelectionListener

protected void addDeselectAllButtonSelectionListener()

handleTypesEditButtonPressed

protected void handleTypesEditButtonPressed()
Open a registered type selection dialog and note the selections in the receivers types-to-export field


setupSelectionsBasedOnSelectedTypes

protected void setupSelectionsBasedOnSelectedTypes()
Update the tree to only select those elements that match the selected types


isExportableExtension

protected boolean isExportableExtension(
String extension)
Returns whether the extension provided is an extension that has been specified for export by the user.

Parameters:
extension - the resource name
Returns:
true if the resource name is suitable for export based upon its extension

enableButtonGroup

protected void enableButtonGroup(boolean enable)
Enable or disable the button group.


clearErrorMessage

protected void clearErrorMessage()

displayErrorMessage

protected void displayErrorMessage(
String msgText)

displayErrorMessage

protected void displayErrorMessage(
SystemMessage msg)

displayExceptionMessage

protected void displayExceptionMessage(
Exception exc)

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire