|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jimm.datavision.Element
jimm.datavision.field.Field
jimm.datavision.field.FormulaField
public class FormulaField
A formula field represents a formula calculated on-the-fly. The value of a
formula field holds a Formula object. (In the XML, the formula
field's value is the id of the formula.)
| Field Summary | |
|---|---|
protected Formula |
formula
|
| Fields inherited from class jimm.datavision.field.Field |
|---|
border, bounds, cache, DEFAULT_HEIGHT, DEFAULT_WIDTH, format, id, maxIdSeen, value |
| Fields inherited from class jimm.datavision.Element |
|---|
report, section, visible |
| Constructor Summary | |
|---|---|
FormulaField(java.lang.Long id,
Report report,
Section section,
java.lang.Object value,
boolean visible)
Constructs a formula field with the specified id in the specified report section whose Formula's id is value. |
|
| Method Summary | |
|---|---|
boolean |
canBeAggregated()
This override returns true if this formula is in a detail
section. |
java.util.Collection |
columnsUsed()
Returns a collection of the columns used in the formula. |
java.lang.String |
designLabel()
Returns a string representing the field in the GUI during report design. |
java.lang.String |
dragString()
Not really used; we drag formulas, not formula fields. |
protected void |
finalize()
|
java.lang.String |
formulaString()
Returns a string representing the field as it appears in a formula. |
Formula |
getFormula()
Returns the formula. |
java.lang.Object |
getValue()
Returns the value of this field. |
FieldWidget |
makeWidget(SectionWidget sw)
Returns a new widget of the appropriate FieldWidget
subclass for this field. |
boolean |
refersTo(Field f)
Returns true if this field contains a reference to the
specified field. |
boolean |
refersTo(Formula f)
Returns true if this field contains a reference to the
specified formula. |
boolean |
refersTo(Parameter p)
Returns true if this field contains a reference to the
specified parameter. |
boolean |
refersTo(UserColumn uc)
Returns true if this field contains a reference to the
specified user column. |
void |
setFormula(Formula newFormula)
Sets the formula. |
java.lang.String |
typeString()
Returns the string that specifies this field's type in the report XML. |
void |
update(java.util.Observable o,
java.lang.Object arg)
|
java.util.Collection |
userColumnsUsed()
Returns a collection of the user columns used in the formula. |
| Methods inherited from class jimm.datavision.field.Field |
|---|
clone, create, createFromDragString, getBorder, getBorderOrDefault, getBounds, getFormat, getId, getOutputHeight, setBorder, setBounds, setFormat, setValue, toString, writeFieldGuts, writeXML |
| Methods inherited from class jimm.datavision.Element |
|---|
getReport, getSection, isVisible, setSection, setVisible |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Formula formula
| Constructor Detail |
|---|
public FormulaField(java.lang.Long id,
Report report,
Section section,
java.lang.Object value,
boolean visible)
Formula's id is value.
id - the new field's idreport - the report containing this elementsection - the report section in which the field residesvalue - the id of a formulavisible - show/hide flag| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class Fieldjava.lang.Throwable
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerupdate in class Fieldpublic FieldWidget makeWidget(SectionWidget sw)
FieldFieldWidget
subclass for this field. Subclasses override this method to return
different types of widgets.
makeWidget in class Fieldsw - a field widgetpublic java.lang.String dragString()
dragString in interface DraggabledragString in class Fieldpublic Formula getFormula()
public void setFormula(Formula newFormula)
newFormula - the new formulapublic java.lang.String typeString()
Field
typeString in class Fieldpublic java.lang.String designLabel()
Field
designLabel in class Fieldpublic java.lang.String formulaString()
Field
formulaString in class Fieldpublic boolean refersTo(Field f)
Fieldtrue if this field contains a reference to the
specified field. Most fields return false; only a AggregateField or FormulaField would return true.
refersTo in class Fieldf - a field
true if this field contains a reference to the
specified fieldpublic boolean refersTo(Formula f)
Fieldtrue if this field contains a reference to the
specified formula. Most fields return false; only a AggregateField or FormulaField would return true.
refersTo in class Fieldf - a formula
true if this field contains a reference to the
specified fieldpublic boolean refersTo(UserColumn uc)
Fieldtrue if this field contains a reference to the
specified user column. Most fields return false; only a AggregateField, UserColumnField, or FormulaField would
return true.
refersTo in class Fielduc - a user column
true if this field contains a reference to the
specified user columnpublic boolean refersTo(Parameter p)
Fieldtrue if this field contains a reference to the
specified parameter. Most fields return false; only a AggregateField or FormulaField would return true.
refersTo in class Fieldp - a parameter
true if this field contains a reference to the
specified fieldpublic boolean canBeAggregated()
true if this formula is in a detail
section. We don't really know that this formula returns a number, so
we'll err on the side of allowing aggregation.
canBeAggregated in class Fieldtrue if this field can be aggregatedpublic java.lang.Object getValue()
Formula.
getValue in class Fieldpublic java.util.Collection columnsUsed()
Expression.columnsUsed().
Query.findSelectablesUsed()public java.util.Collection userColumnsUsed()
Expression.userColumnsUsed().
Query.findSelectablesUsed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||