Package org.eclipse.remote.ui.widgets
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
Modifier and TypeFieldDescriptionstatic final int
Browse for directories (files are not shown)static final int
Browse for filesstatic final int
Display widget to select a connectionstatic final int
Display checkbox to show/hide hidden filesstatic final int
Show local selection buttonstatic final int
Display button to create new foldersFields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
-
Constructor Summary
ConstructorDescriptionRemoteResourceBrowserWidget
(org.eclipse.swt.widgets.Composite parent, int style, int flags) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSelectionChangedListener
(org.eclipse.jface.viewers.ISelectionChangedListener listener) Add a listener that will be notified when the selection is changed.Get the connection that was selectedorg.eclipse.core.filesystem.IFileStore
Get a resource that corresponds to the text fieldList
<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 changedvoid
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
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, 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
-
Field Details
-
FILE_BROWSER
public static final int FILE_BROWSERBrowse for files- See Also:
-
DIRECTORY_BROWSER
public static final int DIRECTORY_BROWSERBrowse for directories (files are not shown)- See Also:
-
SHOW_LOCAL_SELECTION
public static final int SHOW_LOCAL_SELECTIONShow local selection button- See Also:
-
SHOW_HIDDEN_CHECKBOX
public static final int SHOW_HIDDEN_CHECKBOXDisplay checkbox to show/hide hidden files- See Also:
-
SHOW_NEW_FOLDER_BUTTON
public static final int SHOW_NEW_FOLDER_BUTTONDisplay button to create new folders- See Also:
-
SHOW_CONNECTIONS
public static final int SHOW_CONNECTIONSDisplay 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
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
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
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
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
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.
-