Class RemoteResourceBrowserWidget

java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.remote.ui.widgets.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 final int
    Browse for directories (files are not shown)
    static final int
    Browse for files
    static final int
    Display widget to select a connection
    static final int
    Display checkbox to show/hide hidden files
    static final int
    Show local selection button
    static final int
    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

    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.
    Get the connection that was selected
    org.eclipse.core.filesystem.IFileStore
    Get a resource that corresponds to the text field
    List<org.eclipse.core.filesystem.IFileStore>
    Get the resources that were selected.
    org.eclipse.jface.operation.IRunnableContext
     
    void
    removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)
    Remove a listener that will be notified when the selection is changed
    void
    Set the connection for the browser.
    void
    Set the initial path to start browsing.
    void
    setRunnableContext(org.eclipse.jface.operation.IRunnableContext context)
     
    void
    Set the fDialogTitle of the dialog.
    void
    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, setScrollbarsMode

    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, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • FILE_BROWSER

      public static final int FILE_BROWSER
      Browse for files
      See Also:
    • DIRECTORY_BROWSER

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

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

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

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

      public static final int SHOW_CONNECTIONS
      Display widget to select a connection
      See Also:
  • Constructor Details

    • RemoteResourceBrowserWidget

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

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