Class RemoteResourceBrowserWidget

  • All Implemented Interfaces:
    org.eclipse.swt.graphics.Drawable

    public class RemoteResourceBrowserWidget
    extends org.eclipse.swt.widgets.Composite
    Generic file/directory browser for remote resources.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DIRECTORY_BROWSER
      Browse for directories (files are not shown)
      static int FILE_BROWSER
      Browse for files
      static int SHOW_CONNECTIONS
      Display widget to select a connection
      static int SHOW_HIDDEN_CHECKBOX
      Display checkbox to show/hide hidden files
      static int SHOW_LOCAL_SELECTION
      Show local selection button
      static int SHOW_NEW_FOLDER_BUTTON
      Display button to create new folders
      • Fields inherited from class org.eclipse.swt.widgets.Composite

        embeddedHandle
      • Fields inherited from class org.eclipse.swt.widgets.Widget

        handle
    • Constructor Summary

      Constructors 
      Constructor Description
      RemoteResourceBrowserWidget​(org.eclipse.swt.widgets.Composite parent, int style, int flags)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSelectionChangedListener​(org.eclipse.jface.viewers.ISelectionChangedListener listener)
      Add a listener that will be notified when the selection is changed.
      IRemoteConnection getConnection()
      Get the connection that was selected
      org.eclipse.core.filesystem.IFileStore getResource()
      Get a resource that corresponds to the text field
      List<org.eclipse.core.filesystem.IFileStore> getResources()
      Get the resources that were selected.
      org.eclipse.jface.operation.IRunnableContext getRunnableContext()  
      void removeSelectionChangedListener​(org.eclipse.jface.viewers.ISelectionChangedListener listener)
      Remove a listener that will be notified when the selection is changed
      void setConnection​(IRemoteConnection connection)
      Set the connection for the browser.
      void setInitialPath​(String path)
      Set the initial path to start browsing.
      void setRunnableContext​(org.eclipse.jface.operation.IRunnableContext context)  
      void setTitle​(String title)
      Set the fDialogTitle of the dialog.
      void setType()
      Set the type of browser.
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString
      • Methods inherited from class org.eclipse.swt.widgets.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
    • Field Detail

      • DIRECTORY_BROWSER

        public static final int DIRECTORY_BROWSER
        Browse for directories (files are not shown)
        See Also:
        Constant Field Values
      • SHOW_LOCAL_SELECTION

        public static final int SHOW_LOCAL_SELECTION
        Show local selection button
        See Also:
        Constant Field Values
      • SHOW_HIDDEN_CHECKBOX

        public static final int SHOW_HIDDEN_CHECKBOX
        Display checkbox to show/hide hidden files
        See Also:
        Constant Field Values
      • SHOW_NEW_FOLDER_BUTTON

        public static final int SHOW_NEW_FOLDER_BUTTON
        Display button to create new folders
        See Also:
        Constant Field Values
      • SHOW_CONNECTIONS

        public static final int SHOW_CONNECTIONS
        Display widget to select a connection
        See Also:
        Constant Field Values
    • Constructor Detail

      • RemoteResourceBrowserWidget

        public RemoteResourceBrowserWidget​(org.eclipse.swt.widgets.Composite parent,
                                           int style,
                                           int flags)
    • Method Detail

      • addSelectionChangedListener

        public void addSelectionChangedListener​(org.eclipse.jface.viewers.ISelectionChangedListener listener)
        Add a listener that will be notified when the selection is changed.
        Parameters:
        listener - listener to add
      • getConnection

        public IRemoteConnection getConnection()
        Get the connection that was selected
        Returns:
        selected connection
      • getResource

        public org.eclipse.core.filesystem.IFileStore getResource()
        Get a resource that corresponds to the text field
        Returns:
        resource corresponding to the text field
        Since:
        1.1
      • getResources

        public List<org.eclipse.core.filesystem.IFileStore> getResources()
        Get the resources that were selected.
        Returns:
        selected resources
      • getRunnableContext

        public org.eclipse.jface.operation.IRunnableContext getRunnableContext()
      • removeSelectionChangedListener

        public void removeSelectionChangedListener​(org.eclipse.jface.viewers.ISelectionChangedListener listener)
        Remove a listener that will be notified when the selection is changed
        Parameters:
        listener - listener to remove
      • setConnection

        public void setConnection​(IRemoteConnection connection)
        Set the connection for the browser. The connection must support the IRemoteFileService service or this method will have no effect.
        Parameters:
        connection - connection that supports the IRemoteFileService service
      • setInitialPath

        public void setInitialPath​(String path)
        Set the initial path to start browsing. This will be set in the browser text field, and in a future version should expand the browser to this location if it exists. NOTE: This must be called *before* setConnection(IRemoteConnection) to have any effect.
        Parameters:
        path -
      • setRunnableContext

        public void setRunnableContext​(org.eclipse.jface.operation.IRunnableContext context)
      • setTitle

        public void setTitle​(String title)
        Set the fDialogTitle of the dialog.
        Parameters:
        title -
      • setType

        public void setType()
        Set the type of browser. Can be either a file browser (allows selection of files only) or a directory browser (allows selection of directories only), or both files and directories.