|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.opensha.sha.gui.HazardCurveApplication
public class 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.
| 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 |
| 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 |
ButtonControlPanel |
getButtonControlPanel()
|
ParameterList |
getCalcAdjustableParams()
|
String |
getCalcParamMetadataString()
|
ArrayList<Object> |
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. |
GraphPanel |
getGraphPanel()
|
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()
|
String |
getPlotLabel()
|
ArrayList<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()
|
double |
getUserMaxX()
|
double |
getUserMaxY()
|
double |
getUserMinX()
|
double |
getUserMinY()
|
org.jfree.data.Range |
getX_AxisRange()
Gets the range for the X-Axis |
String |
getXAxisLabel()
|
boolean |
getXLog()
|
org.jfree.data.Range |
getY_AxisRange()
Gets the range for the Y-Axis |
String |
getYAxisLabel()
|
boolean |
getYLog()
|
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 |
boolean |
isCustomAxis()
|
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 |
setAutoRange()
set the auto range for the axis. |
void |
setAverageSelected(boolean isAvgSelected)
This function is needed to tell the applet whether avg is selected or not This is called from ERF_EpistemicListControlPanel |
void |
setAxisRange(double xMin,
double xMax,
double yMin,
double yMax)
sets the range for X and Y axis |
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 |
void |
setPlotLabel(String plotTitle)
sets plot Title |
void |
setPlottingOrder(org.jfree.chart.plot.DatasetRenderingOrder order)
set the dataset rendering order |
void |
setX_Log(boolean xLog)
tells the application if the xLog is selected |
void |
setXAxisLabel(String xAxisLabel)
sets X Axis Label |
void |
setY_Log(boolean yLog)
tells the application if the yLog is selected |
void |
setYAxisLabel(String yAxisLabel)
sets Y Axis Label |
protected void |
showControlPanel(ControlPanel control)
|
protected void |
showControlPanel(String controlName)
|
void |
togglePlot()
Toggles between the Graph and the Data Window |
void |
updateSiteParams()
Updates the Site_GuiBean to reflect the chnaged SiteParams for the selected AttenuationRelationship. |
| 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.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String APP_NAME
public static final String APP_SHORT_NAME
protected String appShortName
protected static final boolean D
public static final String PROBABILISTIC
public static final String DETERMINISTIC
public static final String STOCHASTIC
protected String xAxisName
protected String yAxisName
protected static final String CONTROL_PANELS
protected PEER_TestCaseSelectorControlPanel peerTestsControlPanel
protected DisaggregationControlPanel disaggregationControlPanel
protected ERF_EpistemicListControlPanel epistemicControlPanel
protected SitesOfInterestControlPanel sitesOfInterest
protected SiteDataControlPanel cvmControlPanel
protected X_ValuesInCurveControlPanel xValuesPanel
protected PlottingOptionControl plotOptionControl
protected XY_ValuesControlPanel xyPlotControl
protected Insets defaultInsets
protected ArrayList<Object> functionList
protected ArbitrarilyDiscretizedFunc function
protected IMT_Info imtInfo
protected boolean isEqkList
protected boolean isAllCurves
protected String fractileOption
protected boolean avgSelected
protected int numERFsInEpistemicList
protected int currentERFInEpistemicListForHazardCurve
protected boolean disaggregationFlag
protected boolean isProbabilisticCurve
protected boolean isDeterministicCurve
protected boolean isStochasticCurve
protected String TITLE
protected JCheckBox progressCheckBox
protected JComboBox controlComboBox
protected JComboBox probDeterComboBox
protected IMR_MultiGuiBean imrGuiBean
protected Site_GuiBean siteGuiBean
protected ERF_GuiBean erfGuiBean
protected EqkRupSelectorGuiBean erfRupSelectorGuiBean
protected HazardCurveCalculatorAPI calc
protected DisaggregationCalculatorAPI disaggCalc
protected CalcProgressBar startAppProgressClass
protected String prevSelectedERF_List
protected WeightedFuncListforPlotting weightedFuncList
protected static String errorInInitializationMessage
| Constructor Detail |
|---|
public HazardCurveApplication(String appShortName)
| Method Detail |
|---|
public void init()
protected String getGuideURL()
protected String getTutorialURL()
protected void jbInit()
throws Exception
Exceptionpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListener
protected void setImtPanel(ParameterListEditor panel,
double resizeWeight)
public String getAppletInfo()
public static ApplicationVersion getAppVersion()
public static void main(String[] args)
throws IOException
IOExceptionpublic void togglePlot()
ButtonControlPanelAPI
togglePlot in interface ButtonControlPanelAPIpublic void run()
run in interface Runnableprotected void createCalcInstance()
protected void calculate()
protected Component getApplicationComponent()
protected void drawGraph()
public void plotGraphUsingPlotPreferences()
plotGraphUsingPlotPreferences in interface ButtonControlPanelAPI
public void setAxisRange(double xMin,
double xMax,
double yMin,
double yMax)
setAxisRange in interface AxisLimitsControlPanelAPIxMin - : minimum value for X-axisxMax - : maximum value for X-axisyMin - : minimum value for Y-axisyMax - : maximum value for Y-axispublic void setAutoRange()
setAutoRange in interface AxisLimitsControlPanelAPIpublic void setDisaggregationSelected(boolean isSelected)
isSelected - : True if disaggregation is selected , else falsepublic void parameterChange(ParameterChangeEvent event)
parameterChange in interface ParameterChangeListenerevent - protected void setButtonsEnable(boolean b)
b - protected void computeHazardCurve()
protected void handleForecastList(Site site,
Map<TectonicRegionType,ScalarIMR> imrMap,
BaseERF eqkRupForecast)
site - : Selected siteimr - : selected IMReqkRupForecast - : List of Eqk Rup forecastsprotected void probDeterSelectionChange()
e - protected void initIMR_GuiBean()
protected void initSiteGuiBean()
protected void initERF_GuiBean()
protected void initERFSelector_GuiBean()
protected void initCommonControlList()
protected void initControlList()
public ParameterList getCalcAdjustableParams()
getCalcAdjustableParams in interface CalculationSettingsControlPanelAPIRemoteExceptionpublic String getCalcParamMetadataString()
getCalcParamMetadataString in interface CalculationSettingsControlPanelAPIpublic String getSelectedIMT()
CurveDisplayAppAPI
getSelectedIMT in interface CurveDisplayAppAPIpublic SiteDataControlPanel getCVMControl()
protected void showControlPanel(String controlName)
protected void showControlPanel(ControlPanel control)
protected void initProbOrDeterList()
public org.jfree.data.Range getX_AxisRange()
ButtonControlPanelAPI
getX_AxisRange in interface ButtonControlPanelAPIpublic org.jfree.data.Range getY_AxisRange()
ButtonControlPanelAPI
getY_AxisRange in interface ButtonControlPanelAPIpublic void setCurveXValues()
setCurveXValues in interface CurveDisplayAppAPIpublic void setCurveXValues(ArbitrarilyDiscretizedFunc func)
setCurveXValues in interface CurveDisplayAppAPIfunc - public void addCurve(ArbitrarilyDiscretizedFunc function)
addCurve in interface CurveDisplayAppAPIfunction - ArbitrarilyDiscretizedFuncpublic void setPlotAllCurves(boolean drawAllCurves)
drawAllCurves - :True if all curves are to be drawn else falsepublic void setFractileOption(String fractileOption)
fractileOption - : Option selected by the user. It can be set by various
constant String values in ERF_EpistemicListControlPanelpublic void setAverageSelected(boolean isAvgSelected)
isAvgSelected - : true if avg is selected else falsepublic ButtonControlPanel getButtonControlPanel()
public void setX_Log(boolean xLog)
setX_Log in interface ButtonControlPanelAPIxLog - : booleanpublic void setY_Log(boolean yLog)
setY_Log in interface ButtonControlPanelAPIyLog - : booleanpublic boolean getXLog()
getXLog in interface GraphWindowAPIpublic boolean getYLog()
getYLog in interface GraphWindowAPIpublic boolean isCustomAxis()
isCustomAxis in interface GraphWindowAPIpublic double getUserMinX()
getUserMinX in interface GraphPanelAPIgetUserMinX in interface GraphWindowAPIpublic double getUserMaxX()
getUserMaxX in interface GraphPanelAPIgetUserMaxX in interface GraphWindowAPIpublic double getUserMinY()
getUserMinY in interface GraphPanelAPIgetUserMinY in interface GraphWindowAPIpublic double getUserMaxY()
getUserMaxY in interface GraphPanelAPIgetUserMaxY in interface GraphWindowAPIpublic String getXAxisLabel()
getXAxisLabel in interface ButtonControlPanelAPIgetXAxisLabel in interface GraphWindowAPIpublic String getYAxisLabel()
getYAxisLabel in interface ButtonControlPanelAPIgetYAxisLabel in interface GraphWindowAPIpublic String getPlotLabel()
getPlotLabel in interface ButtonControlPanelAPIpublic void setXAxisLabel(String xAxisLabel)
setXAxisLabel in interface ButtonControlPanelAPIpublic void setYAxisLabel(String yAxisLabel)
setYAxisLabel in interface ButtonControlPanelAPIpublic void setPlotLabel(String plotTitle)
setPlotLabel in interface ButtonControlPanelAPIpublic String getParametersInfoAsString()
public String getMapParametersInfoAsHTML()
public ArrayList<Object> getCurveFunctionList()
getCurveFunctionList in interface GraphWindowAPIprotected void peelOffCurves()
public ArrayList<PlotCurveCharacterstics> getPlottingFeatures()
getPlottingFeatures in interface ButtonControlPanelAPIgetPlottingFeatures in interface GraphWindowAPIpublic void print()
public GraphPanel getGraphPanel()
public String getDisaggregationPlot()
public String getSourceDisaggregationInfo()
public void addCybershakeCurveData(DiscretizedFunc function)
function - DiscretizedFuncAPIpublic void setCurveType(String calcType)
isDeterministic - boolean :If deterministic calculation then make the applicaton
to plot deterministic curves.public ArrayList<Double> getIML_Values()
public ERF_GuiBean getEqkRupForecastGuiBeanInstance()
public EqkRupSelectorGuiBean getEqkSrcRupSelectorGuiBeanInstance()
public Site_GuiBean getSiteGuiBeanInstance()
public IMT_NewGuiBean getIMTGuiBeanInstance()
public IMR_MultiGuiBean getIMRGuiBeanInstance()
public void updateSiteParams()
public void imrChange(ScalarIMRChangeEvent event)
ScalarIMRChangeListener
imrChange in interface ScalarIMRChangeListenerevent - The Event which triggered this function callpublic void setPlottingOrder(org.jfree.chart.plot.DatasetRenderingOrder order)
ButtonControlPanelAPI
setPlottingOrder in interface ButtonControlPanelAPI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||