|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.sha.imr.attenRelImpl.gui.AttenuationRelationshipGuiBean
public class AttenuationRelationshipGuiBean
Title: AttenuationRelationshipGuiBean
Description: This class is a java bean container for all the Gui elements and controller elements for one particular AttenuationRelationship. This allows all the components to be packaged up in this one class and then for every AttenuationRelationship that is created there will be one instance of this bean. This allows these beans to be easily swapped in and out when you are examining different AttenuationRelationship's in the main tester applet application.
BJF_1997_AttenRel,
AS_1997_AttenRel| Field Summary | |
|---|---|
protected ScalarIMR |
attenRel
The AttenuationRelationship is what will perform the exceedence probability calculations as needed by the Gui. |
protected static String |
C
|
protected ParameterListEditor |
controlsEditor
This is the paramater list editor that contains all the control paramaters such as x axis y axis. |
protected ParameterList |
controlsParamList
Parameters that control the graphing gui, specifically the IM Types picklist, the Y-axis options picklist, and the X-axis options picklist. |
protected static boolean |
D
|
static int |
EXCEED_PROB
|
static int |
IM
|
static String |
IM_NAME
|
static int |
IML_AT_EXCEED_PROB
|
protected ParameterList |
independentParams
ParameterList of all independent parameters |
protected ParameterListEditor |
independentsEditor
This is the paramater list editor that contains all the independent paramaters depending on which x axis and y axis are chosen some paramaters will be made visible or invisible. |
static int |
MEAN
|
protected String |
name
Just a placeholder name for this particular AttenuationRelationshipGUI Bean. |
protected Parameter |
selectedIM
Placeholder for currently selected IM |
static int |
STD_DEV
|
protected ArrayList |
translatedList
|
static int |
X_AXIS
|
static String |
X_AXIS_NAME
|
static String |
X_AXIS_SINGLE_VAL
|
static int |
Y_AXIS
|
static String |
Y_AXIS_NAME
|
static String |
Y_AXIS_V1
|
static String |
Y_AXIS_V2
|
static String |
Y_AXIS_V3
|
static String |
Y_AXIS_V4
|
protected static HashMap |
yAxisMap
|
| Constructor Summary | |
|---|---|
AttenuationRelationshipGuiBean(String className,
String name,
AttenuationRelationshipApplet applet)
Constructor for the AttenuationRelationshipGuiBean object. |
|
| Method Summary | |
|---|---|
static Object |
createAttenRelClassInstance(String className,
ParameterChangeWarningListener listener)
Creates a class instance from a string of the full class name including packages. |
ScalarIMR |
getAttenRel()
Gets the attenRel attribute of the AttenuationRelationshipGuiBean object |
DiscretizedFunc |
getChoosenFunction()
Controller function. |
double |
getChosenValue()
This method is very similar to the getChoosenFunction(), but only varies in the fact that it return back single double value where as getChoosenfunction returns a function. |
ParameterListEditor |
getControlsEditor()
Gets the controlsEditor attribute of the AttenuationRelationshipGuiBean object |
ListIterator |
getControlsIterator()
Returns the iterator over all controls parameters, such as x and y axis values. |
protected String |
getGraphControlsParamValue(int type)
Returns the value of a graph picklist control as a string, dermined by type. |
String |
getGraphIMYAxisLabel()
Builds the Y-Axis Name, which may include units, and includes the IM Type choosen, either "SA" or "PGM". |
String |
getGraphXAxisLabel()
Returns which X-Axis were choosen, appending the units if present in the parameter. |
String |
getGraphXYAxisTitle()
Builds a Plot title string of the form "y-axis label vs. |
ParameterListEditor |
getIndependentsEditor()
Gets the independentsEditor attribute of the AttenuationRelationshipGuiBean object |
URL |
getInfoURL()
|
String |
getName()
Gets the name attribute of the AttenuationRelationshipGuiBean object |
Parameter |
getSelectedIMParam()
Used by the GUI to get the selected Intensity Measure |
protected void |
initControlsParamListAndEditor(AttenuationRelationshipApplet applet)
FIX *** FIX *** FIX This needs to be fixed along with the whole function package. |
boolean |
isTranslateAttenRel()
|
void |
parameterChange(ParameterChangeEvent event)
This is the main function of this interface. |
void |
parameterChangeFailed(ParameterChangeFailEvent event)
Function that must be implemented by all Listeners for ParameterChangeFailEvents. |
void |
refreshParamEditor()
Resets all GUI controls back to the model values. |
protected void |
setIgnoreWarnings(boolean ignoreWarning)
|
void |
setName(String newName)
Sets the name attribute of the AttenuationRelationshipGuiBean object |
void |
setTranslateAttenRel(boolean translateAttenRel)
|
protected void |
synchRequiredVisibleParameters()
Description of the Method |
protected void |
toggleSigmaLevelBasedOnTypeValue(String value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
public static final String IM_NAME
public static final String X_AXIS_NAME
public static final String Y_AXIS_NAME
public static final String Y_AXIS_V1
public static final String Y_AXIS_V2
public static final String Y_AXIS_V3
public static final String Y_AXIS_V4
public static final String X_AXIS_SINGLE_VAL
public static final int MEAN
public static final int STD_DEV
public static final int EXCEED_PROB
public static final int IML_AT_EXCEED_PROB
public static final int IM
public static final int Y_AXIS
public static final int X_AXIS
protected static HashMap yAxisMap
protected ScalarIMR attenRel
protected ParameterListEditor controlsEditor
protected ParameterListEditor independentsEditor
protected String name
protected ParameterList controlsParamList
protected Parameter selectedIM
protected ParameterList independentParams
protected ArrayList translatedList
| Constructor Detail |
|---|
public AttenuationRelationshipGuiBean(String className,
String name,
AttenuationRelationshipApplet applet)
className - Fully qualified package and class name of the AttenRel
classname - Placeholder name for this Gui bean so it could be
referenced in a hash table or hash map.applet - The main applet application that will use these beans
to swap in and out different AttenuationRelationship's.| Method Detail |
|---|
public URL getInfoURL()
throws MalformedURLException
MalformedURLException - if returned URL is not a valid URL.
public static Object createAttenRelClassInstance(String className,
ParameterChangeWarningListener listener)
BJF_1997_AttenRel attenRel = new BJF_1997_AttenRel()
If your not sure the user wants this one or AS_1997_AttenRel you can use this function instead to create the same class by:
BJF_1997_AttenRel attenRel =
(BJF_1997_AttenRel)ClassUtils.createNoArgConstructorClassInstance("org.opensha.sha.imt.attenRelImpl.BJF_1997_AttenRel");
public void setName(String newName)
newName - The new name valuepublic ListIterator getControlsIterator()
public Parameter getSelectedIMParam()
public String getName()
getName in interface Namedpublic ScalarIMR getAttenRel()
public ParameterListEditor getControlsEditor()
public ParameterListEditor getIndependentsEditor()
protected String getGraphControlsParamValue(int type)
throws ParameterException
type - 1 for Intensity Measure Choice, 2 for Y-Axis
choice and 3 for X-Axis choice.
ParameterException - Thrown if an invalid type, must be 1-3.public String getGraphIMYAxisLabel()
public String getGraphXAxisLabel()
public String getGraphXYAxisTitle()
throws ConstraintException
ConstraintException - Description of the Exceptionprotected void setIgnoreWarnings(boolean ignoreWarning)
public DiscretizedFunc getChoosenFunction()
throws ConstraintException
ConstraintException - Description of the Exceptionpublic double getChosenValue()
public void refreshParamEditor()
public void parameterChange(ParameterChangeEvent event)
parameterChange in interface ParameterChangeListenerevent - protected void toggleSigmaLevelBasedOnTypeValue(String value)
protected void initControlsParamListAndEditor(AttenuationRelationshipApplet applet)
One thing to note is that all graph constrols in this list are Parameters with String constraints.
Then a new controls paramater editor list for these paramaters are created.
applet - Description of the Parameter
protected void synchRequiredVisibleParameters()
throws ParameterException
ParameterException - Description of the Exceptionpublic void setTranslateAttenRel(boolean translateAttenRel)
public boolean isTranslateAttenRel()
public void parameterChangeFailed(ParameterChangeFailEvent event)
ParameterChangeFailListener
parameterChangeFailed in interface ParameterChangeFailListenerevent - The Event which triggered this function call
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||