org.opensha.sha.gui
Class HazardCurveApplication

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by org.opensha.sha.gui.HazardCurveApplication
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible, RootPaneContainer, WindowConstants, ParameterChangeListener, CalculationSettingsControlPanelAPI, CurveDisplayAppAPI, ScalarIMRChangeListener
Direct Known Subclasses:
CEA_HazardCurveLocalModeApp, GCIM_HazardCurveApp, HazardSpectrumApplication

public class HazardCurveApplication
extends JFrame
implements Runnable, ParameterChangeListener, CurveDisplayAppAPI, CalculationSettingsControlPanelAPI, ActionListener, ScalarIMRChangeListener

Title: HazardCurveServerModeApplication

Description: This application computes Hazard Curve for selected AttenuationRelationship model , Site and Earthquake Rupture Forecast (ERF)model. This computed Hazard curve is shown in a panel using JFreechart. This application works with/without internet connection. If user using this application has network connection then it creates the instances of ERF on server and make all calls to server for any forecast updation. All the computation in this application is done using the server. Once the computations complete, it returns back the result. All the server client relationship has been established using RMI, which allows to make simple calls to the server similar to if things are existing on user's own machine. If network connection is not available to user then it will create all the objects on users local machine and do all computation there itself.

Version:
1.0
Author:
Nitin Gupta and Vipin Gupta Date : Sept 23 , 2002
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String APP_NAME
           
static String APP_SHORT_NAME
           
protected  String appShortName
          this is the short name for the application (not static because other apps extend this).
protected  boolean avgSelected
           
protected  HazardCurveCalculatorAPI calc
           
protected static String CONTROL_PANELS
           
protected  JComboBox controlComboBox
           
protected  int currentERFInEpistemicListForHazardCurve
           
protected  SiteDataControlPanel cvmControlPanel
           
protected static boolean D
           
protected  Insets defaultInsets
           
static String DETERMINISTIC
           
protected  DisaggregationCalculatorAPI disaggCalc
           
protected  DisaggregationControlPanel disaggregationControlPanel
           
protected  boolean disaggregationFlag
           
protected  ERF_EpistemicListControlPanel epistemicControlPanel
           
protected  ERF_GuiBean erfGuiBean
           
protected  EqkRupSelectorGuiBean erfRupSelectorGuiBean
           
protected static String errorInInitializationMessage
           
protected  String fractileOption
           
protected  ArbitrarilyDiscretizedFunc function
           
protected  ArrayList<PlotElement> functionList
          List of ArbitrarilyDiscretized functions and Weighted funstions
protected  GraphWidget graphWidget
           
protected  IMR_MultiGuiBean imrGuiBean
           
protected  IMT_Info imtInfo
           
protected  boolean isAllCurves
           
protected  boolean isDeterministicCurve
           
protected  boolean isEqkList
           
protected  boolean isProbabilisticCurve
           
protected  boolean isStochasticCurve
           
protected  int numERFsInEpistemicList
           
protected  PEER_TestCaseSelectorControlPanel peerTestsControlPanel
           
protected  PlottingOptionControl plotOptionControl
           
protected  String prevSelectedERF_List
           
static String PROBABILISTIC
           
protected  JComboBox probDeterComboBox
           
protected  JCheckBox progressCheckBox
           
protected  Site_GuiBean siteGuiBean
           
protected  SitesOfInterestControlPanel sitesOfInterest
           
protected  CalcProgressBar startAppProgressClass
           
static String STOCHASTIC
           
protected  WeightedFuncListforPlotting weightedFuncList
           
protected  X_ValuesInCurveControlPanel xValuesPanel
           
protected  XY_ValuesControlPanel xyPlotControl
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HazardCurveApplication(String appShortName)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addCurve(ArbitrarilyDiscretizedFunc function)
          Sets ArbitraryDiscretizedFunc inside list containing all the functions.
 void addCybershakeCurveData(DiscretizedFunc function)
          Adding the Cybershake curve to the list of plots
protected  void calculate()
          this function is called to draw the graph
protected  void computeHazardCurve()
          Gets the probabilities functiion based on selected parameters this function is called when add Graph is clicked
protected  void createCalcInstance()
          This method creates the HazardCurveCalc and Disaggregation Calc(if selected) instances.
protected  void drawGraph()
          to draw the graph
 String getAppletInfo()
           
protected  Component getApplicationComponent()
           
