public class AbstractLine extends java.lang.Object implements Line
Line
. Subclasses should override the instantiateDetailPage()
method if the line provides a
deeper detail page.Modifier and Type | Field and Description |
---|---|
(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 and Description |
---|
AbstractLine() |
Modifier and Type | Method and Description |
---|---|
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) |
static org.apache.log4j.Logger logger
Page detailPage
LineCategory category
java.util.Map fieldsByColumn
int state
public AbstractLine()
public Page openDetailPage()
Line
openDetailPage
in interface Line
public void setOwner(Page owner)
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)
protected Page instantiateDetailPage()
public java.lang.Object getField(Column column) throws java.lang.IllegalArgumentException
public void close() throws ReportingException
Closeable
close
in interface Closeable
ReportingException
protected void assertValidColumnForCategory(Column column) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException