Class 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 Detail

      • ViewModel

        public ViewModel()
    • 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)
      • 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.