org.opensha.nshmp.sha.gui.beans
Class UHS_GuiBean

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.opensha.nshmp.sha.gui.beans.UHS_GuiBean
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, ParameterChangeListener, AnalysisOptionsGuiBeanAPI

public class UHS_GuiBean
extends javax.swing.JPanel
implements ParameterChangeListener, AnalysisOptionsGuiBeanAPI

Title: UHS_GuiBean

Description: This option sets the parameter for the NEHRP analysis option.

Version:
1.0
Author:
Ned Field, Nitin Gupta and E.V.Leyendecker
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  ProbabilisticHazardApplicationAPI application
           
protected  boolean approxUHS_Calculated
           
protected  DataGeneratorAPI_UHS dataGenerator
           
protected  DataSetSelectionGuiBean datasetGui
           
protected static java.lang.String GROUND_MOTION_PARAM_NAME
           
protected  StringParameter groundMotionParam
           
protected  ConstrainedStringParameterEditor groundMotionParamEditor
           
protected  BatchLocationBean locGuiBean
           
protected  boolean sdSpectrumCalculated
           
protected  java.lang.String selectedEdition
           
protected  java.lang.String selectedRegion
           
protected  boolean smSpectrumCalculated
           
protected  java.lang.String spectraType
           
protected  boolean uhsCalculated
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
UHS_GuiBean(ProbabilisticHazardApplicationAPI api)
           
 
Method Summary
 void clearData()
          Removes all the output from the window
protected  void createEditionSelectionParameter()
          Creates the Parameter that allows user to select the Editions based on the selected Analysis and choosen geographic region.
protected  void createGeographicRegionSelectionParameter()
          Creating the parameter that allows user to choose the geographic region list if selected Analysis option is NEHRP.
protected  void createGroundMotionParameter()
           
protected  void createLocation()
          Creating the location gui bean
 java.lang.String getData()
           
protected  void getDataForSA_Period()
          Gets the SA Period and Values from datafiles
 javax.swing.JPanel getGuiBean()
          Returns the instance of itself
protected  Region getRegionConstraint()
           
 java.lang.String getSelectedDataEdition()
          Returns the selected data edition
 java.lang.String getSelectedRegion()
          Returns the selected Region
protected  java.util.ArrayList getSupportedSpectraTypes()
           
protected  void jbInit()
           
 void parameterChange(ParameterChangeEvent event)
          If GuiBean parameter is changed.
protected  void setButtonsEnabled(boolean enableButtons)
           
protected  void setSiteCoeff()
          This function pops up the site coefficient window and allows user to set Site coefficient for the calculation.
protected  void uhsButton_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
protected  void viewUHSButton_actionPerformed(java.awt.event.ActionEvent actionEvent)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

datasetGui

protected DataSetSelectionGuiBean datasetGui

locGuiBean

protected BatchLocationBean locGuiBean

groundMotionParam

protected StringParameter groundMotionParam

groundMotionParamEditor

protected ConstrainedStringParameterEditor groundMotionParamEditor

GROUND_MOTION_PARAM_NAME

protected static final java.lang.String GROUND_MOTION_PARAM_NAME
See Also:
Constant Field Values

dataGenerator

protected DataGeneratorAPI_UHS dataGenerator

application

protected ProbabilisticHazardApplicationAPI application

smSpectrumCalculated

protected boolean smSpectrumCalculated

sdSpectrumCalculated

protected boolean sdSpectrumCalculated

uhsCalculated

protected boolean uhsCalculated

approxUHS_Calculated

protected boolean approxUHS_Calculated

selectedRegion

protected java.lang.String selectedRegion

selectedEdition

protected java.lang.String selectedEdition

spectraType

protected java.lang.String spectraType
Constructor Detail

UHS_GuiBean

public UHS_GuiBean(ProbabilisticHazardApplicationAPI api)
Method Detail

createGroundMotionParameter

protected void createGroundMotionParameter()

getSupportedSpectraTypes

protected java.util.ArrayList getSupportedSpectraTypes()

jbInit

protected void jbInit()
               throws java.lang.Exception
Throws:
java.lang.Exception

setButtonsEnabled

protected void setButtonsEnabled(boolean enableButtons)

clearData

public void clearData()
Removes all the output from the window

Specified by:
clearData in interface AnalysisOptionsGuiBeanAPI

getSelectedRegion

public java.lang.String getSelectedRegion()
Returns the selected Region

Specified by:
getSelectedRegion in interface AnalysisOptionsGuiBeanAPI
Returns:
String

getSelectedDataEdition

public java.lang.String getSelectedDataEdition()
Returns the selected data edition

Specified by:
getSelectedDataEdition in interface AnalysisOptionsGuiBeanAPI
Returns:
String

parameterChange

public void parameterChange(ParameterChangeEvent event)
If GuiBean parameter is changed.

Specified by:
parameterChange in interface ParameterChangeListener
Parameters:
event - ParameterChangeEvent

getGuiBean

public javax.swing.JPanel getGuiBean()
Returns the instance of itself

Specified by:
getGuiBean in interface AnalysisOptionsGuiBeanAPI
Returns:
JPanel

createLocation

protected void createLocation()
Creating the location gui bean


getRegionConstraint

protected Region getRegionConstraint()
Returns:
RectangularGeographicRegion

createEditionSelectionParameter

protected void createEditionSelectionParameter()
Creates the Parameter that allows user to select the Editions based on the selected Analysis and choosen geographic region.


createGeographicRegionSelectionParameter

protected void createGeographicRegionSelectionParameter()
                                                 throws AnalysisOptionNotSupportedException
Creating the parameter that allows user to choose the geographic region list if selected Analysis option is NEHRP.

Throws:
AnalysisOptionNotSupportedException

getDataForSA_Period

protected void getDataForSA_Period()
                            throws ZipCodeErrorException,
                                   LocationErrorException,
                                   java.rmi.RemoteException
Gets the SA Period and Values from datafiles

Throws:
ZipCodeErrorException
LocationErrorException
java.rmi.RemoteException

uhsButton_actionPerformed

protected void uhsButton_actionPerformed(java.awt.event.ActionEvent actionEvent)

getData

public java.lang.String getData()
Specified by:
getData in interface AnalysisOptionsGuiBeanAPI
Returns:
String

setSiteCoeff

protected void setSiteCoeff()
This function pops up the site coefficient window and allows user to set Site coefficient for the calculation.


viewUHSButton_actionPerformed

protected void viewUHSButton_actionPerformed(java.awt.event.ActionEvent actionEvent)
Parameters:
actionEvent - ActionEvent