PTP
Release 7.0

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

java.lang.Object
  extended by Dialog
      extended by org.eclipse.ptp.remote.ui.dialogs.RemoteResourceBrowser

public class RemoteResourceBrowser
extends Dialog

Generic file/directory browser for remote resources.


Field Summary
static int DIRECTORY_BROWSER
           
static java.lang.String EMPTY_STRING
           
static int FILE_BROWSER
           
static int MULTI
           
static int SINGLE
           
 
Constructor Summary
RemoteResourceBrowser(IRemoteServices services, IRemoteConnection conn, Shell parent, int flags)
           
 
Method Summary
protected  Button createButton(Composite parent, int id, java.lang.String label, boolean defaultButton)
           
protected  Control createContents(Composite parent)
           
protected  Control createDialogArea(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 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,
                             Shell parent,
                             int flags)
Method Detail

createButton

protected Button createButton(Composite parent,
                              int id,
                              java.lang.String label,
                              boolean defaultButton)

createContents

protected Control createContents(Composite parent)

createDialogArea

protected Control createDialogArea(Composite parent)

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.