|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jimm.datavision.Group
public class Group
A group uses a Selectable
object to define record grouping. A group
may contain multiple header and footer sections.
Field Summary | |
---|---|
protected boolean |
firstValue
|
protected SectionArea |
footers
|
protected SectionArea |
headers
|
protected boolean |
newValue
|
protected int |
recordCount
|
protected Report |
report
|
protected Selectable |
selectable
|
static int |
SORT_ASCENDING
Sort records by the group's selectable in ascending order (the default). |
static int |
SORT_DESCENDING
Sort records by the group's selectable in descending order. |
protected int |
sortOrder
|
protected java.lang.Object |
value
|
Constructor Summary | |
---|---|
Group(Report report,
Selectable selectable)
Constructor. |
Method Summary | |
---|---|
boolean |
contains(Section s)
Returns true if the specified section is inside this group,
either as a header or a footer. |
static Group |
create(Report report,
Selectable selectable)
Creates a new group and gives it a header section containing a selectable field and an empty footer section. |
SectionArea |
footers()
Returns the footers. |
void |
forceFooterOutput()
Layout engines need to call this method when a group's footer is being output not because this group has a new value but because some previous group's value changed and we want to output this group's footer. |
int |
getRecordCount()
Returns the number of records in the group so far. |
Selectable |
getSelectable()
Returns the selectable used by this group. |
java.lang.String |
getSelectableName()
|
int |
getSortOrder()
Returns the sort order (either SORT_ASCENDING or
SORT_DESCENDING ). |
java.lang.Object |
getValue()
Returns the value of this group's selectable. |
SectionArea |
headers()
Returns the headers. |
boolean |
isFirstValue()
Returns true when this is the first value ever seen
by the group during a report run. |
boolean |
isNewValue()
Returns true when the value of the selectable has
changed. |
void |
reloadSelectable(DataSource dataSource)
Reloads reference to selectable. |
void |
reset()
Called by a report when it starts running, this method prepares the group for use. |
void |
setSelectable(Selectable newSelectable)
Sets the selectable used by this group. |
void |
setSortOrder(int newSortOrder)
Sets the sort order. |
void |
setValue(Report report)
Sets the group value that is returned by getValue . |
static java.lang.String |
sortOrderIntToString(int order)
|
static int |
sortOrderStringToInt(java.lang.String order)
|
void |
updateCounter()
|
void |
writeXML(XMLWriter out)
Writes this group as an XML tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SORT_ASCENDING
public static final int SORT_DESCENDING
protected Report report
protected SectionArea headers
protected SectionArea footers
protected Selectable selectable
protected int sortOrder
protected java.lang.Object value
protected boolean newValue
protected boolean firstValue
protected int recordCount
Constructor Detail |
---|
public Group(Report report, Selectable selectable)
report
- a reportselectable
- a selectable thingieMethod Detail |
---|
public static Group create(Report report, Selectable selectable)
report
- a reportselectable
- a selectable object
public static java.lang.String sortOrderIntToString(int order)
public static int sortOrderStringToInt(java.lang.String order)
public Selectable getSelectable()
public void setSelectable(Selectable newSelectable)
newSelectable
- the new selectablepublic void reloadSelectable(DataSource dataSource)
public java.lang.String getSelectableName()
public int getSortOrder()
SORT_ASCENDING
or
SORT_DESCENDING
).
SORT_ASCENDING
or SORT_DESCENDING
public void setSortOrder(int newSortOrder)
newSortOrder
- either SORT_ASCENDING
or
SORT_DESCENDING
public java.lang.Object getValue()
public void setValue(Report report)
getValue
. This
method should only be called by the report while it is running.
report
- the report from which we retrieve our selectable's valuepublic void updateCounter()
public boolean isNewValue()
true
when the value of the selectable has
changed.
true
when the value of the selectable has
changedpublic int getRecordCount()
public void forceFooterOutput()
LayoutEngine.groupFooters(boolean)
public boolean isFirstValue()
true
when this is the first value ever seen
by the group during a report run.
true
if this is the first value ever seenpublic SectionArea headers()
public SectionArea footers()
public boolean contains(Section s)
true
if the specified section is inside this group,
either as a header or a footer.
s
- a section
true
if the section is within this grouppublic void reset()
public void writeXML(XMLWriter out)
writeXML
in interface Writeable
out
- a writer that knows how to write XML
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |