org.opensha.sha.gcim.ui
Class GCIM_HazardCurveApp

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
                          extended by org.opensha.sha.gcim.ui.GCIM_HazardCurveApp
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible, RootPaneContainer, WindowConstants, ParameterChangeListener, CalculationSettingsControlPanelAPI, CurveDisplayAppAPI, ScalarIMRChangeListener

public class GCIM_HazardCurveApp
extends HazardCurveApplication

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  boolean avgSelected
           
protected  HazardCurveCalculatorAPI calc
           
protected  CalculationSettingsControlPanel calcParamsControl
           
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  GcimCalculator gcimCalc
           
protected  GcimControlPanel gcimControlPanel
           
protected  boolean gcimFlag
           
protected  boolean gcimIMiChangeFlag
           
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 org.opensha.sha.gui.HazardCurveApplication
appShortName
 
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
GCIM_HazardCurveApp(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.
 String getGcimResults()
          Returns the Gcim Results List
 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.
 ArrayList<TectonicRegionType> getIncludedTectonicRegionTypes()
          This method gets the included tectonic region types, which is needed by some control panels
 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.
 void setGcimSelected(boolean isSelected)
          This function to specify whether gcim is selected or not
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

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

gcimControlPanel

protected GcimControlPanel gcimControlPanel

epistemicControlPanel

protected ERF_EpistemicListControlPanel epistemicControlPanel

calcParamsControl

protected CalculationSettingsControlPanel calcParamsControl

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

gcimFlag

protected boolean gcimFlag

gcimIMiChangeFlag

protected boolean gcimIMiChangeFlag

isProbabilisticCurve

protected boolean isProbabilisticCurve

isDeterministicCurve

protected boolean isDeterministicCurve

isStochasticCurve

protected boolean isStochasticCurve

progressCheckBox

protected JCheckBox progressCheckBox

controlComboBox

protected JComboBox controlComboBox

probDeterComboBox

protected JComboBox probDeterComboBox

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

gcimCalc

protected GcimCalculator gcimCalc

startAppProgressClass

protected CalcProgressBar startAppProgressClass

prevSelectedERF_List

protected String prevSelectedERF_List

weightedFuncList

protected WeightedFuncListforPlotting weightedFuncList

errorInInitializationMessage

protected static String errorInInitializationMessage
Constructor Detail

GCIM_HazardCurveApp

public GCIM_HazardCurveApp(String appShortName)
Method Detail

init

public void init()
Overrides:
init in class HazardCurveApplication

getGuideURL

protected String getGuideURL()
Overrides:
getGuideURL in class HazardCurveApplication

getTutorialURL

protected String getTutorialURL()
Overrides:
getTutorialURL in class HazardCurveApplication

jbInit

protected void jbInit()
               throws Exception
Overrides:
jbInit in class HazardCurveApplication
Throws:
Exception

actionPerformed

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

setImtPanel

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

Overrides:
setImtPanel in class HazardCurveApplication

getAppletInfo

public String getAppletInfo()
Overrides:
getAppletInfo in class HazardCurveApplication

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
Overrides:
run in class HazardCurveApplication

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.

Overrides:
createCalcInstance in class HazardCurveApplication

calculate

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

Overrides:
calculate in class HazardCurveApplication

getApplicationComponent

protected Component getApplicationComponent()
Overrides:
getApplicationComponent in class HazardCurveApplication
Returns:
the application component

drawGraph

protected void drawGraph()
to draw the graph

Overrides:
drawGraph in class HazardCurveApplication

plotGraphUsingPlotPreferences

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

Overrides:
plotGraphUsingPlotPreferences in class HazardCurveApplication

setDisaggregationSelected

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

Overrides:
setDisaggregationSelected in class HazardCurveApplication
Parameters:
isSelected - : True if disaggregation is selected , else false

setGcimSelected

public void setGcimSelected(boolean isSelected)
This function to specify whether gcim is selected or not

Parameters:
isSelected - : True if gcim 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
Overrides:
parameterChange in class HazardCurveApplication
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.

Overrides:
setButtonsEnable in class HazardCurveApplication
Parameters:
b -

computeHazardCurve

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

Overrides:
computeHazardCurve in class HazardCurveApplication

handleForecastList

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

Overrides:
handleForecastList in class HazardCurveApplication
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

Overrides:
probDeterSelectionChange in class HazardCurveApplication
Parameters:
e -

initIMR_GuiBean

protected void initIMR_GuiBean()
Initialize the IMR Gui Bean

Overrides:
initIMR_GuiBean in class HazardCurveApplication

initSiteGuiBean

protected void initSiteGuiBean()
Initialize the site gui bean

Overrides:
initSiteGuiBean in class HazardCurveApplication

initERF_GuiBean

protected void initERF_GuiBean()
Initialize the ERF Gui Bean

Overrides:
initERF_GuiBean in class HazardCurveApplication

initERFSelector_GuiBean

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

Overrides:
initERFSelector_GuiBean in class HazardCurveApplication

initCommonControlList

protected void initCommonControlList()
Overrides:
initCommonControlList in class HazardCurveApplication

initControlList

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

Overrides:
initControlList in class HazardCurveApplication

getCalcAdjustableParams

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

getCalcParamMetadataString

public String getCalcParamMetadataString()
Specified by:
getCalcParamMetadataString in interface CalculationSettingsControlPanelAPI
Overrides:
getCalcParamMetadataString in class HazardCurveApplication
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
Overrides:
getSelectedIMT in class HazardCurveApplication
Returns:
the selected IMT

getCVMControl

public SiteDataControlPanel getCVMControl()
Overrides:
getCVMControl in class HazardCurveApplication

showControlPanel

protected void showControlPanel(String controlName)
Overrides:
showControlPanel in class HazardCurveApplication

showControlPanel

protected void showControlPanel(ControlPanel control)
Overrides:
showControlPanel in class HazardCurveApplication

initProbOrDeterList

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

Overrides:
initProbOrDeterList in class HazardCurveApplication

getX_AxisRange

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

getY_AxisRange

public org.jfree.data.Range getY_AxisRange()
Overrides:
getY_AxisRange in class HazardCurveApplication
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
Overrides:
setCurveXValues in class HazardCurveApplication

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
Overrides:
setCurveXValues in class HazardCurveApplication
Parameters:
func -

addCurve

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

Specified by:
addCurve in interface CurveDisplayAppAPI
Overrides:
addCurve in class HazardCurveApplication
Parameters:
function - ArbitrarilyDiscretizedFunc

setPlotAllCurves

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

Overrides:
setPlotAllCurves in class HazardCurveApplication
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"

Overrides:
setFractileOption in class HazardCurveApplication
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

Overrides:
setAverageSelected in class HazardCurveApplication
Parameters:
isAvgSelected - : true if avg is selected else false

getParametersInfoAsString

public String getParametersInfoAsString()
Overrides:
getParametersInfoAsString in class HazardCurveApplication
Returns:
the String containing the values selected for different parameters

getMapParametersInfoAsHTML

public String getMapParametersInfoAsHTML()
Overrides:
getMapParametersInfoAsHTML in class HazardCurveApplication
Returns:
the String containing the values selected for different parameters

getCurveFunctionList

public List<PlotElement> getCurveFunctionList()
Overrides:
getCurveFunctionList in class HazardCurveApplication
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.

Overrides:
peelOffCurves in class HazardCurveApplication

getPlottingFeatures

public List<PlotCurveCharacterstics> getPlottingFeatures()
Overrides:
getPlottingFeatures in class HazardCurveApplication
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()
Overrides:
print in class HazardCurveApplication

getGraphWidget

public GraphWidget getGraphWidget()
Overrides:
getGraphWidget in class HazardCurveApplication

getDisaggregationPlot

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

Overrides:
getDisaggregationPlot in class HazardCurveApplication
Returns:
String

getSourceDisaggregationInfo

public String getSourceDisaggregationInfo()
Returns the Source Disaggregated List

Overrides:
getSourceDisaggregationInfo in class HazardCurveApplication
Returns:
String

getGcimResults

public String getGcimResults()
Returns the Gcim Results List

Returns:
String

addCybershakeCurveData

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

Overrides:
addCybershakeCurveData in class HazardCurveApplication
Parameters:
function - DiscretizedFuncAPI

setCurveType

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

Overrides:
setCurveType in class HazardCurveApplication
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

Overrides:
getIML_Values in class HazardCurveApplication
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.

Overrides:
getEqkRupForecastGuiBeanInstance in class HazardCurveApplication

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.

Overrides:
getEqkSrcRupSelectorGuiBeanInstance in class HazardCurveApplication

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.

Overrides:
getSiteGuiBeanInstance in class HazardCurveApplication

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.

Overrides:
getIMTGuiBeanInstance in class HazardCurveApplication

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.

Overrides:
getIMRGuiBeanInstance in class HazardCurveApplication

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.

Overrides:
updateSiteParams in class HazardCurveApplication

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
Overrides:
imrChange in class HazardCurveApplication
Parameters:
event - The Event which triggered this function call

getIncludedTectonicRegionTypes

public ArrayList<TectonicRegionType> getIncludedTectonicRegionTypes()
This method gets the included tectonic region types, which is needed by some control panels