static ApplicationVersion getAppVersion()
          Returns the Application version
 ParameterList getCalcAdjustableParams()
           
 String getCalcParamMetadataString()
           
 List<PlotElement> getCurveFunctionList()
           
 SiteDataControlPanel getCVMControl()
           
 String getDisaggregationPlot()
          Returns the Disaggregation plot image webaddr to be shown in the plot window.
 ERF_GuiBean getEqkRupForecastGuiBeanInstance()
          This returns the Earthquake Forecast GuiBean which allows the the cybershake control panel to set the forecast parameters from cybershake control panel, similar to what they are set when calculating cybershaks curves.
 EqkRupSelectorGuiBean getEqkSrcRupSelectorGuiBeanInstance()
          This returns instance to the EqkRupSelectorGuiBean, this allows the cybershake control panel to set the forecast parameters and select the same source and rupture as in the cybershake control panel.
 GraphWidget getGraphWidget()
           
protected  String getGuideURL()
           
 ArrayList<Double> getIML_Values()
          Returns the IML values being used by the application
 IMR_MultiGuiBean getIMRGuiBeanInstance()
          It returns the IMR Gui bean, which allows the Cybershake control panel to set the gaussian truncation value in the main application similar to selected for Cybershake.
 IMT_NewGuiBean getIMTGuiBeanInstance()
          It returns the IMT Gui bean, which allows the Cybershake control panel to set the same SA period value in the main application similar to selected for Cybershake.
 String getMapParametersInfoAsHTML()
           
 String getParametersInfoAsString()
           
 List<PlotCurveCharacterstics> getPlottingFeatures()
           
 String getSelectedIMT()
          Get the selected IMT from the application, based on which it shows the default X Values for the chosen IMT.
 Site_GuiBean getSiteGuiBeanInstance()
          This returns the Site Guibean using which allows to set the site locations in the OpenSHA application from cybershake control panel.
 String getSourceDisaggregationInfo()
          Returns the Source Disaggregated List
protected  String getTutorialURL()
           
 org.jfree.data.Range getX_AxisRange()
           
 org.jfree.data.Range getY_AxisRange()
           
protected  void handleForecastList(Site site, Map<TectonicRegionType,ScalarIMR> imrMap, BaseERF eqkRupForecast)
          Handle the Eqk Forecast List.
 void imrChange(ScalarIMRChangeEvent event)
          Function that must be implemented by all Listeners for AttenuationRelationshipChangeEvents.
 void init()
           
protected  void initCommonControlList()
           
protected  void initControlList()
          Initialize the items to be added to the control list
protected  void initERF_GuiBean()
          Initialize the ERF Gui Bean
protected  void initERFSelector_GuiBean()
          Initialize the ERF Rup Selector Gui Bean
protected  void initIMR_GuiBean()
          Initialize the IMR Gui Bean
protected  void initProbOrDeterList()
          Initialise the item to be added to the Prob and Deter Selection
protected  void initSiteGuiBean()
          Initialize the site gui bean
protected  void jbInit()
           
static void main(String[] args)
           
 void parameterChange(ParameterChangeEvent event)
          Any time a control paramater or independent paramater is changed by the user in a GUI this function is called, and a paramater change event is passed in.
protected  void peelOffCurves()
          Actual method implementation of the "Peel-Off" This function peels off the window from the current plot and shows in a new window.
 void plotGraphUsingPlotPreferences()
          plots the curves with defined color,line width and shape.
 void print()
           
protected  void probDeterSelectionChange()
          This function is to whether to plot ERF_GuiBean or ERF_RupSelectorGuiBean
 void run()
          Implementing the run method in the Runnable interface that creates a new thread to do Hazard Curve Calculation, this thread created is seperate from the timer thread, so that progress bar updation does not conflicts with Calculations.
 void setAverageSelected(boolean isAvgSelected)
          This function is needed to tell the applet whether avg is selected or not This is called from ERF_EpistemicListControlPanel
protected  void setButtonsEnable(boolean b)
          Function to make the buttons enable or disable in the application.
 void setCurveType(String calcType)
          Sets the application with the curve type chosen by the Cybershake application
 void setCurveXValues()
          This forces use of default X-axis values (according to the selected IMT)
 void setCurveXValues(ArbitrarilyDiscretizedFunc func)
          Sets the hazard curve x-axis values (if user wants custom values x-axis values).
 void setDisaggregationSelected(boolean isSelected)
          This function to specify whether disaggregation is selected or not
 void setFractileOption(String fractileOption)
          This function sets the percentils option chosen by the user.
protected  void setImtPanel(ParameterListEditor panel, double resizeWeight)
          Provided to allow subclasses to substitute the IMT panel.
 void setPlotAllCurves(boolean drawAllCurves)
          This function sets whether all curves are to drawn or only fractiles are to drawn
protected  void showControlPanel(ControlPanel control)
           
protected  void showControlPanel(String controlName)
           
 void updateSiteParams()
          Updates the Site_GuiBean to reflect the chnaged SiteParams for the selected AttenuationRelationship.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

APP_NAME

public static final String APP_NAME
See Also:
Constant Field Values

APP_SHORT_NAME

public static final String APP_SHORT_NAME
See Also:
Constant Field Values

appShortName

protected String appShortName
this is the short name for the application (not static because other apps extend this).


D

protected static final boolean D
See Also:
Constant Field Values

PROBABILISTIC

public static final String PROBABILISTIC
See Also:
Constant Field Values

DETERMINISTIC

public static final String DETERMINISTIC
See Also:
Constant Field Values

STOCHASTIC

public static final String STOCHASTIC
See Also:
Constant Field Values

CONTROL_PANELS

protected static final String CONTROL_PANELS
See Also:
Constant Field Values

peerTestsControlPanel

protected PEER_TestCaseSelectorControlPanel peerTestsControlPanel

disaggregationControlPanel

protected DisaggregationControlPanel disaggregationControlPanel

epistemicControlPanel

protected ERF_EpistemicListControlPanel epistemicControlPanel

sitesOfInterest

protected SitesOfInterestControlPanel sitesOfInterest

cvmControlPanel

protected SiteDataControlPanel cvmControlPanel

xValuesPanel

protected X_ValuesInCurveControlPanel xValuesPanel

plotOptionControl

protected PlottingOptionControl plotOptionControl

xyPlotControl

protected XY_ValuesControlPanel xyPlotControl

defaultInsets

protected Insets defaultInsets

functionList

protected ArrayList<PlotElement> functionList
List of ArbitrarilyDiscretized functions and Weighted funstions


function

protected ArbitrarilyDiscretizedFunc function

imtInfo

protected IMT_Info imtInfo

isEqkList

protected boolean isEqkList

isAllCurves

protected boolean isAllCurves

fractileOption

protected String fractileOption

avgSelected

protected boolean avgSelected

numERFsInEpistemicList

protected int numERFsInEpistemicList

currentERFInEpistemicListForHazardCurve

protected int currentERFInEpistemicListForHazardCurve

disaggregationFlag

protected boolean disaggregationFlag

isProbabilisticCurve

protected boolean isProbabilisticCurve

isDeterministicCurve

protected boolean isDeterministicCurve

isStochasticCurve

protected boolean isStochasticCurve

progressCheckBox

protected JCheckBox progressCheckBox

controlComboBox

protected JComboBox controlComboBox

probDeterComboBox

protected JComboBox probDeterComboBox

graphWidget

protected GraphWidget graphWidget

imrGuiBean

protected IMR_MultiGuiBean imrGuiBean

siteGuiBean

protected Site_GuiBean siteGuiBean

erfGuiBean

protected ERF_GuiBean erfGuiBean

erfRupSelectorGuiBean

protected EqkRupSelectorGuiBean erfRupSelectorGuiBean

calc

protected HazardCurveCalculatorAPI calc

disaggCalc

protected DisaggregationCalculatorAPI disaggCalc

startAppProgressClass

protected CalcProgressBar startAppProgressClass

prevSelectedERF_List

protected String prevSelectedERF_List

weightedFuncList

protected WeightedFuncListforPlotting weightedFuncList

errorInInitializationMessage

protected static String errorInInitializationMessage
Constructor Detail

HazardCurveApplication

public HazardCurveApplication(String appShortName)
Method Detail

init

public void init()

getGuideURL

protected String getGuideURL()

getTutorialURL

protected String getTutorialURL()

jbInit

protected void jbInit()
               throws Exception
Throws:
Exception

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

setImtPanel

protected void setImtPanel(ParameterListEditor panel,
                           double resizeWeight)
Provided to allow subclasses to substitute the IMT panel.


getAppletInfo

public String getAppletInfo()

getAppVersion

public static ApplicationVersion getAppVersion()
Returns the Application version

Returns:
ApplicationVersion

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException

run

public void run()
Implementing the run method in the Runnable interface that creates a new thread to do Hazard Curve Calculation, this thread created is seperate from the timer thread, so that progress bar updation does not conflicts with Calculations.

Specified by:
run in interface Runnable

createCalcInstance

protected void createCalcInstance()
This method creates the HazardCurveCalc and Disaggregation Calc(if selected) instances. Calculations are performed on the user's own machine, no internet connection is required for it.


calculate

protected void calculate()
this function is called to draw the graph


getApplicationComponent

protected Component getApplicationComponent()
Returns:
the application component

drawGraph

protected void drawGraph()
to draw the graph


plotGraphUsingPlotPreferences

public void plotGraphUsingPlotPreferences()
plots the curves with defined color,line width and shape.


setDisaggregationSelected

public void setDisaggregationSelected(boolean isSelected)
This function to specify whether disaggregation is selected or not

Parameters:
isSelected - : True if disaggregation is selected , else false

parameterChange

public void parameterChange(ParameterChangeEvent event)
Any time a control paramater or independent paramater is changed by the user in a GUI this function is called, and a paramater change event is passed in. This function then determines what to do with the information ie. show some paramaters, set some as invisible, basically control the paramater lists.

Specified by:
parameterChange in interface ParameterChangeListener
Parameters:
event -

setButtonsEnable

protected void setButtonsEnable(boolean b)
Function to make the buttons enable or disable in the application. It is used in application to disable the button in the buttons panel if some computation is already going on.

Parameters:
b -

computeHazardCurve

protected void computeHazardCurve()
Gets the probabilities functiion based on selected parameters this function is called when add Graph is clicked


handleForecastList

protected void handleForecastList(Site site,
                                  Map<TectonicRegionType,ScalarIMR> imrMap,
                                  BaseERF eqkRupForecast)
Handle the Eqk Forecast List.

Parameters:
site - : Selected site
imr - : selected IMR
eqkRupForecast - : List of Eqk Rup forecasts

probDeterSelectionChange

protected void probDeterSelectionChange()
This function is to whether to plot ERF_GuiBean or ERF_RupSelectorGuiBean

Parameters:
e -

initIMR_GuiBean

protected void initIMR_GuiBean()
Initialize the IMR Gui Bean


initSiteGuiBean

protected void initSiteGuiBean()
Initialize the site gui bean


initERF_GuiBean

protected void initERF_GuiBean()
Initialize the ERF Gui Bean


initERFSelector_GuiBean

protected void initERFSelector_GuiBean()
Initialize the ERF Rup Selector Gui Bean


initCommonControlList

protected void initCommonControlList()

initControlList

protected void initControlList()
Initialize the items to be added to the control list


getCalcAdjustableParams

public ParameterList getCalcAdjustableParams()
Specified by:
getCalcAdjustableParams in interface CalculationSettingsControlPanelAPI
Returns:
the Adjustable parameters for the ScenarioShakeMap calculator
Throws:
RemoteException

getCalcParamMetadataString

public String getCalcParamMetadataString()
Specified by:
getCalcParamMetadataString in interface CalculationSettingsControlPanelAPI
Returns:
the Metadata string for the Calculation Settings Adjustable Params

getSelectedIMT

public String getSelectedIMT()
Description copied from interface: CurveDisplayAppAPI
Get the selected IMT from the application, based on which it shows the default X Values for the chosen IMT.

Specified by:
getSelectedIMT in interface CurveDisplayAppAPI
Returns:
the selected IMT

getCVMControl

public SiteDataControlPanel getCVMControl()

showControlPanel

protected void showControlPanel(String controlName)

showControlPanel

protected void showControlPanel(ControlPanel control)

initProbOrDeterList

protected void initProbOrDeterList()
Initialise the item to be added to the Prob and Deter Selection


getX_AxisRange

public org.jfree.data.Range getX_AxisRange()
Returns:
the Range for the X-Axis

getY_AxisRange

public org.jfree.data.Range getY_AxisRange()
Returns:
the Range for the Y-Axis

setCurveXValues

public void setCurveXValues()
This forces use of default X-axis values (according to the selected IMT)

Specified by:
setCurveXValues in interface CurveDisplayAppAPI

setCurveXValues

public void setCurveXValues(ArbitrarilyDiscretizedFunc func)
Sets the hazard curve x-axis values (if user wants custom values x-axis values). Note that what's passed in is not cloned (the y-axis values will get modified).

Specified by:
setCurveXValues in interface CurveDisplayAppAPI
Parameters:
func -

addCurve

public void addCurve(ArbitrarilyDiscretizedFunc function)
Sets ArbitraryDiscretizedFunc inside list containing all the functions.

