|
||||||||||
| 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.sra.gui.LossEstimationApplication
public class LossEstimationApplication
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 | |
|---|---|
LossEstimationApplication()
|
|
| Method Summary | |
|---|---|
protected void |
addButton()
this function is called to draw the graph |
void |
addCurve(ArbitrarilyDiscretizedFunc function)
Sets ArbitraryDiscretizedFunc inside list containing all the functions. |
void |
closeButton_actionPerformed(ActionEvent actionEvent)
|
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 |
static List<AbstractVulnerability> |
fetchVulns()
|
protected Component |
getApplicationComponent()
|
static ApplicationVersion |
getAppVersion()
Returns the Application version |
ArrayList |
getCurveFunctionList()
|
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. |
String |
getMapParametersInfoAsHTML()
|
String |
getParametersInfoAsString()
|
String |
getPlotLabel()
|
ArrayList |
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. |
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()
|
void |
init()
|
protected void |
initControlList()
Initialize the items to be added to the control list |
protected void |
initERF_GuiBean()
Initialize the ERF Gui Bean |
protected void |
initIMR_GuiBean()
Initialize the IMR Gui Bean |
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()
Creates a print job for the chart. |
void |
printButton_actionPerformed(ActionEvent actionEvent)
|
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 |
save()
Opens a file chooser and gives the user an opportunity to save the chart in PNG format. |
void |
saveButton_actionPerformed(ActionEvent actionEvent)
|
void |
setAutoRange()
set the auto range for the axis. |
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 |
setCurveXValues()
Set the default X Values for the Hazard Curve for the selected IMT. |
void |
setCurveXValues(ArbitrarilyDiscretizedFunc func)
Set the X Values from the ArbitrarilyDiscretizedFunc passed as the parameter |
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 |
void |
togglePlot()
Toggles between the Graph and the Data Window |
void |
updateIM()
Updates the IMT_GuiBean to reflect the chnaged IM for the selected AttenuationRelationship. |
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 static final boolean D
protected ERF_GuiBean erfGuiBean
protected IMR_GuiBean imrGuiBean
protected Site_GuiBean siteGuiBean
protected VulnerabilityBean vulnBean
protected String xAxisName
protected String yAxisName
protected static final String CONTROL_PANELS
protected static final String DISTANCE_CONTROL
protected static final String SITES_OF_INTEREST_CONTROL
protected static final String CVM_CONTROL
protected static final String XY_Values_Control
protected PEER_TestCaseSelectorControlPanel peerTestsControlPanel
protected SetMinSourceSiteDistanceControlPanel distanceControlPanel
protected SitesOfInterestControlPanel sitesOfInterest
protected SetSiteParamsFromWebServicesControlPanel cvmControlPanel
protected XY_ValuesControlPanel xyPlotControl
protected Insets defaultInsets
protected static final int W
protected static final int H
protected ArrayList functionList
protected String TITLE
protected CalcProgressBar startAppProgressClass
protected JButton cancelCalcButton
protected static ApplicationVersion version
protected static final String versionURL
protected static final String appURL
protected static final String versionUpdateInfoURL
| Constructor Detail |
|---|
public LossEstimationApplication()
| Method Detail |
|---|
public static ApplicationVersion getAppVersion()
public static List<AbstractVulnerability> fetchVulns()
throws IOException
IOExceptionpublic void init()
protected void jbInit()
throws Exception
Exceptionpublic static void main(String[] args)
public void togglePlot()
ButtonControlPanelAPI
togglePlot in interface ButtonControlPanelAPIpublic void run()
run in interface Runnableprotected void createCalcInstance()
protected void addButton()
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 parameterChange(ParameterChangeEvent event)
parameterChange in interface ParameterChangeListenerevent - protected void setButtonsEnable(boolean b)
b - protected void computeHazardCurve()
protected void initIMR_GuiBean()
protected void initSiteGuiBean()
protected void initERF_GuiBean()
protected void initControlList()
public void updateIM()
updateIM in interface IMR_GuiBeanAPIpublic 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 addCurve(ArbitrarilyDiscretizedFunc function)
addCurve in interface CurveDisplayAppAPIfunction - ArbitrarilyDiscretizedFuncpublic 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 getCurveFunctionList()
getCurveFunctionList in interface GraphWindowAPIprotected void peelOffCurves()
public ArrayList getPlottingFeatures()
getPlottingFeatures in interface ButtonControlPanelAPIgetPlottingFeatures in interface GraphWindowAPI
public void save()
throws IOException
IOException - if there is an I/O error.public void print()
public void closeButton_actionPerformed(ActionEvent actionEvent)
public void printButton_actionPerformed(ActionEvent actionEvent)
public void saveButton_actionPerformed(ActionEvent actionEvent)
public ERF_GuiBean getEqkRupForecastGuiBeanInstance()
public Site_GuiBean getSiteGuiBeanInstance()
public void updateSiteParams()
updateSiteParams in interface IMR_GuiBeanAPIpublic String getSelectedIMT()
CurveDisplayAppAPI
getSelectedIMT in interface CurveDisplayAppAPIpublic void setCurveXValues(ArbitrarilyDiscretizedFunc func)
CurveDisplayAppAPI
setCurveXValues in interface CurveDisplayAppAPIpublic void setCurveXValues()
CurveDisplayAppAPI
setCurveXValues in interface CurveDisplayAppAPIpublic 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 | |||||||||