net.refractions.udig.printing.ui
Interface Template

All Superinterfaces:
java.lang.Cloneable

public interface Template
extends java.lang.Cloneable

A Template describes each element to be realized onto a Page. It is used to provide users with a performatted Page that can be used multiple times to easily print maps without having to worry about repositioning and resizing each Box every time they create a new page.

Note: All Box Printers used to initialize the page must also have a net.refractions.udig.printing.ui.boxprinter extension defined for it.

Author:
Richard Gould

Method Summary
 Template clone()
          Templates must clone themselves and their contents properly.
 java.lang.String getName()
           
 void init(Page page, Map map, int width, int height)
          This method initializes the template to the page according to its own interests.
 java.util.Iterator<Box> iterator()
          Returns an iterator that iterates over each Box contained in the template.
 

Method Detail

init

void init(Page page,
          Map map,
          int width,
          int height)
This method initializes the template to the page according to its own interests. Some interests may include TODO fill me in ...

Note: All Box Printers used to initialize the page must also have a net.refractions.udig.printing.ui.boxprinter extension defined for it.

Parameters:
page - the Page to initialize
map - the Map that this page is centered around
width - the desired width for the page, in pixels
height - the desired height for the page, in pixels

iterator

java.util.Iterator<Box> iterator()
Returns an iterator that iterates over each Box contained in the template. This is used by the framework to access a Template's Boxes.

Returns:
an iterator where each element is of type Box
See Also:
Box

getName

java.lang.String getName()
Returns:
A human-readable String that identifies this template

clone

Template clone()
Templates must clone themselves and their contents properly.

Returns:
a copy of this template
See Also:
Cloneable, Object.clone()