|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable jimm.datavision.Element jimm.datavision.field.Field jimm.datavision.field.UserColumnField
public class UserColumnField
A user column field represents a user column, which in turn holds some SQL
that is put in the SELECT clause of a query. The value of a user column
field holds a UserColumn
object. (In the XML, the user column
field's value is the id of the user column.)
Field Summary | |
---|---|
protected UserColumn |
usercol
|
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 | |
---|---|
UserColumnField(java.lang.Long id,
Report report,
Section section,
java.lang.Object value,
boolean visible)
Constructs a user column field with the specified id in the specified report section whose UserColumn 's id is value. |
Method Summary | |
---|---|
boolean |
canBeAggregated()
This override returns true if this user column is in a
detail section. |
java.util.Collection |
columnsUsed()
Returns a collection of the columns used in the user column. |
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 user columns, not user column fields. |
protected void |
finalize()
|
java.lang.String |
formulaString()
Returns a string representing the field as it appears in a formula. |
UserColumn |
getUserColumn()
Returns the user column. |
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(Parameter p)
Returns true if this field contains a reference to the
specified parameter. |
void |
setUserColumn(UserColumn newUsercol)
Sets the user column. |
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)
|
Methods inherited from class jimm.datavision.field.Field |
---|
clone, create, createFromDragString, getBorder, getBorderOrDefault, getBounds, getFormat, getId, getOutputHeight, refersTo, refersTo, 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 UserColumn usercol
Constructor Detail |
---|
public UserColumnField(java.lang.Long id, Report report, Section section, java.lang.Object value, boolean visible)
UserColumn
'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 user columnvisible
- show/hide flagMethod Detail |
---|
protected void finalize() throws java.lang.Throwable
finalize
in class Field
java.lang.Throwable
public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
update
in class Field
public FieldWidget makeWidget(SectionWidget sw)
Field
FieldWidget
subclass for this field. Subclasses override this method to return
different types of widgets.
makeWidget
in class Field
sw
- a field widgetpublic java.lang.String dragString()
dragString
in interface Draggable
dragString
in class Field
public UserColumn getUserColumn()
public void setUserColumn(UserColumn newUsercol)
newUsercol
- the new user columnpublic java.lang.String typeString()
Field
typeString
in class Field
public java.lang.String designLabel()
Field
designLabel
in class Field
public java.lang.String formulaString()
Field
formulaString
in class Field
public boolean refersTo(Field f)
Field
true
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 Field
f
- a field
true
if this field contains a reference to the
specified fieldpublic boolean refersTo(Parameter p)
Field
true
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 Field
p
- a parameter
true
if this field contains a reference to the
specified fieldpublic boolean canBeAggregated()
true
if this user column is in a
detail section. We don't really know that this user column returns
a number, so we'll err on the side of allowing aggregation.
canBeAggregated
in class Field
true
if this field can be aggregatedpublic java.lang.Object getValue()
UserColumn
.
getValue
in class Field
public java.util.Collection columnsUsed()
Expression.columnsUsed()
.
Query.findSelectablesUsed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |