org.opensha.sha.gui.beans
Class EqkRupSelectorGuiBean

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.sha.gui.beans.EqkRupSelectorGuiBean
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ParameterChangeListener

public class EqkRupSelectorGuiBean
extends JPanel
implements ParameterChangeListener

Title: Eqk Rupture Selector GuiBean

Description: This class will show ERF and its parameters. It will also allow the user to select a particular rupture for scenario maps.

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
: Nitin Gupta and Vipin Gupta
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 static String C
          Name of the class
static String CREATE_RUPTURE
           
protected static boolean D
           
static String RUPTURE_FROM_EXISTING_ERF
           
static String RUPTURE_SELECTOR_PARAM_NAME
           
 
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
EqkRupSelectorGuiBean()
           
EqkRupSelectorGuiBean(BaseERF erf, ERF_Ref... erfRefs)
           
EqkRupSelectorGuiBean(BaseERF erf, List<ERF_Ref> erfRefs)
           
EqkRupSelectorGuiBean(BaseERF erf, Set<ERF_Ref> erfRefSet)
           
EqkRupSelectorGuiBean(ERF_Ref... erfRefs)
           
EqkRupSelectorGuiBean(List<ERF_Ref> erfRefs)
          Constructor : It accepts the classNames of the ERFs to be shown in the editor
EqkRupSelectorGuiBean(Set<ERF_Ref> erfRefSet)
           
 
Method Summary
 EqkRupSelectorGuiBeanAPI getEqkRuptureSelectorPanel()
           
 Location getHypocenterLocation()
           
 Parameter getParameter(String paramName)
           
 ParameterEditor getParameterEditor(String paramName)
           
 String getParameterListMetadataString()
           
 EqkRupture getRupture()
           
 ERF getSelectedEqkRupForecastModel()
          Returns the instance of the EqkRupForecast from EqkRupFromERFSelector Panel
 ProbEqkSource getSource()
          This method has been added to view the selected source in Geo3D project.
 String getTimespanMetadataString()
           
 ParameterList getVisibleParameterList()
           
 ParameterListEditor getVisibleParameterListEditor()
           
 boolean isCustomRuptureSelected()
          Checks if custom rupture is selected
 void parameterChange(ParameterChangeEvent event)
          This is the main function of this interface.
 void setEqkRupForecastModel(BaseERF forecast)
          Sets the forecast model from the application inside this ERF_RupSelectorGuiBean to get the rupture.
 
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

C

protected static final String C
Name of the class

See Also:
Constant Field Values

D

protected static final boolean D
See Also:
Constant Field Values

RUPTURE_SELECTOR_PARAM_NAME

public static final String RUPTURE_SELECTOR_PARAM_NAME
See Also:
Constant Field Values

RUPTURE_FROM_EXISTING_ERF

public static final String RUPTURE_FROM_EXISTING_ERF
See Also:
Constant Field Values

CREATE_RUPTURE

public static final String CREATE_RUPTURE
See Also:
Constant Field Values
Constructor Detail

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean(BaseERF erf,
                             ERF_Ref... erfRefs)
                      throws InvocationTargetException
Throws:
InvocationTargetException

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean(BaseERF erf,
                             Set<ERF_Ref> erfRefSet)
                      throws InvocationTargetException
Throws:
InvocationTargetException

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean(BaseERF erf,
                             List<ERF_Ref> erfRefs)
                      throws InvocationTargetException
Throws:
InvocationTargetException

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean(ERF_Ref... erfRefs)
                      throws InvocationTargetException
Throws:
InvocationTargetException

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean(Set<ERF_Ref> erfRefSet)
                      throws InvocationTargetException
Throws:
InvocationTargetException

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean(List<ERF_Ref> erfRefs)
                      throws InvocationTargetException
Constructor : It accepts the classNames of the ERFs to be shown in the editor

Parameters:
erfClassNames -
Throws:
InvocationTargetException

EqkRupSelectorGuiBean

public EqkRupSelectorGuiBean()
                      throws InvocationTargetException
Throws:
InvocationTargetException
Method Detail

parameterChange

public void parameterChange(ParameterChangeEvent event)
This is the main function of this interface. 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
Parameters:
event -

setEqkRupForecastModel

public void setEqkRupForecastModel(BaseERF forecast)
Sets the forecast model from the application inside this ERF_RupSelectorGuiBean to get the rupture.

Parameters:
forecast - EqkRupForecastAPI

getHypocenterLocation

public Location getHypocenterLocation()
Returns:
the Hypocenter Location if selected else return null

getRupture

public EqkRupture getRupture()
Returns:
the EqkRupture Object

getSource

public ProbEqkSource getSource()
This method has been added to view the selected source in Geo3D project. Source is only available from ERF. If user is making a custom rupture, source is not available.

Returns:
ProbEqkSource object

getTimespanMetadataString

public String getTimespanMetadataString()
Returns:
the timespan Metadata for the selected Rupture. If no timespan exists for the rupture then it returns the Message: "No Timespan exists for the selected Rupture".

getParameterListMetadataString

public String getParameterListMetadataString()
Returns:
the Metadata String of parameters that constitute the making of this ERF_RupSelectorGUI bean.

getParameter

public Parameter getParameter(String paramName)
Parameters:
paramName -
Returns:
the parameter from list of visible parameters in the rupture selector/creator GUI.

getParameterEditor

public ParameterEditor getParameterEditor(String paramName)
Parameters:
paramName -
Returns:
the ParameterEditor associated with paramName

getEqkRuptureSelectorPanel

public EqkRupSelectorGuiBeanAPI getEqkRuptureSelectorPanel()
Returns:
the instance to the Selected mode of Rupture calculator. If user has chosen to get the Eqk rupture from ERF model,then the returned EqkRupSelectorGuiBeanAPI will the instance of EqkRuptureFromERFSelectorPanel. Else if the user to selected to create his own rupture then returned API will be the instance of EqkRuptureCreationPanel.

isCustomRuptureSelected

public boolean isCustomRuptureSelected()
Checks if custom rupture is selected

Returns:
boolean

getSelectedEqkRupForecastModel

public ERF getSelectedEqkRupForecastModel()
Returns the instance of the EqkRupForecast from EqkRupFromERFSelector Panel

Returns:
ERF_API

getVisibleParameterList

public ParameterList getVisibleParameterList()
Returns:
the visible parameters in the list

getVisibleParameterListEditor

public ParameterListEditor getVisibleParameterListEditor()
Returns:
the parameterlist editor