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:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ParameterChangeListener, AnalysisOptionsGuiBeanAPI

public class UHS_GuiBean
extends 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
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
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
protected  ProbabilisticHazardApplicationAPI application
           
protected  boolean approxUHS_Calculated
           
protected  DataGeneratorAPI_UHS dataGenerator
           
protected  DataSetSelectionGuiBean datasetGui
           
protected static String GROUND_MOTION_PARAM_NAME
           
protected  StringParameter groundMotionParam
           
protected  ConstrainedStringParameterEditor groundMotionParamEditor
           
protected  BatchLocationBean locGuiBean
           
protected  boolean sdSpectrumCalculated
           
protected  String selectedEdition
           
protected  String selectedRegion
           
protected  boolean smSpectrumCalculated
           
protected  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
 String getData()
           
protected  void getDataForSA_Period()
          Gets the SA Period and Values from datafiles
 JPanel getGuiBean()
          Returns the instance of itself
protected  Region getRegionConstraint()
           
 String getSelectedDataEdition()
          Returns the selected data edition
 String getSelectedRegion()
          Returns the selected Region
protected  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(ActionEvent actionEvent)
           
protected  void viewUHSButton_actionPerformed(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 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 String selectedRegion

selectedEdition

protected String selectedEdition

spectraType

protected String spectraType
Constructor Detail

UHS_GuiBean

public UHS_GuiBean(ProbabilisticHazardApplicationAPI api)
Method Detail

createGroundMotionParameter

protected void createGroundMotionParameter()

getSupportedSpectraTypes

protected ArrayList getSupportedSpectraTypes()

jbInit

protected void jbInit()
               throws Exception
Throws:
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 String getSelectedRegion()
Returns the selected Region

Specified by:
getSelectedRegion in interface AnalysisOptionsGuiBeanAPI
Returns:
String

getSelectedDataEdition

public 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 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,
                                   RemoteException
Gets the SA Period and Values from datafiles

Throws:
ZipCodeErrorException
LocationErrorException
RemoteException

uhsButton_actionPerformed

protected void uhsButton_actionPerformed(ActionEvent actionEvent)

getData

public 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(ActionEvent actionEvent)
Parameters:
actionEvent - ActionEvent