PTP
Release 7.0

org.eclipse.ptp.remote.ui.dialogs
Class RemoteResourceBrowser

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.ptp.remote.ui.dialogs.RemoteResourceBrowser
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class RemoteResourceBrowser
extends org.eclipse.jface.dialogs.Dialog

Generic file/directory browser for remote resources.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
static int DIRECTORY_BROWSER
           
static java.lang.String EMPTY_STRING
           
static int FILE_BROWSER
           
static int MULTI
           
static int SINGLE
           
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK, resizeHasOccurred
 
Constructor Summary
RemoteResourceBrowser(IRemoteServices services, IRemoteConnection conn, org.eclipse.swt.widgets.Shell parent, int flags)
           
 
Method Summary
protected  org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent, int id, java.lang.String label, boolean defaultButton)
           
protected  org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
           
 IRemoteConnection getConnection()
          Get the connection that was selected
 java.lang.String getPath()
          Get the path that was selected.
 java.lang.String[] getPaths()
          Get the paths that were selected.
 void setInitialPath(java.lang.String path)
          Set the initial path to start browsing.
 void setTitle(java.lang.String title)
          Set the dialogTitle of the dialog.
 void setType(int type)
          Set the type of browser.
 void showConnections(boolean enable)
          Show available connections on browser if possible.
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButtonBar, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

FILE_BROWSER

public static final int FILE_BROWSER
See Also:
Constant Field Values

DIRECTORY_BROWSER

public static final int DIRECTORY_BROWSER
See Also:
Constant Field Values

SINGLE

public static final int SINGLE
See Also:
Constant Field Values

MULTI

public static final int MULTI
See Also:
Constant Field Values
Constructor Detail

RemoteResourceBrowser

public RemoteResourceBrowser(IRemoteServices services,
                             IRemoteConnection conn,
                             org.eclipse.swt.widgets.Shell parent,
                             int flags)
Method Detail

createButton

protected org.eclipse.swt.widgets.Button createButton(org.eclipse.swt.widgets.Composite parent,
                                                      int id,
                                                      java.lang.String label,
                                                      boolean defaultButton)
Overrides:
createButton in class org.eclipse.jface.dialogs.Dialog

createContents

protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
Overrides:
createContents in class org.eclipse.jface.dialogs.Dialog

createDialogArea

protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
Overrides:
createDialogArea in class org.eclipse.jface.dialogs.Dialog

getConnection

public IRemoteConnection getConnection()
Get the connection that was selected

Returns:
selected connection

getPath

public java.lang.String getPath()
Get the path that was selected.

Returns:
selected path

getPaths

public java.lang.String[] getPaths()
Get the paths that were selected.

Returns:
selected paths

setInitialPath

public void setInitialPath(java.lang.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.

Parameters:
path -

setTitle

public void setTitle(java.lang.String title)
Set the dialogTitle of the dialog.

Parameters:
title -

setType

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


showConnections

public void showConnections(boolean enable)
Show available connections on browser if possible.

Parameters:
enable -

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.