org.opensha.sha.param.editor
Interface MagDistParameterEditorAPI

All Known Implementing Classes:
MagFreqDistParameterEditor, MagPDF_ParameterEditor

public interface MagDistParameterEditorAPI

Title: MagDistParameterEditorAPI

Description: Both Mag_FreqDistParameterEditor and MagPDF_ParameterEditor implements this API, thus both can provide their own implementation of the methods.

Since:
April 14,2006
Version:
1.0
Author:
Nitin Gupta

Method Summary
 ParameterListEditor createMagFreqDistParameterEditor()
          Clones the Mag ParamList and the makes the parameters visible based on the selected Distribution.
 java.lang.String getMagDistName()
          returns the MagDistName
 ParameterListEditor getMagFreqDistParameterEditor()
          Function that returns the magFreDist Param as a parameterListeditor so that user can display it as the panel in window rather then button.
 double getMax()
          returns the Max of the magnitude for thr distribution
 double getMin()
          returns the Min of the magnitude for the distribution
 int getNum()
          returns the Number of magnitudes for the Distribution
 Parameter getParameter()
          Sets the parameter that is stored internally for this GUI widget to edit
 Parameter getParameter(java.lang.String name)
          Returns each parameter for the MagFreqDist
 ParameterList getParameterList()
          returns the parameterlist
 ParameterList getParamterList()
          returns the ParamterList for the MagfreqDistParameter
 void refreshParamEditor()
          Called when the parameter has changed independently from the editor, such as with the ParameterWarningListener.
 void setMagDistFromParams()
          Controller function.
 void setMagDistFromParams(SummedMagFreqDist summedDist, java.lang.String metadata)
          Sets the MagDistParam to be SummedMagFreqDist
 void setMagFreqDistParamButtonVisible(boolean visible)
          Checks whether you want to show the Mag Freq Dist Param Editor as button or a panel This function mostly come in handy if instead of displaying this parameter as the button user wants to show it as the Parameterlist in the panel.
 void setParameter(Parameter model)
          Returns the parameter that is stored internally that this GUI widget is editing
 void setSummedDistPlotted(boolean sumDistPlotted)
          Sets the Summed Dist plotted to be false or true based on
 

Method Detail

setParameter

void setParameter(Parameter model)
Returns the parameter that is stored internally that this GUI widget is editing


setMagFreqDistParamButtonVisible

void setMagFreqDistParamButtonVisible(boolean visible)
Checks whether you want to show the Mag Freq Dist Param Editor as button or a panel This function mostly come in handy if instead of displaying this parameter as the button user wants to show it as the Parameterlist in the panel.

Parameters:
visible - : If it it true, button is visible else not visible By default it is visible

createMagFreqDistParameterEditor

ParameterListEditor createMagFreqDistParameterEditor()
Clones the Mag ParamList and the makes the parameters visible based on the selected Distribution.

Returns:

setSummedDistPlotted

void setSummedDistPlotted(boolean sumDistPlotted)
Sets the Summed Dist plotted to be false or true based on

Parameters:
sumDistPlotted - boolean

getMagFreqDistParameterEditor

ParameterListEditor getMagFreqDistParameterEditor()
Function that returns the magFreDist Param as a parameterListeditor so that user can display it as the panel in window rather then button.

Returns:

refreshParamEditor

void refreshParamEditor()
Called when the parameter has changed independently from the editor, such as with the ParameterWarningListener. This function needs to be called to to update the GUI component ( text field, picklist, etc. ) with the new parameter value.


setMagDistFromParams

void setMagDistFromParams()
                          throws ConstraintException
Controller function. Dispacter function. Based on which Mag Dist was choosen, and which parameters are set. determines which dependent variable discretized function to return.

Throws:
ConstraintException - Description of the Exception

setMagDistFromParams

void setMagDistFromParams(SummedMagFreqDist summedDist,
                          java.lang.String metadata)
                          throws ConstraintException
Sets the MagDistParam to be SummedMagFreqDist

Throws:
ConstraintException - Description of the Exception

getMagDistName

java.lang.String getMagDistName()
returns the MagDistName

Returns:

getMin

double getMin()
returns the Min of the magnitude for the distribution

Returns:

getMax

double getMax()
returns the Max of the magnitude for thr distribution

Returns:

getNum

int getNum()
returns the Number of magnitudes for the Distribution

Returns:

getParamterList

ParameterList getParamterList()
returns the ParamterList for the MagfreqDistParameter

Returns:

getParameter

Parameter getParameter(java.lang.String name)
                       throws ParameterException
Returns each parameter for the MagFreqDist

Throws:
ParameterException

getParameter

Parameter getParameter()
Sets the parameter that is stored internally for this GUI widget to edit


getParameterList

ParameterList getParameterList()
returns the parameterlist