org.pdfsam.guiclient.dto
Class VisualPageListItem

java.lang.Object
  extended by org.pdfsam.guiclient.dto.VisualPageListItem
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class VisualPageListItem
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

DTO representing a page of a document

Author:
Andrea Vacondio
See Also:
Serialized Form

Constructor Summary
VisualPageListItem()
           
VisualPageListItem(java.awt.image.BufferedImage thumbnail, int pageNumber)
           
VisualPageListItem(java.awt.image.BufferedImage thumbnail, int pageNumber, boolean deleted)
           
VisualPageListItem(java.awt.image.BufferedImage thumbnail, int pageNumber, boolean deleted, java.lang.String parentFileCanonicalPath, java.lang.String documentPassword)
           
VisualPageListItem(java.awt.image.BufferedImage thumbnail, int pageNumber, boolean deleted, java.lang.String parentFileCanonicalPath, java.lang.String documentPassword, Rotation rotation)
           
VisualPageListItem(int pageNumber)
           
VisualPageListItem(int pageNumber, java.lang.String parentFileCanonicalPath)
           
VisualPageListItem(int pageNumber, java.lang.String parentFileCanonicalPath, java.lang.String documentPassword)
           
 
Method Summary
 java.lang.Object clone()
           
 int getCompleteRotation()
           
 java.lang.String getDocumentPassword()
           
 Rotation getOriginalRotation()
           
 int getPageNumber()
           
 java.lang.String getPaperFormat()
           
 java.lang.String getParentFileCanonicalPath()
           
 Rotation getRotation()
           
 java.awt.image.BufferedImage getThumbnail()
           
 boolean isDeleted()
           
 boolean isFullyRotated()
           
 boolean isRotated()
           
 void rotateAnticlockwise()
          rotate anticlockwise the item
 void rotateClockwise()
          rotate clockwise the item
 void setDeleted(boolean deleted)
           
 void setDocumentPassword(java.lang.String documentPassword)
           
 void setOriginalRotation(Rotation originalRotation)
           
 void setPageNumber(int pageNumber)
           
 void setPaperFormat(double width, double height)
          set the paper format using the screen resolution
 void setPaperFormat(double width, double height, int resolution)
          Set the paper format in a string format
 void setPaperFormat(java.lang.String paperFormat)
           
 void setParentFileCanonicalPath(java.lang.String parentFileCanonicalPath)
           
 void setRotation(Rotation rotation)
           
 void setThumbnail(java.awt.image.BufferedImage thumbnail)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisualPageListItem

public VisualPageListItem()

VisualPageListItem

public VisualPageListItem(int pageNumber)
Parameters:
pageNumber -

VisualPageListItem

public VisualPageListItem(int pageNumber,
                          java.lang.String parentFileCanonicalPath)
Parameters:
pageNumber -
parentFileCanonicalPath -

VisualPageListItem

public VisualPageListItem(int pageNumber,
                          java.lang.String parentFileCanonicalPath,
                          java.lang.String documentPassword)
Parameters:
pageNumber -
parentFileCanonicalPath -
documentPassword -

VisualPageListItem

public VisualPageListItem(java.awt.image.BufferedImage thumbnail,
                          int pageNumber)
Parameters:
thumbnail -
pageNumber -

VisualPageListItem

public VisualPageListItem(java.awt.image.BufferedImage thumbnail,
                          int pageNumber,
                          boolean deleted)
Parameters:
thumbnail -
pageNumber -
deleted -

VisualPageListItem

public VisualPageListItem(java.awt.image.BufferedImage thumbnail,
                          int pageNumber,
                          boolean deleted,
                          java.lang.String parentFileCanonicalPath,
                          java.lang.String documentPassword)
Parameters:
thumbnail -
pageNumber -
deleted -
parentFileCanonicalPath -
documentPassword -

VisualPageListItem

public VisualPageListItem(java.awt.image.BufferedImage thumbnail,
                          int pageNumber,
                          boolean deleted,
                          java.lang.String parentFileCanonicalPath,
                          java.lang.String documentPassword,
                          Rotation rotation)
Parameters:
thumbnail -
pageNumber -
deleted -
parentFileCanonicalPath -
documentPassword -
rotation -
Method Detail

getThumbnail

public java.awt.image.BufferedImage getThumbnail()
Returns:
the thumbnail

setThumbnail

public void setThumbnail(java.awt.image.BufferedImage thumbnail)
Parameters:
thumbnail - the thumbnails to set

getPageNumber

public int getPageNumber()
Returns:
the pageNumber

setPageNumber

public void setPageNumber(int pageNumber)
Parameters:
pageNumber - the pageNumber to set

isDeleted

public boolean isDeleted()
Returns:
the deleted

setDeleted

public void setDeleted(boolean deleted)
Parameters:
deleted - the deleted to set

getParentFileCanonicalPath

public java.lang.String getParentFileCanonicalPath()
Returns:
the parentFileCanonicalPath

setParentFileCanonicalPath

public void setParentFileCanonicalPath(java.lang.String parentFileCanonicalPath)
Parameters:
parentFileCanonicalPath - the parentFileCanonicalPath to set

getDocumentPassword

public java.lang.String getDocumentPassword()
Returns:
the documentPassword

setDocumentPassword

public void setDocumentPassword(java.lang.String documentPassword)
Parameters:
documentPassword - the documentPassword to set

getRotation

public Rotation getRotation()
Returns:
the rotation

setRotation

public void setRotation(Rotation rotation)
Parameters:
rotation - the rotation to set

rotateClockwise

public void rotateClockwise()
rotate clockwise the item


rotateAnticlockwise

public void rotateAnticlockwise()
rotate anticlockwise the item


isRotated

public boolean isRotated()
Returns:
true if this item is rotated

isFullyRotated

public boolean isFullyRotated()
Returns:
if the item has a 180 degrees rotation

setPaperFormat

public void setPaperFormat(double width,
                           double height,
                           int resolution)
Set the paper format in a string format

Parameters:
width - width of the generated image
height - height of the generated image
resolution - the resolution of the generated image

setPaperFormat

public void setPaperFormat(double width,
                           double height)
set the paper format using the screen resolution

Parameters:
width - width of the generated image
height - height of the generated image

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getPaperFormat

public java.lang.String getPaperFormat()
Returns:
the paperFormat

setPaperFormat

public void setPaperFormat(java.lang.String paperFormat)
Parameters:
paperFormat - the paperFormat to set

getOriginalRotation

public Rotation getOriginalRotation()
Returns:
the originalRotation

setOriginalRotation

public void setOriginalRotation(Rotation originalRotation)
Parameters:
originalRotation - the originalRotation to set

getCompleteRotation

public int getCompleteRotation()
Returns:
the full page rotation given by the sum of the originalRotation and rotation