Class ncsa.horizon.modules.DatasetChooserPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.modules.DatasetChooserPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----ncsa.horizon.modules.DatasetChooserPanel

public class DatasetChooserPanel
extends Panel

Variable Index

 o browse
 o browserFrame
 o current
 o currentName
 o defChoice
 o dsurls
 o editChoice
the string that tells user to edit the test in the URL TextField
 o fileBrowser
 o getIt
 o loadAlerter
the delegate Observerable
 o reset
 o store
 o urlField
 o wdir

Constructor Index

 o DatasetChooserPanel()
Create a blank DatasetChooserPanel
 o DatasetChooserPanel(int)
Create a blank DatasetChooserPanel
 o DatasetChooserPanel(String)
Create a DatasetChooserPanel with default string in URL TextField
 o DatasetChooserPanel(String, Frame)
Create a DatasetChooserPanel with default string in URL TextField
 o DatasetChooserPanel(String, int)
Create a DatasetChooserPanel with default string in URL TextField
 o DatasetChooserPanel(String, int, Frame)
Create a DatasetChooserPanel with default string in URL TextField

Method Index

 o action(Event, Object)
 o addDatasetURL(String, String)
add predefined dataset URL to the choice menu
 o addObserver(Observer)
add an Observer that wants to be alerted when there has been a request to load a dataset.
 o canBrowse()
return whether a FileDialog window can be opened.
 o doSelectDataset(String)
respond to a change in the dataset Choice menu
 o getBrowseButton()
return a reference to the "Browse..." Button
 o getDataChoice()
return a reference to the data Choice menu
 o getLoadButton()
return a reference to the "Load" button
 o getObservable()
return a reference to the actual Observable object used by this Panel.
 o getReloadCurrentButton()
return a reference to the "Reload Current" Button
 o getRequestedDataset()
return the URL string for the last dataset for which there was a load request, or null if a request has not yet been made.
 o getURLString()
return the URL string currently in the URL TextField
 o getURLTextField()
return a reference to the url TextField
 o layoutComponents()
layout the components.
 o loadData()
request that the dataset given by the string appearing in the URL TextField be loaded.
 o main(String[])
 o openFileBrowser()
open a FileDialog window for the selection of a file from the local filesystem.
 o reloadCurrentData()
reload the last dataset that was loaded either via the "Load" button or an explicit call to the loadData() method.
 o rememberURL()
 o selectDataset(String)
select the dataset with the given name.
 o setAutoFileLoad(boolean)
set whether a dataset will automatically be loaded when the File browser window is closed.
 o setBrowsing(boolean)
set whether a FileDialog window can be opened.
 o setURLText(String)
set the String appearing in the URL TextField.
 o setWorkingDirectory(String)
the default working directory for the file browser window
 o willAutoLoadFile()
return whether a dataset will automatically be loaded when the File browser window is closed.

Variables

 o getIt
  protected Button getIt
 o urlField
  protected TextField urlField
 o defChoice
  protected Choice defChoice
 o store
  protected Button store
 o browse
  protected Button browse
 o reset
  protected Button reset
 o fileBrowser
  protected FileDialog fileBrowser
 o browserFrame
  protected Frame browserFrame
 o current
  protected String current
 o currentName
  protected String currentName
 o wdir
  protected String wdir
 o dsurls
  protected Properties dsurls
 o editChoice
  protected String editChoice
the string that tells user to edit the test in the URL TextField
 o loadAlerter
  protected Observable loadAlerter
the delegate Observerable

Constructors

 o DatasetChooserPanel
  public DatasetChooserPanel()
Create a blank DatasetChooserPanel
 o DatasetChooserPanel
  public DatasetChooserPanel(int cols)
Create a blank DatasetChooserPanel
 o DatasetChooserPanel
  public DatasetChooserPanel(String defURL)
Create a DatasetChooserPanel with default string in URL TextField
 o DatasetChooserPanel
  public DatasetChooserPanel(String defURL,
                             Frame parent)
Create a DatasetChooserPanel with default string in URL TextField
 o DatasetChooserPanel
  public DatasetChooserPanel(String defURL,
                             int cols)
