Class RemoteFileWidget

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

    public class RemoteFileWidget
    extends org.eclipse.swt.widgets.Composite
    Widget to allow the user to select a remote file. Provides a "Browse" button that uses the currently specified connection and a "Restore Default" button to revert to the initial setting. If GROUP_FLAG is set, then the widget will be placed in a group. If RESTORE_BUTTON_FLAG is set, then a "Restore Default" button will be added If defaultPath is not null, then the initial path will be set to its value. The browse message can be modified using setBrowseMessage(String)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int GROUP_FLAG  
      static int RESTORE_BUTTON_FLAG  
      • 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
      RemoteFileWidget​(org.eclipse.swt.widgets.Composite parent, int style, int flags, String title, String defaultPath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addModifyListener​(org.eclipse.swt.events.ModifyListener listener)
      Add a listener that will be notified when the file path is modified.
      String getLocationPath()
      Get the file location path.
      void removeModifyListener​(org.eclipse.swt.events.ModifyListener listener)
      Remove a listener that will be notified when the file path is modified.
      void setBrowseMessage​(String message)
      Set the message that will be displayed in the remote file browser dialog.
      void setConnection​(IRemoteConnection conn)
      Set the remote connection to use for browsing for the remote file.
      void setEnabled​(boolean enabled)  
      void setLabel​(String label)
      Set the label to be displayed
      void setLocationPath​(String path)
      Set the initial remote location that will be displayed in the widget.
      • 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, 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

      • GROUP_FLAG

        public static int GROUP_FLAG
      • RESTORE_BUTTON_FLAG

        public static int RESTORE_BUTTON_FLAG
    • Constructor Detail

      • RemoteFileWidget

        public RemoteFileWidget​(org.eclipse.swt.widgets.Composite parent,
                                int style,
                                int flags,
                                String title,
                                String defaultPath)
    • Method Detail

      • addModifyListener

        public void addModifyListener​(org.eclipse.swt.events.ModifyListener listener)
        Add a listener that will be notified when the file path is modified.
        Parameters:
        listener - listener to add
      • getLocationPath

        public String getLocationPath()
        Get the file location path. This path will be relative to the remote machine.
        Returns:
        file location path
      • removeModifyListener

        public void removeModifyListener​(org.eclipse.swt.events.ModifyListener listener)
        Remove a listener that will be notified when the file path is modified.
        Parameters:
        listener - listener to remove
      • setBrowseMessage

        public void setBrowseMessage​(String message)
        Set the message that will be displayed in the remote file browser dialog.
        Parameters:
        message - message to be displayed
      • setConnection

        public void setConnection​(IRemoteConnection conn)
        Set the remote connection to use for browsing for the remote file. The connection type must provide the IRemoteUIConnectionService and IRemoteUIFileService services and the connection must support the IRemoteFileService service. If any of these conditions are not met, this method will do nothing.
        Parameters:
        conn - remote connection
        Since:
        4.0
      • setEnabled

        public void setEnabled​(boolean enabled)
        Overrides:
        setEnabled in class org.eclipse.swt.widgets.Control
      • setLabel

        public void setLabel​(String label)
        Set the label to be displayed
        Parameters:
        label -
      • setLocationPath

        public void setLocationPath​(String path)
        Set the initial remote location that will be displayed in the widget.
        Parameters:
        path -