|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.opensha.commons.gui.LabeledBoxPanel
org.opensha.sha.gui.beans.IMR_MultiGuiBean
public class IMR_MultiGuiBean
This is a completely re-written IMR selection GUI which allows for multiple IMRs to be selected and edited, one for each Tectonic Region Type.
| Nested Class Summary | |
|---|---|
class |
IMR_MultiGuiBean.ChooserComboBox
Internal sub-class for IMR chooser combo box |
class |
IMR_MultiGuiBean.EnableableCellRenderer
This class is the cell renderer for the drop down chooser boxes. |
| 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 JCheckBox |
singleIMRBox
|
protected static Font |
supportedTRTFont
|
protected static Font |
unsupportedTRTFont
|
| Fields inherited from class org.opensha.commons.gui.LabeledBoxPanel |
|---|
addDefault, borderColor, C, D, editorPanel, GBL, headerLabel, headerPanel, headerPanelBackgroundColor, jScrollPane1, title |
| 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 | |
|---|---|
IMR_MultiGuiBean(List<? extends ScalarIMR> imrs)
Initializes the GUI with the given list of IMRs |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
void |
addIMRChangeListener(ScalarIMRChangeListener listener)
|
protected IMR_MultiGuiBean.ChooserComboBox |
getChooser(TectonicRegionType trt)
|
Map<TectonicRegionType,ScalarIMR> |
getIMRMap()
This returns a clone of the current IMR map in the GUI. |
String |
getIMRMetadataHTML()
|
static String |
getIMRMetadataHTML(Map<TectonicRegionType,ScalarIMR> imrMap)
|
List<? extends ScalarIMR> |
getIMRs()
Returns the immutable List of IMRs used by this gui. |
Iterator<Parameter<?>> |
getMultiIMRSiteParamIterator()
This returns an iterator over all of the IMR params in the current IMR map |
static Iterator<Parameter<?>> |
getMultiIMRSiteParamIterator(HashMap<TectonicRegionType,ScalarIMR> imrMap)
This returns an iterator over all of the IMR params in the given IMR map |
NtoNMap<TectonicRegionType,ScalarIMR> |
getNtoNMap()
|
static NtoNMap<TectonicRegionType,ScalarIMR> |
getNtoNMap(Map<TectonicRegionType,ScalarIMR> imrMap)
|
protected IMR_ParamEditor |
getParamEdit()
|
ScalarIMR |
getSelectedIMR()
This returns the selected IMR if only a single one is selected. |
ArrayList<TectonicRegionType> |
getTectonicRegions()
|
void |
imtChange(IMTChangeEvent e)
This method will be called when the IMT is changed in an editor |
boolean |
isCheckBoxVisible()
|
boolean |
isIMREnabled(String imrName)
|
boolean |
isMultipleIMRs()
|
void |
rebuildGUI()
This rebuilds all components of the GUI for display |
void |
removeIMRChangeListener(ScalarIMRChangeListener listener)
|
void |
setIMR(String imrName,
TectonicRegionType trt)
|
void |
setIMT(Parameter<Double> newIMT)
Sets the IMT that this GUI should use. |
void |
setMaxChooserChars(int maxChooserChars)
Sets the number of characters that should be displayed in the chooser lists. |
void |
setMultipleIMRs(boolean multipleIMRs)
Sets the GUI to multiple/single IMR mode. |
void |
setMultipleIMRsEnabled(boolean enabled)
this enables/disables the multiple IMR check box. |
void |
setSelectedSingleIMR(String imrName)
Sets the GUI to single IMR mode, and sets the selected IMR to the given name. |
void |
setTectonicRegions(ArrayList<TectonicRegionType> regions)
This sets the tectonic regions for the GUI. |
void |
showParamEditor(TectonicRegionType trt)
In multiple IMR mode, shows the parameter editor for the IMR associated with the given tectonic region type. |
void |
updateIMRMap()
This updates the current in-memory IMR map (the one returned by getIMRMap()) |
| Methods inherited from class org.opensha.commons.gui.LabeledBoxPanel |
|---|
add, add, add, add, add, addPanel, getBorderColor, getHeaderPanelBackgroundColor, getTitle, jbInit, remove, remove, removeAll, setHeaderPanelBackgroundColor, setLayout, setTitle |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JCheckBox singleIMRBox
protected static final Font supportedTRTFont
protected static final Font unsupportedTRTFont
| Constructor Detail |
|---|
public IMR_MultiGuiBean(List<? extends ScalarIMR> imrs)
imrs - | Method Detail |
|---|
public void rebuildGUI()
public boolean isCheckBoxVisible()
public void setTectonicRegions(ArrayList<TectonicRegionType> regions)
regions - public ArrayList<TectonicRegionType> getTectonicRegions()
protected IMR_MultiGuiBean.ChooserComboBox getChooser(TectonicRegionType trt)
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic boolean isMultipleIMRs()
public void setMultipleIMRsEnabled(boolean enabled)
enabled - public ScalarIMR getSelectedIMR()
RuntimeException is thrown.
public void showParamEditor(TectonicRegionType trt)
trt - protected IMR_ParamEditor getParamEdit()
public Map<TectonicRegionType,ScalarIMR> getIMRMap()
public void updateIMRMap()
getIMRMap())
public void setMultipleIMRs(boolean multipleIMRs)
RundimeException is thrown.
The GUI will be updated, and IMR an change event will be fired as needed.
multipleIMRs - public void setSelectedSingleIMR(String imrName)
imrName -
public void setIMR(String imrName,
TectonicRegionType trt)
public void addIMRChangeListener(ScalarIMRChangeListener listener)
public void removeIMRChangeListener(ScalarIMRChangeListener listener)
public Iterator<Parameter<?>> getMultiIMRSiteParamIterator()
public static Iterator<Parameter<?>> getMultiIMRSiteParamIterator(HashMap<TectonicRegionType,ScalarIMR> imrMap)
imrMap -
public boolean isIMREnabled(String imrName)
public void setIMT(Parameter<Double> newIMT)
newIMT - - new IMT, or null to enable all IMRspublic List<? extends ScalarIMR> getIMRs()
List of IMRs used by this gui.
public NtoNMap<TectonicRegionType,ScalarIMR> getNtoNMap()
public static NtoNMap<TectonicRegionType,ScalarIMR> getNtoNMap(Map<TectonicRegionType,ScalarIMR> imrMap)
public static String getIMRMetadataHTML(Map<TectonicRegionType,ScalarIMR> imrMap)
public String getIMRMetadataHTML()
public void imtChange(IMTChangeEvent e)
IMTChangeListener
imtChange in interface IMTChangeListenerpublic void setMaxChooserChars(int maxChooserChars)
maxChooserChars -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||