com.qoppa.pdfNotes.settings
Class TypewriterTool

java.lang.Object
  extended bycom.qoppa.pdfNotes.settings.TypewriterTool

public class TypewriterTool
extends Object

This class manages the default properties and settings for the Typewriter Tool. The method setDefaultProperties() can be used to set the Annotation properties to this Tool's default properties.

The Tool's property values can be retrieved and initialized with the methods toXMLString() and setFromXML() in the AnnotationTools class. Please see AnnotationTools.

Author:
Qoppa Software

Constructor Summary
TypewriterTool()
           
 
Method Summary
static Color getDefaultColor()
          Returns the default color.
static Font getDefaultFont()
          Gets the default font for free text annotations.
static Dimension getMinimumAnnotSize()
          Gets the minimum size for the annotations created with this Tool.
static boolean isToolSticky()
          Returns a flag indicating if this tool is sticky.
static void setDefaultColor(Color defaultColor)
          Sets the default color.
static void setDefaultFont(String name, int style, int size)
          Sets the default Font for the FreeTextTool.
static void setDefaultProperties(FreeText freeText)
          This is a convenience method to set the FreeText properties to the TypewriterTool default properties.
static void setMinimumAnnotSize(Dimension minimumAnnotSize)
          Sets the minimum size for the annotations created with this Tool.
static void setToolSticky(boolean toolSticky)
          Sets the flag that indicates whether this tool is sticky or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypewriterTool

public TypewriterTool()
Method Detail

setDefaultProperties

public static void setDefaultProperties(FreeText freeText)
This is a convenience method to set the FreeText properties to the TypewriterTool default properties.


getDefaultFont

public static Font getDefaultFont()
Gets the default font for free text annotations. This font is used when a new free text annotation is created.

Returns:
the default font

setDefaultFont

public static void setDefaultFont(String name,
                                  int style,
                                  int size)
Sets the default Font for the FreeTextTool.

The Font must be one of the PDF supported native fonts, therefore the only valid values for the font name are:

Helvetica or sansserif
Courier or monospaced
Times New Roman or serif

If the font name is not one of the preceding values, the font will default to sansserif.

Parameters:
name -
style -
size -

getDefaultColor

public static Color getDefaultColor()
Returns the default color. This color is used to paint the text in the annotation.

Returns:
the default color

setDefaultColor

public static void setDefaultColor(Color defaultColor)
Sets the default color. This color is used to paint the text in the annotation.

Parameters:
defaultColor - the new default color

isToolSticky

public static boolean isToolSticky()
Returns a flag indicating if this tool is sticky. When a tool is sticky, it will remain active after a user finishes adding a comment.

Returns:
the toolSticky flag

setToolSticky

public static void setToolSticky(boolean toolSticky)
Sets the flag that indicates whether this tool is sticky or not. When a tool is sticky, it will remain active after a user finishes adding a comment.

Parameters:
toolSticky - The new value of the sticky flag.

getMinimumAnnotSize

public static Dimension getMinimumAnnotSize()
Gets the minimum size for the annotations created with this Tool. When the annotation is drawn by a user with a "null size", the annotation size will be automatically set to the annotation's minimum size.

Returns:
the minimumAnnotSize

setMinimumAnnotSize

public static void setMinimumAnnotSize(Dimension minimumAnnotSize)
Sets the minimum size for the annotations created with this Tool. When the annotation is drawn by a user with a "null size", the annotation size will be automatically set to the annotation's minimum size.

Parameters:
minimumAnnotSize - the minimumAnnotSize to set