Package net.sf.jasperreports.engine.fill
Class JRFillVariable
java.lang.Object
net.sf.jasperreports.engine.fill.JRFillVariable
- All Implemented Interfaces:
Cloneable,JRCalculable,JRCloneable,JRVariable
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsFields inherited from interface net.sf.jasperreports.engine.fill.JRCalculable
HELPER_COUNT, HELPER_SIZE, HELPER_SUM, HELPER_VARIANCEFields inherited from interface net.sf.jasperreports.engine.JRVariable
COLUMN_COUNT, COLUMN_NUMBER, MASTER_CURRENT_PAGE, MASTER_TOTAL_PAGES, PAGE_COUNT, PAGE_NUMBER, REPORT_COUNT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJRFillVariable(JRVariable variable, JRFillObjectFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionclone()Gets the variable calculation type.Gets the variable optional description.Returns the main expression for this variable.getHelperVariable(byte type) Returns a helper variable.Returns the incremented value of the calculable object.Class<?> Returns the class of the incrementer factory used for choosing the right incrementer for the variable value.Returns the string name of the variable value class.Returns the group whose break triggers the variable increment.Gets the variable increment type.Returns the initial value expression for this variable.getName()Returns the name of the variable.protected JRVariableReturns the group whose break triggers the variable reset.Gets the variable reset type.getValue()Returns the value of the calculable object.getValue(byte evaluation) Class<?> Returns the class of the variable value.Returns the string name of the variable value class.booleanReturnstrueif and only if the calculable object was only initialized and not incremented.booleanReturnstrueif the variable calculation type is system defined.voidoverwriteValue(Object newValue, byte evaluation) protected voidreset()voidrestoreValue(byte evaluation) voidsetDescription(String description) Sets the variable description.voidsetEstimatedValue(Object estimatedValue) setHelperVariable(JRFillVariable helperVariable, byte type) Sets a helper variable.voidsetIncrementedValue(Object incrementedValue) voidsetInitialized(boolean isInitialized) Sets the initialized flag for this calculable object.voidsetOldValue(Object oldValue) voidsetPreviousIncrementedValue(Object previousIncrementedValue) voidsetPreviousOldValue(Object previousOldValue) void
-
Field Details
-
parent
-
-
Constructor Details
-
JRFillVariable
-
-
Method Details
-
getParent
-
reset
protected void reset() -
getName
Description copied from interface:JRVariableReturns the name of the variable. Since all variables are stored in a map, the variable names are the keys in the map.- Specified by:
getNamein interfaceJRVariable- Returns:
- a string containing the variable name
-
getDescription
Description copied from interface:JRVariableGets the variable optional description.- Specified by:
getDescriptionin interfaceJRVariable
-
setDescription
Description copied from interface:JRVariableSets the variable description.- Specified by:
setDescriptionin interfaceJRVariable
-
getValueClass
Description copied from interface:JRVariableReturns the class of the variable value. Any class is allowed as long as it is in the classpath at compile and run time.- Specified by:
getValueClassin interfaceJRVariable- Returns:
- a Class instance representing the variable value class
-
getValueClassName
Description copied from interface:JRVariableReturns the string name of the variable value class.- Specified by:
getValueClassNamein interfaceJRVariable
-
getIncrementerFactoryClass
Description copied from interface:JRVariableReturns the class of the incrementer factory used for choosing the right incrementer for the variable value.- Specified by:
getIncrementerFactoryClassin interfaceJRVariable- Returns:
- the Class instance of the incrementer factory
- See Also:
-
getIncrementerFactoryClassName
Description copied from interface:JRVariableReturns the string name of the variable value class.- Specified by:
getIncrementerFactoryClassNamein interfaceJRVariable
-
getExpression
Description copied from interface:JRVariableReturns the main expression for this variable. The expression must be numeric for certain calculation types.- Specified by:
getExpressionin interfaceJRVariable- Returns:
- a
JRExpressioninstance containing the expression.
-
getInitialValueExpression
Description copied from interface:JRVariableReturns the initial value expression for this variable. The expression must be numeric for certain calculation types.- Specified by:
getInitialValueExpressionin interfaceJRVariable- Returns:
- a
JRExpressioninstance containing the initial expression.
-
getResetType
Description copied from interface:JRVariableGets the variable reset type.- Specified by:
getResetTypein interfaceJRVariable- Returns:
- a value representing one of the reset type constants in
ResetTypeEnum
-
getIncrementType
Description copied from interface:JRVariableGets the variable increment type.- Specified by:
getIncrementTypein interfaceJRVariable- Returns:
- a value representing one of the reset type constants in
IncrementTypeEnum
-
getCalculation
Description copied from interface:JRVariableGets the variable calculation type.- Specified by:
getCalculationin interfaceJRVariable- Returns:
- a value representing one of the calculation type constants in
CalculationEnum
-
isSystemDefined
public boolean isSystemDefined()Description copied from interface:JRVariableReturnstrueif the variable calculation type is system defined.- Specified by:
isSystemDefinedin interfaceJRVariable- See Also:
-
getResetGroup
Description copied from interface:JRVariableReturns the group whose break triggers the variable reset. Only used whenJRVariable.getResetType()returnsResetTypeEnum.GROUP.- Specified by:
getResetGroupin interfaceJRVariable
-
getIncrementGroup
Description copied from interface:JRVariableReturns the group whose break triggers the variable increment. Only used whenJRVariable.getIncrementType()returnsIncrementTypeEnum.GROUP.- Specified by:
getIncrementGroupin interfaceJRVariable
-
getOldValue
-
setOldValue
-
getEstimatedValue
-
setEstimatedValue
-
getIncrementedValue
Description copied from interface:JRCalculableReturns the incremented value of the calculable object.- Specified by:
getIncrementedValuein interfaceJRCalculable- Returns:
- the incremented value
-
setIncrementedValue
-
getPreviousIncrementedValue
-
setPreviousIncrementedValue
-
getValue
Description copied from interface:JRCalculableReturns the value of the calculable object.- Specified by:
getValuein interfaceJRCalculable- Returns:
- the value
-
setValue
-
isInitialized
public boolean isInitialized()Description copied from interface:JRCalculableReturnstrueif and only if the calculable object was only initialized and not incremented.- Specified by:
isInitializedin interfaceJRCalculable- Returns:
trueif and only if the calculable object was only initialized and not incremented
-
setInitialized
public void setInitialized(boolean isInitialized) Description copied from interface:JRCalculableSets the initialized flag for this calculable object.- Specified by:
setInitializedin interfaceJRCalculable- Parameters:
isInitialized- the initialized flag- See Also:
-
getIncrementer
-
setHelperVariable
Sets a helper variable.- Parameters:
helperVariable- the helper variabletype- the helper type- Returns:
- the previous helper variable for the type
-
getHelperVariable
Returns a helper variable.- Specified by:
getHelperVariablein interfaceJRCalculable- Parameters:
type- the helper type- Returns:
- the helper variable for the specified type
-
getValue
-
overwriteValue
-
restoreValue
public void restoreValue(byte evaluation) -
getPreviousOldValue
-
setPreviousOldValue
-
clone
- Specified by:
clonein interfaceJRCloneable- Overrides:
clonein classObject
-