Public Member Functions | |
Behavior (String sKey, String sDescriptor, String sParFileTag, float fVersion, float fMinVersion) | |
Constructor. | |
Behavior (String sKey, String sDescriptor, String sParFileTag, float fVersion) | |
Constructor. | |
void | Validate () throws ModelException |
Behavior performs an internal check to make sure its settings are consistent and logical. | |
void | SetCanApplyTo (int iType, boolean bCanApply) |
Sets whether this behavior can apply to a given tree type. | |
String | GetKey () |
Gets the key string. | |
String | GetParameterFileBehaviorName () |
Gets the parameter file name for this behavior. | |
float | GetVersion () |
Gets behavior's parameter file version. | |
float | GetMinimumVersion () |
Gets behavior's parameter file minimum version. | |
String | GetDescriptor () |
Gets the descriptor string. | |
void | SetDescriptor (String s) |
Sets the descriptor string. | |
int | GetNumberOfCombos () |
Gets the number of species/type combos to which this behavior applies. | |
int | GetNumberOfGrids () |
Gets the number of grids to which this behavior applies. | |
void | DeleteSpeciesTypeCombo (int iIndex) throws ModelException |
Deletes the SpeciesTypeCombo at the given index. | |
void | ClearSpeciesTypeCombos () |
Empties the species/type combo list. | |
SpeciesTypeCombo | GetSpeciesTypeCombo (int iIndex) throws ModelException |
Returns the SpeciesTypeCombo at the given index of the species/type combo list. | |
Grid | GetGrid (int iIndex) throws ModelException |
Returns the Grid at the given index of the grid applies to list. | |
Object | GetRequiredData (int iIndex) |
Returns the required data object at a given index. | |
int | GetNumberOfRequiredDataObjects () |
Gets the number of required data objects for this behavior. | |
void | AddSpeciesTypeCombo (SpeciesTypeCombo oCombo) throws ModelException |
Adds a new species/type combo to the list to which this behavior applies. | |
void | AddGrid (Grid oGrid) |
Adds a new Grid to the list to which this behavior applies. | |
void | AddRequiredData (Object oData) |
Adds a piece of required data to the list. | |
boolean[] | GetWhichSpeciesUsed (TreePopulation oPop) |
Returns which species to which this behavior is applied. | |
Object | clone () |
Override to make a clone of this object. | |
Public Attributes | |
boolean | m_bMustHaveTrees = true |
If true, and a tree has no species/type combos, it automatically becomes disabled. | |
boolean | m_bIsEnabled = false |
Whether or not the current parameter file uses this behavior - and thus whether it will get called during the setup sequence. | |
boolean | m_bCanEditAutomatically = true |
Whether or not this behavior can be edited automatically (true) or must be edited with its own dialog (false). | |
Protected Attributes | |
Vector | mp_oTreesAppliesTo = new Vector(0) |
A set of SpeciesTypeCombo objects to which this behavior is applied - or none if it is not applied to trees. | |
Vector | mp_oGridsAppliesTo = new Vector(0) |
A set of Grids to which this behavior is applied - or none if it is not applied to grids. | |
Vector | mp_oRequiredData = new Vector(0) |
The data objects which are required when this behavior is enabled (i.e. | |
Vector | mp_oNewTreeDataMembers = new Vector(0) |
The new tree data members that this behavior adds, above and beyond the basic tree population data members. | |
String | m_sDescriptor |
This is what will be displayed as the name of a given behavior in the GUI. | |
String | m_sKey |
Dey string - short unique identifier. | |
String | m_sParFileTag |
String which is used to identify this behavior in the parameter file. | |
boolean[] | mp_bCanApplyToTreeType |
For each tree type, whether or not this behavior can be applied to it. | |
float | m_fVersion |
Version of this behavior. | |
float | m_fMinVersion = (float) 1.0 |
Minimum version of this behavior. |
There is a one-to-one relationship between behaviors in the core model and objects of this class. Unlike in the core model, however, this class is not meant to be extended and tailored.
Objects of this class act as placeholders for behaviors, keeping track of whether or not they are enabled and to whom they apply. They are "dumb", not performing any additional functions. They rely on their BehaviorTypeBase owners to keep track of their data.
Copyright: Copyright (c) 2003
Company: Institute of Ecosystem Studies
|
Constructor.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) April 30, 2004: Updated version to be a float (LEM) |
|
Constructor.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) April 30, 2004: Updated version to be a float (LEM) |
|
Adds a new Grid to the list to which this behavior applies. If this particular grid is already on the list, it's replaced. Calling this method does NOT automatically cause the behavior to become enabled, because grids are more of an inherent property of behaviors. For this reason, a Behavior should always be notified of its Grids whether or not it is enabled.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) July 21, 2004: Made it so a duplicate grid replaces an existing of the same name. This allows for grids to be updated. (LEM) |
|
Adds a piece of required data to the list.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Adds a new species/type combo to the list to which this behavior applies. If this particular species/type combo is already on the list, it's not added again. Calling this causes this behavior to become enabled.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Empties the species/type combo list. If this behavior has its m_bMustHaveTrees flag set to true, this sets m_bIsEnabled to false.
|
|
Override to make a clone of this object.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Deletes the SpeciesTypeCombo at the given index. If this removes the last combo, and the behavior has its m_bMustHaveTrees flag set to true, this sets m_bIsEnabled to false.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the descriptor string.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Returns the Grid at the given index of the grid applies to list.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the key string.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets behavior's parameter file minimum version.
Edit history: ------------------ April 30, 2004: Created (LEM) |
|
Gets the number of species/type combos to which this behavior applies.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the number of grids to which this behavior applies.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the number of required data objects for this behavior.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets the parameter file name for this behavior.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Returns the required data object at a given index.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Returns the SpeciesTypeCombo at the given index of the species/type combo list.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Gets behavior's parameter file version.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) April 30, 2004: Made version into a float (LEM) |
|
Returns which species to which this behavior is applied. If multiple tree types are applied, a species is considered applied to if any, not all, of the types goes with that species.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Sets whether this behavior can apply to a given tree type.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Sets the descriptor string.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Behavior performs an internal check to make sure its settings are consistent and logical. If m_bMustHaveTrees is set to true, it is enabled, and it has no trees, it throws an error.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
If true, and a tree has no species/type combos, it automatically becomes disabled. Otherwise, it has to do with grids and enablement must be specifically set. |
|
This is what will be displayed as the name of a given behavior in the GUI. Shouldn't be too long - max 5 words or so |
|
For each tree type, whether or not this behavior can be applied to it. This defaults to true for seedlings, saplings, adults, and snags, and false for all others. |
|
The new tree data members that this behavior adds, above and beyond the basic tree population data members. This is a vector of DataMember objects. |
|
The data objects which are required when this behavior is enabled (i.e. the individual pieces of data that must have values) |