|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jcoverage.reporting.AbstractLine
This class provides a skeletal implementation of a Line
. Subclasses should override the instantiateDetailPage()
method if the line provides a
deeper detail page.
Field Summary | |
(package private) LineCategory |
category
|
(package private) Page |
detailPage
|
(package private) java.util.Map |
fieldsByColumn
|
(package private) static org.apache.log4j.Logger |
logger
|
(package private) Page |
owner
|
(package private) Report |
report
|
(package private) int |
state
|
Constructor Summary | |
AbstractLine()
|
Method Summary | |
protected void |
assertValidColumnForCategory(Column column)
|
void |
close()
Call this method when you are done adding detail. |
Page |
getDetailPage()
Get the detail page if one exists. |
java.lang.Object |
getField(Column column)
Get the field value for a given column. |
Page |
getOwner()
|
protected Page |
instantiateDetailPage()
Subclasses should override this method if the line has information in a detail page. |
boolean |
isClosed()
|
Page |
openDetailPage()
This method signifies more detail is available for this line in a separate page. |
void |
setCategory(LineCategory category)
Instances of this class should record their category if they want to validate values of fields set with the setField() methods. |
void |
setField(Column column,
boolean value)
|
void |
setField(Column column,
double value)
|
void |
setField(Column column,
int value)
|
void |
setField(Column column,
java.lang.Object value)
Set a piece of information against this line. |
void |
setOwner(Page owner)
Set the page that own's this line, in other words, the master page. |
void |
setReport(Report report)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static org.apache.log4j.Logger logger
Report report
Page owner
Page detailPage
LineCategory category
java.util.Map fieldsByColumn
int state
Constructor Detail |
public AbstractLine()
Method Detail |
public Page openDetailPage()
Line
openDetailPage
in interface Line
public void setOwner(Page owner)
setOwner
in interface Line
public Page getOwner()
getOwner
in interface Line
public void setReport(Report report)
setReport
in interface Line
public void setCategory(LineCategory category)
Line
setField()
methods.
Reports that are not derived from AbstractPage
, or
override AbstractPage.createLine(LineCategory)
should
always call this method on newly created Line
instances
they create.
setCategory
in interface Line
public Page getDetailPage()
Line
Line.openDetailPage()
.
getDetailPage
in interface Line
public void setField(Column column, java.lang.Object value)
setField
in interface Line
value
- the value of the field. Again, this must be of
the correct type as determined by the category.public void setField(Column column, int value)
setField
in interface Line
public void setField(Column column, double value)
setField
in interface Line
public void setField(Column column, boolean value)
setField
in interface Line
protected Page instantiateDetailPage()
public java.lang.Object getField(Column column) throws java.lang.IllegalArgumentException
getField
in interface Line
column
- the given column.
java.lang.IllegalArgumentException
- if the column is not known to
this line's category.public void close() throws ReportingException
Closeable
close
in interface Closeable
ReportingException
public boolean isClosed()
isClosed
in interface Closeable
protected void assertValidColumnForCategory(Column column) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |