org.umber.crucible.old.layout
Class Page

java.lang.Object
  extended byorg.umber.crucible.old.layout.Page

public class Page
extends java.lang.Object

A single page of final output. Content is defined by a series of LayoutArea objects created by a RenderTemplate and geometrically arranged by a LayoutEngine. A Page defines its own width and height; thus, adjacent Pages in the same Book can have different layouts, for example portrait vs. landscape orientation.

Author:
jsheets

Constructor Summary
Page(Book book, int width, int height)
          Creates a new instance of Page.
 
Method Summary
 void addArea(LayoutArea area)
          Appends a new LayoutArea object into the Page.
 void addAreas(LayoutArea[] areas)
          Appends an array of LayoutArea objects into the Page.
 java.lang.String debugPrint()
          Creates a debug string which represents this Page object
 LayoutArea[] getAreas()
          Getter for property areas, the layout areas associated with this Page.
 LayoutArea getAreas(int index)
          Indexed getter for property areas, the layout areas associated with this Page.
 Book getBook()
          Getter for property book, the owning Book for this Page.
 int getHeight()
          Getter for property height, the height of the Page in font points.
 java.awt.Insets getInsets()
          Getter for property insets, the unwritable margins for this Page.
 int getWidth()
          Getter for property width, the width of the Page in font points.
 void setAreas(int index, LayoutArea areas)
          Indexed setter for property areas, the layout areas associated with this Page.
 void setAreas(LayoutArea[] areas)
          Setter for property areas, the layout areas associated with this Page.
 void setInsets(java.awt.Insets insets)
          Setter for property insets, the unwritable margins for this Page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Page

public Page(Book book,
            int width,
            int height)
Creates a new instance of Page.

Parameters:
book - the book which owns this Page
width - the width of this Page
height - the height of this Page
Method Detail

getWidth

public int getWidth()
Getter for property width, the width of the Page in font points.

Returns:
Value of property width.

getHeight

public int getHeight()
Getter for property height, the height of the Page in font points.

Returns:
Value of property height.

getBook

public Book getBook()
Getter for property book, the owning Book for this Page.

Returns:
Value of property book.

getInsets

public java.awt.Insets getInsets()
Getter for property insets, the unwritable margins for this Page.

Returns:
Value of property insets.

setInsets

public void setInsets(java.awt.Insets insets)
Setter for property insets, the unwritable margins for this Page.

Parameters:
insets - New value of property insets.

getAreas

public LayoutArea getAreas(int index)
Indexed getter for property areas, the layout areas associated with this Page.

Parameters:
index - Index of the property.
Returns:
Value of the property at index.

getAreas

public LayoutArea[] getAreas()
Getter for property areas, the layout areas associated with this Page.

Returns:
Value of property areas.

setAreas

public void setAreas(int index,
                     LayoutArea areas)
Indexed setter for property areas, the layout areas associated with this Page.

Parameters:
index - Index of the property.
areas - New value of the property at index.

setAreas

public void setAreas(LayoutArea[] areas)
Setter for property areas, the layout areas associated with this Page.

Parameters:
areas - New value of property areas.

addArea

public void addArea(LayoutArea area)
Appends a new LayoutArea object into the Page.

Parameters:
area - new LayoutArea object to append

addAreas

public void addAreas(LayoutArea[] areas)
Appends an array of LayoutArea objects into the Page.

Parameters:
areas - new LayoutArea object to append

debugPrint

public java.lang.String debugPrint()
Creates a debug string which represents this Page object

Returns:
verbose String version of this object