org.pdfsam.guiclient.commons.business.loaders
Class PdfThumbnailsLoader

java.lang.Object
  extended by org.pdfsam.guiclient.commons.business.loaders.PdfThumbnailsLoader

public class PdfThumbnailsLoader
extends java.lang.Object

Loads a document a create thumbnails

Author:
Andrea Vacondio

Constructor Summary
PdfThumbnailsLoader(JVisualPdfPageSelectionPanel panel)
           
 
Method Summary
 void addFile(java.io.File file)
          add a file to the JList
 void addFile(java.io.File file, boolean checkIfAlreadyAdded)
          add a file to the JList
 void addFile(java.io.File file, java.lang.String password)
          Add file without a template
 void addFile(java.io.File file, java.lang.String password, java.util.List<DocumentPage> template)
          add a file to the JList
 boolean canLoad()
          check if the panel is empty and, if necessary shows a dialog to ask the user
 void cleanCreator()
          Clean creator
 long getId()
           
 void showFileChooserAndAddFile()
          adds a file to the JList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfThumbnailsLoader

public PdfThumbnailsLoader(JVisualPdfPageSelectionPanel panel)
Method Detail

showFileChooserAndAddFile

public void showFileChooserAndAddFile()
                               throws ThumbnailCreationException
adds a file to the JList

Throws:
ThumbnailCreationException

canLoad

public boolean canLoad()
check if the panel is empty and, if necessary shows a dialog to ask the user

Returns:
true if can load

addFile

public void addFile(java.io.File file,
                    java.lang.String password,
                    java.util.List<DocumentPage> template)
             throws ThumbnailCreationException
add a file to the JList

Parameters:
file - input file
password - password
template - pages template
Throws:
ThumbnailCreationException

addFile

public void addFile(java.io.File file,
                    java.lang.String password)
             throws ThumbnailCreationException
Add file without a template

Parameters:
file -
password -
Throws:
ThumbnailCreationException

addFile

public void addFile(java.io.File file)
             throws ThumbnailCreationException
add a file to the JList

Parameters:
file - input file
Throws:
ThumbnailCreationException

addFile

public void addFile(java.io.File file,
                    boolean checkIfAlreadyAdded)
             throws ThumbnailCreationException
add a file to the JList

Parameters:
file -
checkIfAlreadyAdded - if true it checks if the list is already filled, if so it asks the user
Throws:
ThumbnailCreationException

cleanCreator

public void cleanCreator()
Clean creator


getId

public long getId()
Returns:
current id