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.CompositeGeneric file/directory browser for remote resources.
-
-
Field Summary
Fields Modifier and Type Field Description static intDIRECTORY_BROWSERBrowse for directories (files are not shown)static intFILE_BROWSERBrowse for filesstatic intSHOW_CONNECTIONSDisplay widget to select a connectionstatic intSHOW_HIDDEN_CHECKBOXDisplay checkbox to show/hide hidden filesstatic intSHOW_LOCAL_SELECTIONShow local selection buttonstatic intSHOW_NEW_FOLDER_BUTTONDisplay button to create new folders
-
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 voidaddSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)Add a listener that will be notified when the selection is changed.IRemoteConnectiongetConnection()Get the connection that was selectedorg.eclipse.core.filesystem.IFileStoregetResource()Get a resource that corresponds to the text fieldList<org.eclipse.core.filesystem.IFileStore>getResources()Get the resources that were selected.org.eclipse.jface.operation.IRunnableContextgetRunnableContext()voidremoveSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener listener)Remove a listener that will be notified when the selection is changedvoidsetConnection(IRemoteConnection connection)Set the connection for the browser.voidsetInitialPath(String path)Set the initial path to start browsing.voidsetRunnableContext(org.eclipse.jface.operation.IRunnableContext context)voidsetTitle(String title)Set the fDialogTitle of the dialog.voidsetType()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
-
FILE_BROWSER
public static final int FILE_BROWSER
Browse for files- See Also:
- Constant Field Values
-
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
-
-
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.
-
-