org.opensha.sra.gui.components
Class VulnerabilityBean

java.lang.Object
  extended by org.opensha.sra.gui.components.VulnerabilityBean
All Implemented Interfaces:
GuiBeanAPI

public class VulnerabilityBean
extends Object
implements GuiBeanAPI

Title: VulnerabilityBean
Description: A bean to gather and store information about a vulnerabilty model (function).

Author:
Eric Martinez
See Also:
VulnerabilityModel

Field Summary
 
Fields inherited from interface org.opensha.sra.gui.components.GuiBeanAPI
APPLET, APPLICATION, BUTTON, EMBED, MENUOPT, SPLASH, WEB
 
Constructor Summary
VulnerabilityBean(List<AbstractVulnerability> vms)
          Creates a new VulnerabilityBean that is ready to be displayed by an application through a call to its getVisualization(...) method.
 
Method Summary
 AbstractVulnerability getCurrentModel()
           
 ParameterList getDisplayParameters()
           
 StringParameter getParameter()
           
 Object getVisualization(int type)
          See the general contract in GuiBeanAPI.
 String getVisualizationClassName(int type)
          See the general contract in GuiBeanAPI.
 boolean isVisualizationSupported(int type)
          See the general contract in GuiBeanAPI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VulnerabilityBean

public VulnerabilityBean(List<AbstractVulnerability> vms)
Creates a new VulnerabilityBean that is ready to be displayed by an application through a call to its getVisualization(...) method.

Method Detail

getCurrentModel

public AbstractVulnerability getCurrentModel()
Returns:
The currently selected vulnerability model

getParameter

public StringParameter getParameter()
Returns:
The underlying parameters associated with this bean

getDisplayParameters

public ParameterList getDisplayParameters()

getVisualization

public Object getVisualization(int type)
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.

getVisualizationClassName

public 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.

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.