org.opensha.nshmp.sha.gui.beans
Class BatchLocationBean

java.lang.Object
  extended by org.opensha.nshmp.sha.gui.beans.BatchLocationBean
All Implemented Interfaces:
java.util.EventListener, ParameterChangeFailListener, ParameterChangeListener, GuiBeanAPI

public class BatchLocationBean
extends java.lang.Object
implements GuiBeanAPI, ParameterChangeListener, ParameterChangeFailListener


Field Summary
static int BAT_MODE
           
static int GEO_MODE
           
static java.lang.String OUTPUT
           
static java.lang.String PARAM_BAT
           
static java.lang.String PARAM_LAT
           
static java.lang.String PARAM_LON
           
static java.lang.String PARAM_OUT
           
static java.lang.String PARAM_ZIP
           
static int ZIP_MODE
           
 
Fields inherited from interface org.opensha.nshmp.sha.gui.beans.GuiBeanAPI
APPLET, APPLICATION, BUTTON, EMBED, MENUOPT, SPLASH, WEB
 
Constructor Summary
BatchLocationBean()
           
 
Method Summary
 void createNoLocationGUI()
           
 java.util.ArrayList<Location> getBatchLocations()
           
 java.util.ArrayList<java.lang.String> getBatchSiteConditions()
           
 int getLocationMode()
           
 ParameterList getLocationParameters()
           
 java.lang.String getOutputFile()
           
 Location getSelectedLocation()
           
 java.lang.Object getVisualization(int type)
          See the general contract in GuiBeanAPI
 java.lang.String getVisualizationClassName(int type)
          See the general contract in GuiBeanAPI
 java.lang.String getZipCode()
          Returns the current zip code stored in the zip StringParameter.
 boolean hasLocation()
          Always returns true.
 boolean inputFileExists()
           
 boolean isVisualizationSupported(int type)
          See the general contract in GuiBeanAPI
 void parameterChange(ParameterChangeEvent event)
          See the general contract in ParameterChangeListener.
 void parameterChangeFailed(ParameterChangeFailEvent event)
          Function that must be implemented by all Listeners for ParameterChangeFailEvents.
 void updateGuiParams(double minLat, double maxLat, double minLon, double maxLon, boolean zipCodeSupported)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_BAT

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

PARAM_OUT

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

PARAM_LAT

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

PARAM_LON

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

PARAM_ZIP

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

OUTPUT

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

GEO_MODE

public static final int GEO_MODE
See Also:
Constant Field Values

ZIP_MODE

public static final int ZIP_MODE
See Also:
Constant Field Values

BAT_MODE

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

BatchLocationBean

public BatchLocationBean()
Method Detail

getOutputFile

public java.lang.String getOutputFile()

inputFileExists

public boolean inputFileExists()

getBatchLocations

public java.util.ArrayList<Location> getBatchLocations()

getBatchSiteConditions

public java.util.ArrayList<java.lang.String> getBatchSiteConditions()

getSelectedLocation

public Location getSelectedLocation()

getZipCode

public java.lang.String getZipCode()
Returns the current zip code stored in the zip StringParameter. This may be null or empty (""). Caller should check return status.

Returns:
The current zip code

getLocationMode

public int getLocationMode()

updateGuiParams

public void updateGuiParams(double minLat,
                            double maxLat,
                            double minLon,
                            double maxLon,
                            boolean zipCodeSupported)

getLocationParameters

public ParameterList getLocationParameters()

createNoLocationGUI

public void createNoLocationGUI()

hasLocation

public boolean hasLocation()
Always returns true. Exists for legacy reasons only.

Returns:
Whether or not the bean has a valid location

getVisualization

public java.lang.Object getVisualization(int type)
                                  throws java.lang.IllegalArgumentException
See the general contract in GuiBeanAPI

Specified by:
getVisualization in interface GuiBeanAPI
Parameters:
type - An int defining the type of application visualization desired.
Returns:
The visualization of the GuiBean. This might be a JComponent in the case of an applet/application, but might just be an HTML String in the case of a web application. Implementation can vary greatly.
Throws:
java.lang.IllegalArgumentException - If isVisualizationSupported(type) returns false.
See Also:
GuiBeanAPI

getVisualizationClassName

public java.lang.String getVisualizationClassName(int type)
See the general contract in GuiBeanAPI

Specified by:
getVisualizationClassName in interface GuiBeanAPI
Parameters:
type - The type of visualization desired.
Returns:
The fully qualified class name of the visualization object returned by getVisualization. If the given type is not supported, then null is returned.
See Also:
GuiBeanAPI

isVisualizationSupported

public boolean isVisualizationSupported(int type)
See the general contract in GuiBeanAPI

Specified by:
isVisualizationSupported in interface GuiBeanAPI
Parameters:
type - The type of application the visualization is desired for.
Returns:
True if the visualization type is available, false otherwise.
See Also:
GuiBeanAPI

parameterChange

public void parameterChange(ParameterChangeEvent event)
See the general contract in ParameterChangeListener.

Specified by:
parameterChange in interface ParameterChangeListener
Parameters:
event - The Event which triggered this function call
See Also:
ParameterChangeListener

parameterChangeFailed

public void parameterChangeFailed(ParameterChangeFailEvent event)
Description copied from interface: ParameterChangeFailListener
Function that must be implemented by all Listeners for ParameterChangeFailEvents.

Specified by:
parameterChangeFailed in interface ParameterChangeFailListener
Parameters:
event - The Event which triggered this function call