Specified by:
addCurve in interface CurveDisplayAppAPI
Parameters:
function - ArbitrarilyDiscretizedFunc

setPlotAllCurves

public void setPlotAllCurves(boolean drawAllCurves)
This function sets whether all curves are to drawn or only fractiles are to drawn

Parameters:
drawAllCurves - :True if all curves are to be drawn else false

setFractileOption

public void setFractileOption(String fractileOption)
This function sets the percentils option chosen by the user. User can choose "No Fractiles", "5th, 50th and 95th Fractile" or "Plot Fractile"

Parameters:
fractileOption - : Option selected by the user. It can be set by various constant String values in ERF_EpistemicListControlPanel

setAverageSelected

public void setAverageSelected(boolean isAvgSelected)
This function is needed to tell the applet whether avg is selected or not This is called from ERF_EpistemicListControlPanel

Parameters:
isAvgSelected - : true if avg is selected else false

getParametersInfoAsString

public String getParametersInfoAsString()
Returns:
the String containing the values selected for different parameters

getMapParametersInfoAsHTML

public String getMapParametersInfoAsHTML()
Returns:
the String containing the values selected for different parameters

getCurveFunctionList

public List<PlotElement> getCurveFunctionList()
Returns:
the List for all the ArbitrarilyDiscretizedFunctions and Weighted Function list.

peelOffCurves

protected void peelOffCurves()
Actual method implementation of the "Peel-Off" This function peels off the window from the current plot and shows in a new window. The current plot just shows empty window.


getPlottingFeatures

public List<PlotCurveCharacterstics> getPlottingFeatures()
Returns:
the list PlotCurveCharacterstics that contain the info about plotting the curve like plot line color , its width and line type.

print

public void print()

getGraphWidget

public GraphWidget getGraphWidget()

getDisaggregationPlot

public String getDisaggregationPlot()
Returns the Disaggregation plot image webaddr to be shown in the plot window.

Returns:
String

getSourceDisaggregationInfo

public String getSourceDisaggregationInfo()
Returns the Source Disaggregated List

Returns:
String

addCybershakeCurveData

public void addCybershakeCurveData(DiscretizedFunc function)
Adding the Cybershake curve to the list of plots

Parameters:
function - DiscretizedFuncAPI

setCurveType

public void setCurveType(String calcType)
Sets the application with the curve type chosen by the Cybershake application

Parameters:
isDeterministic - boolean :If deterministic calculation then make the applicaton to plot deterministic curves.

getIML_Values

public ArrayList<Double> getIML_Values()
Returns the IML values being used by the application

Returns:
ArrayList

getEqkRupForecastGuiBeanInstance

public ERF_GuiBean getEqkRupForecastGuiBeanInstance()
This returns the Earthquake Forecast GuiBean which allows the the cybershake control panel to set the forecast parameters from cybershake control panel, similar to what they are set when calculating cybershaks curves.


getEqkSrcRupSelectorGuiBeanInstance

public EqkRupSelectorGuiBean getEqkSrcRupSelectorGuiBeanInstance()
This returns instance to the EqkRupSelectorGuiBean, this allows the cybershake control panel to set the forecast parameters and select the same source and rupture as in the cybershake control panel.


getSiteGuiBeanInstance

public Site_GuiBean getSiteGuiBeanInstance()
This returns the Site Guibean using which allows to set the site locations in the OpenSHA application from cybershake control panel.


getIMTGuiBeanInstance

public IMT_NewGuiBean getIMTGuiBeanInstance()
It returns the IMT Gui bean, which allows the Cybershake control panel to set the same SA period value in the main application similar to selected for Cybershake.


getIMRGuiBeanInstance

public IMR_MultiGuiBean getIMRGuiBeanInstance()
It returns the IMR Gui bean, which allows the Cybershake control panel to set the gaussian truncation value in the main application similar to selected for Cybershake.


updateSiteParams

public void updateSiteParams()
Updates the Site_GuiBean to reflect the chnaged SiteParams for the selected AttenuationRelationship. This method is called from the IMR_GuiBean to update the application with the Attenuation's Site Params.


imrChange

public void imrChange(ScalarIMRChangeEvent event)
Description copied from interface: ScalarIMRChangeListener
Function that must be implemented by all Listeners for AttenuationRelationshipChangeEvents.

Specified by:
imrChange in interface ScalarIMRChangeListener
Parameters:
event - The Event which triggered this function call