org.opensha.sha.gcim.ui
Class GcimEditIMiControlPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by org.opensha.sha.gcim.ui.GcimEditIMiControlPanel
All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, ParameterChangeListener, IMCorrRelChangeListener, IMTChangeListener, ScalarIMRChangeListener

public class GcimEditIMiControlPanel
extends JFrame
implements ParameterChangeListener, ActionListener, ScalarIMRChangeListener, IMTChangeListener, IMCorrRelChangeListener

Title: GcimEditImiControlPanel

Description: This Control Panel allows a single IMi for which a GCIM distribution is desired to be specified. This includes the specification of the IMi's IMR, IMT, IMCorrRel, and site params

Version:
1.0
Author:
Brendon Bradley July 2010
See Also:
Serialized Form

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
 
Field Summary
protected static String appURL
           
protected static boolean D
           
protected  ArrayList<Object> functionList
          List of ArbitrarilyDiscretized functions and Weighted funstions
protected  IMCorrRel_MultiGuiBean imCorrRelGuiBean
           
protected  IMR_MultiGuiBean imrGuiBean
           
protected  GcimSite_GuiBean siteGuiBean
           
protected  CalcProgressBar startAppProgressClass
           
protected static String versionUpdateInfoURL
           
protected static String versionURL
           
 
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
GcimEditIMiControlPanel(GcimControlPanel parent, Component parentComponent, int imiIndex)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void getGcimSite()
          This gets the GCIM site object
 int getImiIndex()
          This gets the current imiIndex
 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_GcimGuiBean 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.
 Parameter<Double> getIMTSelectedInIMTGUI()
          THis methods returns the IM parameter which is currently selected in the IMT GUI
 ArrayList<String> getParentIMiList()
          This method gets the current IMiNames list from the GcimControl Panel
 Parameter<Double> getParentIMjName()
          This method gets the IMjName from the main hazard calcs, used to determine which other IMj are allowable
 void getParentSite()
          This gets the parent site object which are defined in the hazard curve calculator
 Parameter<Double> getSelectedIM()
           
 Map<TectonicRegionType,ImCorrelationRelationship> getSelectedIMCorrRelMap()
          This returns the selected IMCorrRel map
 ArrayList<? extends Map<TectonicRegionType,ImCorrelationRelationship>> getSelectedIMikjCorrRelMap()
          This returns the selected IMikCorrRel map
 Map<TectonicRegionType,ScalarIMR> getSelectedIMRMap()
          This returns the selected IMR map
 String getSelectedIMT()
           
 void imCorrRelChange(IMCorrRelChangeEvent event)
          Function that must be implemented by all Listeners for ImCorrelationRelationChangeEvents.
 void imrChange(ScalarIMRChangeEvent event)
          Function that must be implemented by all Listeners for AttenuationRelationshipChangeEvents.
 void imtChange(IMTChangeEvent e)
          This method will be called when the IMT is changed in an editor
 void init()
          This method initialises the applet assuming no prior information
 void init(int index)
          This method initalizes the applet using information which has been previously input
protected  void initIMCorrRel_GuiBean()
          Initialize the IMCorrRel Gui Bean
protected  void initIMR_GuiBean()
          Initialize the IMR Gui Bean
protected  void initSiteGuiBean()
          Initialize the site gui bean
protected  void jbInit()
           
 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.
 boolean setDefaultIMCorrRelinGUI()
          This method gets the first IMCorrRel which supports the default IMi and IMj
 boolean setDefaultIMikCorrRelinGUI()
          This method gets the first IMikCorrRel which supports the default IMi and IMk
 boolean setDefaultIMikCorrRelinGUI(int index, String imkName)
          This method gets the first IMCorrRel which supports the default IMi and IMk
 boolean setDefaultIMRinGUI()
          This method gets the first IMR which supports the default IMi
protected  void setImtPanel(ParameterListEditor panel, double resizeWeight)
          Provided to allow subclasses to substitute the IMT panel.
 void updateGcimSite(Site gcimSite)
          This updates the parameters of the GCIM site object
 void updateSiteParams()
          Updates the Site_GuiBean to reflect the chnaged SiteParams for the selected AttenuationRelationship.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
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.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
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

D

protected static final boolean D
See Also:
Constant Field Values

functionList

protected ArrayList<Object> functionList
List of ArbitrarilyDiscretized functions and Weighted funstions


imrGuiBean

protected IMR_MultiGuiBean imrGuiBean

imCorrRelGuiBean

protected IMCorrRel_MultiGuiBean imCorrRelGuiBean

siteGuiBean

protected GcimSite_GuiBean siteGuiBean

startAppProgressClass

protected CalcProgressBar startAppProgressClass

