PDF Clown
0.0.8

it.stefanochizzolini.clown.tools
Class PageManager

java.lang.Object
  extended by it.stefanochizzolini.clown.tools.PageManager

public class PageManager
extends Object

Tool for page management.

Since:
0.0.6
Version:
0.0.6
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
PageManager()
           
PageManager(Document document)
           
 
Method Summary
 void add(Collection<Page> pages)
          Appends a collection of pages to the end of the document.
 void add(Document document)
          Appends a document to the end of the document.
 void add(int index, Collection<Page> pages)
          Inserts a collection of pages at the specified position in the document.
 void add(int index, Document document)
          Inserts a document at the specified position in the document.
 Document extract(int beginIndex, int endIndex)
          Extracts a page range from the document.
 Document getDocument()
          Gets the document being manipulated.
 void move(int beginIndex, int endIndex, int targetIndex)
          Moves a page range to a target position within the document.
 void remove(int beginIndex, int endIndex)
          Removes a page range from the document.
 void setDocument(Document value)
          Sets the document to manipulate.
 List<Document> split()
          Splits the document into multiple single-paged documents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageManager

public PageManager()

PageManager

public PageManager(Document document)
Method Detail

add

public void add(Document document)
Appends a document to the end of the document.

Parameters:
document - The document to add.

add

public void add(Collection<Page> pages)
Appends a collection of pages to the end of the document.

Parameters:
pages - The pages to add.

add

public void add(int index,
                Document document)
Inserts a document at the specified position in the document.

Parameters:
index - Position at which the document is to be inserted.
document - The document to be inserted.

add

public void add(int index,
                Collection<Page> pages)
Inserts a collection of pages at the specified position in the document.

Parameters:
index - Position at which the pages are to be inserted.
pages - The pages to be inserted.

extract

public Document extract(int beginIndex,
                        int endIndex)
Extracts a page range from the document.

Parameters:
beginIndex - The beginning index, inclusive.
endIndex - The ending index, exclusive.
Returns:
Extracted page range.

move

public void move(int beginIndex,
                 int endIndex,
                 int targetIndex)
Moves a page range to a target position within the document.

Parameters:
beginIndex - The beginning index, inclusive.
endIndex - The ending index, exclusive.
targetIndex - The target index.

getDocument

public Document getDocument()
Gets the document being manipulated.


remove

public void remove(int beginIndex,
                   int endIndex)
Removes a page range from the document.

Parameters:
beginIndex - The beginning index, inclusive.
endIndex - The ending index, exclusive.

setDocument

public void setDocument(Document value)
Sets the document to manipulate.


split

public List<Document> split()
Splits the document into multiple single-paged documents.

Returns:
A list of single-paged documents.

PDF Clown
0.0.8

Project home page

Copyright © 2006-2010 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.