net.sf.statcvs.pages

Class Page

Implemented Interfaces:
NavigationNode

public class Page
extends Object
implements NavigationNode

Constructor Summary

Page(ReportConfig config, String fileName, String shortTitle, String fullTitle)
Creates a new page.

Method Summary

void
add(ChartImage chart)
void
add(ChartImage chart, String linkURL)
void
add(Directory directory, boolean withRootLinks)
void
add(PageGroup pages)
void
add(TableReport table)
void
addAttribute(String key, Date value)
void
addAttribute(String key, String value)
void
addAttribute(String key, double value, int decimalPlaces)
void
addAttribute(String key, double value, int decimalPlaces, String unit)
void
addAttribute(String key, int value)
void
addAttribute(String key, int value, String unit)
void
addChild(NavigationNode child)
void
addLink(String url, String text)
void
addRawAttribute(String key, String rawValue)
void
addRawContent(String s)
void
addSection(String title)
String
asParentLink()
String
getFullTitle()
String
getShortTitle()
String
getURL()
void
setParent(NavigationNode parent)
Sets the page's parent.
void
setShowLinkToPreviousSibling(boolean showLink)
void
setSiblings(String siblingsTitle, List siblingPages)
Sets a list of Pages that are siblings of this page.
void
write()

Constructor Details

Page

public Page(ReportConfig config,
            String fileName,
            String shortTitle,
            String fullTitle)
Creates a new page.
Parameters:
config - The configuration to use
fileName - File name for the page, without file extension
shortTitle - A short navigation title
fullTitle - A full headline title

Method Details

add

public void add(ChartImage chart)

add

public void add(ChartImage chart,
                String linkURL)

add

public void add(Directory directory,
                boolean withRootLinks)

add

public void add(PageGroup pages)

add

public void add(TableReport table)

addAttribute

public void addAttribute(String key,
                         Date value)

addAttribute

public void addAttribute(String key,
                         String value)

addAttribute

public void addAttribute(String key,
                         double value,
                         int decimalPlaces)

addAttribute

public void addAttribute(String key,
                         double value,
                         int decimalPlaces,
                         String unit)

addAttribute

public void addAttribute(String key,
                         int value)

addAttribute

public void addAttribute(String key,
                         int value,
                         String unit)

addChild

public void addChild(NavigationNode child)

addLink

public void addLink(String url,
                    String text)

addRawAttribute

public void addRawAttribute(String key,
                            String rawValue)

addRawContent

public void addRawContent(String s)

addSection

public void addSection(String title)

asParentLink

public String asParentLink()
Specified by:
asParentLink in interface NavigationNode

getFullTitle

public String getFullTitle()
Specified by:
getFullTitle in interface NavigationNode

getShortTitle

public String getShortTitle()
Specified by:
getShortTitle in interface NavigationNode

getURL

public String getURL()
Specified by:
getURL in interface NavigationNode

setParent

public void setParent(NavigationNode parent)
Sets the page's parent. The generated page will link back to the parent.
Specified by:
setParent in interface NavigationNode

setShowLinkToPreviousSibling

public void setShowLinkToPreviousSibling(boolean showLink)
Specified by:
setShowLinkToPreviousSibling in interface NavigationNode

setSiblings

public void setSiblings(String siblingsTitle,
                        List siblingPages)
Sets a list of Pages that are siblings of this page. The generated page will contain a navigation list that links to all siblings. The sibling list may contain the page itself.
Specified by:
setSiblings in interface NavigationNode
Parameters:
siblingsTitle - Title for navigation list, e.g. "Monthly Reports"

write

public void write()
Specified by:
write in interface NavigationNode