org.writersforge.catalan.templates
Class Section

java.lang.Object
  extended byorg.writersforge.catalan.templates.Section

public class Section
extends java.lang.Object

A single section of a larger document. Each Section represents a contiguous span of one or more pages with similar layout. Pages in a Section will share static headers; dynamic content will flow from page to page within a Section.

Author:
jsheets

Constructor Summary
Section(RegionMap regionMap, org.writersforge.bellows.Datum[] statics, org.writersforge.bellows.Datum[] flows)
          Creates a new instance of Section.
 
Method Summary
 org.writersforge.bellows.Datum getFlowTemplate(java.lang.String regionName)
          Returns a Datum object that embodies the flow template for the named region.
 java.awt.Rectangle getRegion(java.lang.String regionName)
          Returns a Rectangle that defines the bounding area for the named region.
 RegionMap getRegionMap()
          Getter for property regionMap.
 java.lang.String[] getRegionNames()
          Returns an array of all region names in this section which have flow and/or static content.
 org.writersforge.bellows.Datum getStaticTemplate(java.lang.String regionName)
          Returns a Datum object that embodies the static template for the named region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Section

public Section(RegionMap regionMap,
               org.writersforge.bellows.Datum[] statics,
               org.writersforge.bellows.Datum[] flows)
Creates a new instance of Section.

Parameters:
regionMap - the RegionMap for this Section
statics - all static templates for this Section
flows - all flow templates for this Section
Method Detail

getRegionMap

public RegionMap getRegionMap()
Getter for property regionMap.

Returns:
Value of property regionMap.

getRegionNames

public java.lang.String[] getRegionNames()
Returns an array of all region names in this section which have flow and/or static content. This array will be the same or a subset of the full list of regions in the RegionMap.

Returns:
an array of region names

getRegion

public java.awt.Rectangle getRegion(java.lang.String regionName)
Returns a Rectangle that defines the bounding area for the named region. Nonexistent regions or regions without content in this section return a null.

Parameters:
regionName - the name of the region to retrieve
Returns:
the bounding Rectangle of the region, or null if the region does not exist in this section

getStaticTemplate

public org.writersforge.bellows.Datum getStaticTemplate(java.lang.String regionName)
Returns a Datum object that embodies the static template for the named region. Nonexistent regions or regions without content in this section return a null.

Parameters:
regionName - the name of the region
Returns:
the static template for the region, or null if the region does not exist in this section

getFlowTemplate

public org.writersforge.bellows.Datum getFlowTemplate(java.lang.String regionName)
Returns a Datum object that embodies the flow template for the named region. Nonexistent regions or regions without content in this section return a null.

Parameters:
regionName - the name of the region
Returns:
the flow template for the region, or null if the region does not exist in this section