- java.lang.Object
-
- org.icepdf.ri.common.ViewModel
-
public class ViewModel extends Object
Data model for the current controller, 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
Constructors Constructor Description ViewModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAnnotationPrivacy()Gets the annotation privacy flag value.static FilegetDefaultFile()static StringgetDefaultFilePath()static StringgetDefaultURL()intgetPrintCopies()Number of copies to printPrintHelpergetPrintHelper()booleanisAnnotationEditingMode()Indicates that annotation editign tools will be painted is enabled.booleanisShrinkToPrintableArea()Indicates the currently stored state of the shrink to fit printable area property.booleanisWidgetAnnotationHighlight()Indicates that widget highlighting is enabled.voidsetAnnotationPrivacy(boolean annotationPrivacyPublic)Sets the annotation privacy flag valuestatic voidsetDefaultFile(File f)static voidsetDefaultFilePath(String defFilePath)static voidsetDefaultURL(String defURL)voidsetIsAnnotationEditingMode(boolean isAnnotationEditingMode)Sets the value of annotation edit mode flag.voidsetIsWidgetAnnotationHighlight(boolean isWidgetAnnotationHighlight)Sets the value of widgetAnnotation highlight model.voidsetPrintCopies(int printCopies)Sets the number of print copies that should be make during the next print.voidsetPrintHelper(PrintHelper printHelper)voidsetShrinkToPrintableArea(boolean shrinkToPrintableArea)Can be set before a Controller.print() is called to enable/disable shrink to fit printable area.
-
-
-
Method Detail
-
getDefaultFile
public static File getDefaultFile()
-
getDefaultFilePath
public static String getDefaultFilePath()
-
getDefaultURL
public static String getDefaultURL()
-
setDefaultFile
public static void setDefaultFile(File f)
-
setDefaultFilePath
public static void setDefaultFilePath(String defFilePath)
-
setDefaultURL
public static void setDefaultURL(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 Controller.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.
-
isAnnotationEditingMode
public boolean isAnnotationEditingMode()
Indicates that annotation editign tools will be painted 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.
-
setIsAnnotationEditingMode
public void setIsAnnotationEditingMode(boolean isAnnotationEditingMode)
Sets the value of annotation edit mode flag.- Parameters:
isAnnotationEditingMode- true to enable tools, otherwise false.
-
getAnnotationPrivacy
public boolean getAnnotationPrivacy()
Gets the annotation privacy flag value.- Returns:
- true indicates a public annotation and false a private annotation state.
-
setAnnotationPrivacy
public void setAnnotationPrivacy(boolean annotationPrivacyPublic)
Sets the annotation privacy flag value- Parameters:
annotationPrivacyPublic- true for public, false for private.
-
-