versionURL

protected static final String versionURL
See Also:
Constant Field Values

appURL

protected static final String appURL
See Also:
Constant Field Values

versionUpdateInfoURL

protected static final String versionUpdateInfoURL
See Also:
Constant Field Values
Constructor Detail

GcimEditIMiControlPanel

public GcimEditIMiControlPanel(GcimControlPanel parent,
                               Component parentComponent,
                               int imiIndex)
Method Detail

init

public void init(int index)
This method initalizes the applet using information which has been previously input

Parameters:
imiNum - - the imiNum for which the applet is to be created for

init

public void init()
This method initialises the applet assuming no prior information


jbInit

protected void jbInit()
               throws Exception
Throws:
Exception

setDefaultIMRinGUI

public boolean setDefaultIMRinGUI()
This method gets the first IMR which supports the default IMi

Returns:

setDefaultIMikCorrRelinGUI

public boolean setDefaultIMikCorrRelinGUI()
This method gets the first IMikCorrRel which supports the default IMi and IMk

Returns:

setDefaultIMCorrRelinGUI

public boolean setDefaultIMCorrRelinGUI()
This method gets the first IMCorrRel which supports the default IMi and IMj

Returns:

setDefaultIMikCorrRelinGUI

public boolean setDefaultIMikCorrRelinGUI(int index,
                                          String imkName)
This method gets the first IMCorrRel which supports the default IMi and IMk

Returns:

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

setImtPanel

protected void setImtPanel(ParameterListEditor panel,
                           double resizeWeight)
Provided to allow subclasses to substitute the IMT panel.


parameterChange

public 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. 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 -

initIMR_GuiBean

protected void initIMR_GuiBean()
Initialize the IMR Gui Bean


initIMCorrRel_GuiBean

protected void initIMCorrRel_GuiBean()
Initialize the IMCorrRel Gui Bean


initSiteGuiBean

protected void initSiteGuiBean()
Initialize the site gui bean


getSelectedIMT

public String getSelectedIMT()
Returns:
the selected IMiType

getSelectedIM

public Parameter<Double> getSelectedIM()
Returns:
the selected IMi

getSelectedIMRMap

public Map<TectonicRegionType,ScalarIMR> getSelectedIMRMap()
This returns the selected IMR map


getSelectedIMCorrRelMap

public Map<TectonicRegionType,ImCorrelationRelationship> getSelectedIMCorrRelMap()
This returns the selected IMCorrRel map


getSelectedIMikjCorrRelMap

public ArrayList<? extends Map<TectonicRegionType,ImCorrelationRelationship>> getSelectedIMikjCorrRelMap()
This returns the selected IMikCorrRel map


getIMTGuiBeanInstance

public IMT_GcimGuiBean 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.


getIMRGuiBeanInstance

public 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.


updateSiteParams

public void updateSiteParams()
Updates the Site_GuiBean to reflect the chnaged SiteParams for the selected AttenuationRelationship. This method is called from the IMR_GuiBean to update the application with the Attenuation's Site Params.


imrChange

public void imrChange(ScalarIMRChangeEvent event)
Description copied from interface: ScalarIMRChangeListener
Function that must be implemented by all Listeners for AttenuationRelationshipChangeEvents.

Specified by:
imrChange in interface ScalarIMRChangeListener
Parameters:
event - The Event which triggered this function call

imCorrRelChange

public void imCorrRelChange(IMCorrRelChangeEvent event)
Description copied from interface: IMCorrRelChangeListener
Function that must be implemented by all Listeners for ImCorrelationRelationChangeEvents.

Specified by:
imCorrRelChange in interface IMCorrRelChangeListener
Parameters:
event - The Event which triggered this function call

imtChange

public void imtChange(IMTChangeEvent e)
Description copied from interface: IMTChangeListener
This method will be called when the IMT is changed in an editor

Specified by:
imtChange in interface IMTChangeListener

getParentSite

public void getParentSite()
This gets the parent site object which are defined in the hazard curve calculator


getImiIndex

public int getImiIndex()
This gets the current imiIndex


getGcimSite

public void getGcimSite()
This gets the GCIM site object


updateGcimSite

public void updateGcimSite(Site gcimSite)
This updates the parameters of the GCIM site object


getParentIMjName

public Parameter<Double> getParentIMjName()
This method gets the IMjName from the main hazard calcs, used to determine which other IMj are allowable


getParentIMiList

public ArrayList<String> getParentIMiList()
This method gets the current IMiNames list from the GcimControl Panel


getIMTSelectedInIMTGUI

public Parameter<Double> getIMTSelectedInIMTGUI()
THis methods returns the IM parameter which is currently selected in the IMT GUI