|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.param.AbstractParameter<Region>
org.opensha.commons.param.impl.RegionParameter
public class RegionParameter
Title: LocationParameter
Description: Make a Location Parameter
| Field Summary | |
|---|---|
protected static String |
C
Class name for debugging. |
protected static boolean |
D
If true print out debug statements. |
static String |
MAX_LATITUDE
|
static String |
MAX_LONGITUDE
|
protected Parameter |
maxLatParam
|
protected Parameter |
maxLonParam
|
static String |
MIN_LATITUDE
|
static String |
MIN_LONGITUDE
|
protected Parameter |
minLatParam
|
protected Parameter |
minLonParam
|
protected static String |
PARAM_TYPE
|
protected ParameterListParameter |
regionParameterListParameter
|
| Fields inherited from class org.opensha.commons.param.AbstractParameter |
|---|
constraint, defaultValue, editable, independentParameters, info, metadataString, name, units, value, XML_COMPLEX_VAL_EL_NAME, XML_GROUP_METADATA_NAME, XML_METADATA_NAME, XML_NULL_VALUE |
| Fields inherited from interface org.opensha.commons.param.Parameter |
|---|
XML_INDEPENDENT_PARAMS_NAME |
| Constructor Summary | |
|---|---|
RegionParameter(String name)
No constraints specified for this parameter. |
|
RegionParameter(String name,
Region value)
Creates a location parameter with constraint being list of locations and current value of the parameter from these list of locations. |
|
RegionParameter(String name,
String units,
double minLat,
double maxLat,
double minLon,
double maxLon)
|
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a copy so you can't edit or damage the origial. |
List<Location> |
getAllowedLocations()
Returns a clone of the allowed strings of the constraint. |
AbstractParameterEditorOld |
getEditor()
Returns the Editor for this Parameter. |
double |
getMaxLatitude()
Returns the latitude of selected location |
double |
getMaxLongitude()
Returns the latitude of selected location |
String |
getMetadataString()
This overrides the getmetadataString() method because the value here does not have an ASCII representation (and we need to know the values of the independent parameter instead). |
double |
getMinLatitude()
Returns the latitude of selected location |
double |
getMinLongitude()
Returns the latitude of selected location |
Parameter |
getRegionParameter()
returns location parameter. |
String |
getType()
Returns the name of the parameter class |
void |
setConstraint(ParameterConstraint constraint)
Sets the constraint reference if it is a StringConstraint and the parameter is currently editable, else throws an exception. |
boolean |
setIndividualParamValueFromXML(Element el)
This should set the value of this individual parameter. |
void |
setupParams(Region value)
|
void |
setValue(Region reg)
Sets the location parameter with updated location value |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
protected static final String PARAM_TYPE
protected ParameterListParameter regionParameterListParameter
public static final String MIN_LONGITUDE
public static final String MAX_LONGITUDE
public static final String MIN_LATITUDE
public static final String MAX_LATITUDE
protected Parameter minLatParam
protected Parameter maxLatParam
protected Parameter minLonParam
protected Parameter maxLonParam
| Constructor Detail |
|---|
public RegionParameter(String name)
name - Name of the parameter
public RegionParameter(String name,
Region value)
throws ConstraintException
name - String Name of the location parameterlocationList - ArrayList : List of allowed locationsvalue - Location : Parameter value, should be one of the allowed location
ConstraintException
public RegionParameter(String name,
String units,
double minLat,
double maxLat,
double minLon,
double maxLon)
throws ConstraintException
ConstraintException| Method Detail |
|---|
public void setupParams(Region value)
public Parameter getRegionParameter()
public void setConstraint(ParameterConstraint constraint)
throws ParameterException,
EditableException
setConstraint in interface Parameter<Region>setConstraint in class AbstractParameter<Region>constraint - to set
ParameterException
EditableExceptionpublic void setValue(Region reg)
setValue in interface Parameter<Region>setValue in class AbstractParameter<Region>loc - Locationpublic double getMinLatitude()
public double getMaxLatitude()
public double getMinLongitude()
public double getMaxLongitude()
public List<Location> getAllowedLocations()
public Object clone()
clone in interface Parameter<Region>clone in class AbstractParameter<Region>public String getType()
getType in interface Parameter<Region>getType in class AbstractParameter<Region>public String getMetadataString()
getMetadataString in interface Parameter<Region>getMetadataString in class AbstractParameter<Region>public boolean setIndividualParamValueFromXML(Element el)
AbstractParameter
setIndividualParamValueFromXML in class AbstractParameter<Region>public AbstractParameterEditorOld getEditor()
ParameterEditor for this Parameter. It is
recommended that editors be lazily instantiated.
Editor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||