com.jcoverage.reporting
Interface Line

All Superinterfaces:
Closeable
All Known Implementing Classes:
AbstractLine, JavaFileLine, OverallSummaryLine, ReportSummaryPackageLine

public interface Line
extends Closeable

A line of information in a page of a report.


Method Summary
 Page getDetailPage()
          Get the detail page if one exists.
 java.lang.Object getField(Column col)
           
 Page getOwner()
           
 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 col, boolean value)
           
 void setField(Column col, double value)
           
 void setField(Column col, int value)
           
 void setField(Column col, java.lang.Object value)
          Fields can be set on a line.
 void setOwner(Page page)
           
 void setReport(Report report)
           
 
Methods inherited from interface com.jcoverage.reporting.Closeable
close, isClosed
 

Method Detail

openDetailPage

public Page openDetailPage()
This method signifies more detail is available for this line in a separate page.

Returns:
a new page, ready for lines of more detailed information to be added.

getDetailPage

public Page getDetailPage()
Get the detail page if one exists. This method does not create a detail page, if you want to do this you should use openDetailPage().


setOwner

public void setOwner(Page page)

getOwner

public Page getOwner()

setReport

public void setReport(Report report)

setField

public void setField(Column col,
                     java.lang.Object value)
              throws java.lang.IllegalArgumentException
Fields can be set on a line.

Parameters:
value - the value of the field. Again, this must be of the correct type as determined by the category.
Throws:
java.lang.IllegalArgumentException

setField

public void setField(Column col,
                     int value)
              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

setField

public void setField(Column col,
                     double value)
              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

setField

public void setField(Column col,
                     boolean value)
              throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getField

public java.lang.Object getField(Column col)
Parameters:
col - the given column.
Returns:
the value of the given column, the type of which is determined by the LineCategory.

setCategory

public 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.

Reports that are not derived from AbstractPage, or override AbstractPage.createLine(LineCategory) should always call this method on newly created Line instances they create.