Synergy Home Page

au.edu.swin.synergy.plugin.mod13.event
Class BGetFilesCE

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--au.edu.swin.synergy.kernel.BCommandEvent
              |
              +--au.edu.swin.synergy.plugin.mod13.event.BWindowCE
                    |
                    +--au.edu.swin.synergy.plugin.mod13.event.BGetFilesCE

public class BGetFilesCE
extends BWindowCE

See Also:
Serialized Form

Fields inherited from class au.edu.swin.synergy.kernel.BCommandEvent
connectionID, index, kBroadcast, kClient, kClientDone, kLocal, kServer, kServerDone, networkStatus, serialVersionUID
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
BGetFilesCE(Object source)
          The default constructor
BGetFilesCE(Object source, String startingDir)
          Creates the event with the given starting directory.
BGetFilesCE(Object source, String startingDir, boolean mustExist)
          Creates the event with the given starting directory.
 
Method Summary
 FileFilter getFileFilter()
          Gets the file filter to use in the browser
 boolean getFileMustExist()
          Indicates whether the file must exist and if so it will prompt the user until they select a real file.
 File getSelectedFile()
          Will return the selected file.
 String getStartingDir()
          Gets the starting directory for the browser.
 String getTitle()
          This will get the title of the window
 boolean isLoading()
          Indicates whether the user is wants to load a file or save one.
 void setFileFilter(FileFilter fileFilter)
          Sets the file filter to use in the browser
 void setLoad(boolean load)
          Indicates whether the user is going to be loading or saving a file.
 void setSelectedFile(File selectedFile)
          Sets the selected file for the source to retrieve
 void setStartingDir(String startingDir)
          Sets the starting directory to the given value.
 void setTitle(String windowTitle)
          Sets the title of the browsing window to the value given
 
Methods inherited from class au.edu.swin.synergy.kernel.BCommandEvent
decrementThreadCount, doComplete, doInit, getAutoComplete, getCompletionObject, getCompletionStatus, getConnectionID, getIndex, getNetworkStatus, getPipe, getUndoable, setAutoComplete, setCompletionObject, setCompletionStatus, setConnectionID, setIndex, setNetworkStatus, setPipe, setThreadCount, setUndoable
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BGetFilesCE

public BGetFilesCE(Object source)
The default constructor

BGetFilesCE

public BGetFilesCE(Object source,
                   String startingDir)
Creates the event with the given starting directory. The browser will default to loading and the title to "Browse"
Parameters:
startingDir - The directory to start browsing in.

BGetFilesCE

public BGetFilesCE(Object source,
                   String startingDir,
                   boolean mustExist)
Creates the event with the given starting directory. The browser will default to loading and the title to "Browse"
Parameters:
startingDir - The directory to start browsing in.
Method Detail

setTitle

public void setTitle(String windowTitle)
Sets the title of the browsing window to the value given
Parameters:
windowTitle - The title of the window

getTitle

public String getTitle()
This will get the title of the window
Returns:
The title as a String

setFileFilter

public void setFileFilter(FileFilter fileFilter)
Sets the file filter to use in the browser
Parameters:
fileFilter - The file filter

getFileFilter

public FileFilter getFileFilter()
Gets the file filter to use in the browser
Returns:
The file filter

setStartingDir

public void setStartingDir(String startingDir)
Sets the starting directory to the given value. The browser will begin looking in this directory.
Parameters:
startingDir - The directory to start in ("." by default)

getStartingDir

public String getStartingDir()
Gets the starting directory for the browser.
Returns:
Gets the directory to start browsing in.

setLoad

public void setLoad(boolean load)
Indicates whether the user is going to be loading or saving a file.
Parameters:
load - True to load a file, false to save

isLoading

public boolean isLoading()
Indicates whether the user is wants to load a file or save one.
Returns:
True to load, false to save

setSelectedFile

public void setSelectedFile(File selectedFile)
Sets the selected file for the source to retrieve
Parameters:
selectedFile - The selected file

getSelectedFile

public File getSelectedFile()
Will return the selected file. If no file was selected, this will return null. This will be the case if the user selects cancel or closes the dialog using something other than the buttons.
Returns:
The selected file or null if nothing selected

getFileMustExist

public boolean getFileMustExist()
Indicates whether the file must exist and if so it will prompt the user until they select a real file.
Returns:
True if it does, false otherwise

Synergy Home Page