org.icepdf.ri.common
Class ViewModel

java.lang.Object
  extended by org.icepdf.ri.common.ViewModel

public class ViewModel
extends java.lang.Object

Data model for the view, which maintains state on how a Document is being presented to the user.

The default value of isShrinkToPrintableArea is true.

Since:
2.0
Author:
Mark Collette

Constructor Summary
ViewModel()
           
 
Method Summary
static java.io.File getDefaultFile()
           
static java.lang.String getDefaultFilePath()
           
static java.lang.String getDefaultURL()
           
 int getPrintCopies()
          Number of copies to print
 PrintHelper getPrintHelper()
           
 boolean isShrinkToPrintableArea()
          Indicates the currently stored state of the shrink to fit printable area property.
 boolean isWidgetAnnotationHighlight()
          Indicates that widget highlighting is enabled.
static void setDefaultFile(java.io.File f)
           
static void setDefaultFilePath(java.lang.String defFilePath)
           
static void setDefaultURL(java.lang.String defURL)
           
 void setIsWidgetAnnotationHighlight(boolean isWidgetAnnotationHighlight)
          Sets the value of widgetAnnotation highlight model.
 void setPrintCopies(int printCopies)
          Sets the number of print copies that should be make during the next print.
 void setPrintHelper(PrintHelper printHelper)
           
 void setShrinkToPrintableArea(boolean shrinkToPrintableArea)
          Can be set before a SwingController.print() is called to enable/disable shrink to fit printable area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewModel

public ViewModel()
Method Detail

getDefaultFile

public static java.io.File getDefaultFile()

getDefaultFilePath

public static java.lang.String getDefaultFilePath()

getDefaultURL

public static java.lang.String getDefaultURL()

setDefaultFile

public static void setDefaultFile(java.io.File f)

setDefaultFilePath

public static void setDefaultFilePath(java.lang.String defFilePath)

setDefaultURL

public static void setDefaultURL(java.lang.String defURL)

getPrintHelper

public PrintHelper getPrintHelper()

setPrintHelper

public void setPrintHelper(PrintHelper printHelper)

isShrinkToPrintableArea

public boolean isShrinkToPrintableArea()
Indicates the currently stored state of the shrink to fit printable area property.

Returns:
true, to enable shrink to fit printable area; false, otherwise.

setShrinkToPrintableArea

public void setShrinkToPrintableArea(boolean shrinkToPrintableArea)
Can be set before a SwingController.print() is called to enable/disable shrink to fit printable area.

Parameters:
shrinkToPrintableArea - true, to enable shrink to fit printable area; false, otherwise.

getPrintCopies

public int getPrintCopies()
Number of copies to print

Returns:
number of copies to print

setPrintCopies

public void setPrintCopies(int printCopies)
Sets the number of print copies that should be make during the next print.

Parameters:
printCopies - one or more copies

isWidgetAnnotationHighlight

public boolean isWidgetAnnotationHighlight()
Indicates that widget highlighting is enabled.

Returns:
true if enabled, otherwise false.

setIsWidgetAnnotationHighlight

public void setIsWidgetAnnotationHighlight(boolean isWidgetAnnotationHighlight)
Sets the value of widgetAnnotation highlight model.

Parameters:
isWidgetAnnotationHighlight - true to enable highlight, otherwise false.