Create a DatasetChooserPanel with default string in URL TextField
Parameters:
defURL - the string to appear in the URL TextField
cols - the default number of columns in the URL TextField; the actual width may be larger depending on the layout of this Component in its Container.
 o DatasetChooserPanel
  public DatasetChooserPanel(String defURL,
                             int cols,
                             Frame parent)
Create a DatasetChooserPanel with default string in URL TextField
Parameters:
defURL - the string to appear in the URL TextField (can be null).
cols - the default number of columns in the URL TextField; the actual width may be larger depending on the layout of this Component in its Container.
parent - the Frame that will hold this Panel; this is needed if browsing of the local filesystem is desired.

Methods

 o layoutComponents
  protected void layoutComponents()
layout the components.
 o addObserver
  public void addObserver(Observer o)
add an Observer that wants to be alerted when there has been a request to load a dataset.
 o getObservable
  public Observable getObservable()
return a reference to the actual Observable object used by this Panel.
 o getLoadButton
  public Button getLoadButton()
return a reference to the "Load" button
 o getURLTextField
  public TextField getURLTextField()
return a reference to the url TextField
 o getDataChoice
  public Choice getDataChoice()
return a reference to the data Choice menu
 o getBrowseButton
  public Button getBrowseButton()
return a reference to the "Browse..." Button
 o getReloadCurrentButton
  public Button getReloadCurrentButton()
return a reference to the "Reload Current" Button
 o getURLString
  public String getURLString()
return the URL string currently in the URL TextField
 o addDatasetURL
  public synchronized void addDatasetURL(String datasetName,
                                         String datasetURL)
add predefined dataset URL to the choice menu
Parameters:
datasetName - the name that will appear on the Choice menu
datasetURL - the URL string that will return that dataset
 o action
  public boolean action(Event e,
                        Object what)
Overrides:
action in class Component
 o setAutoFileLoad
  public void setAutoFileLoad(boolean doIt)
set whether a dataset will automatically be loaded when the File browser window is closed.
 o willAutoLoadFile
  public boolean willAutoLoadFile()
return whether a dataset will automatically be loaded when the File browser window is closed. This method will always return false if a call to canBrowse() would return false.
 o canBrowse
  public boolean canBrowse()
return whether a FileDialog window can be opened.
 o setBrowsing
  public boolean setBrowsing(boolean allow)
set whether a FileDialog window can be opened.
Returns:
s false if this state cannot be change; to enable browsing, a Frame must have been passed to this class's constructor.
 o setWorkingDirectory
  public boolean setWorkingDirectory(String dirname)
the default working directory for the file browser window
Returns:
s false if this directory cannot be set (because a Frame was not passed to this object's constructor
 o openFileBrowser
  public void openFileBrowser()
open a FileDialog window for the selection of a file from the local filesystem. This method does nothing if a call to canBrowse() would return false.
 o getRequestedDataset
  public String getRequestedDataset()
return the URL string for the last dataset for which there was a load request, or null if a request has not yet been made.
 o loadData
  public synchronized void loadData()
request that the dataset given by the string appearing in the URL TextField be loaded. All observers will be alerted and given the dataset's URL string as an argument.
 o setURLText
  public synchronized void setURLText(String url)
set the String appearing in the URL TextField. This method will cause the TextField to become editable, and the dataset Choice menu will be set to the "Enter URL above" choice.
 o reloadCurrentData
  public synchronized void reloadCurrentData()
reload the last dataset that was loaded either via the "Load" button or an explicit call to the loadData() method. Nothing happens if no data has yet been loaded. This method is called when the "Reload Current" button is pressed.
 o selectDataset
  public synchronized void selectDataset(String name)
select the dataset with the given name. This equivalent to making a choice via the GUI.
Parameters:
name - one of the Strings that appears in the dataset Choice menu
 o doSelectDataset
  protected synchronized void doSelectDataset(String name)
respond to a change in the dataset Choice menu
 o rememberURL
  public synchronized void rememberURL()
 o main
  public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index