com.qoppa.pdfNotes.settings
Class CaretTool

java.lang.Object
  extended by com.qoppa.pdfNotes.settings.CaretTool

public class CaretTool
extends Object

This class manages the default properties and settings for the Caret 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
CaretTool()
           
 
Method Summary
static Color getDefaultColor()
          Returns the default color.
static double getDefaultSize()
           
static int getDefaultTransparency()
          Gets the default transparency value that is used when new annotations are created.
static Dimension getMinimumAnnotSize()
          Gets the minimum size for the annotations created with this Tool.
static boolean isShowPropDialog()
          Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static boolean isToolSticky()
          Returns a flag indicating if this tool is sticky.
static void setDefaultColor(Color defaultColor)
          Sets the default color.
static void setDefaultProperties(Caret caret)
          This is a convenience method to set the Text properties to the Caret Tool default properties.
static void setDefaultSize(int defaultSize)
          Sets the default size when new insertion annotations are created.
static void setDefaultTransparency(int defaultTransparency)
          Sets the default transparency values when new annotations are created.
static void setShowPropDialog(boolean showPropDialog)
          Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
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

CaretTool

public CaretTool()
Method Detail

setDefaultProperties

public static void setDefaultProperties(Caret caret)
This is a convenience method to set the Text properties to the Caret Tool default properties.


getDefaultTransparency

public static int getDefaultTransparency()
Gets the default transparency value that is used when new annotations are created.

Returns:
the default transparency value

setDefaultTransparency

public static void setDefaultTransparency(int defaultTransparency)
Sets the default transparency values when new annotations are created.

Parameters:
defaultTransparency - Thew new default transparency value

setDefaultSize

public static void setDefaultSize(int defaultSize)
Sets the default size when new insertion annotations are created.

Parameters:
defaultSize - The default width of the annotation (annotations are square, so only one dimension is needed)

getDefaultColor

public static Color getDefaultColor()
Returns the default color. This color is used to paint the icon 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.

isShowPropDialog

public static boolean isShowPropDialog()
Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.

Returns:
the showPropDialog

setShowPropDialog

public static void setShowPropDialog(boolean showPropDialog)
Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.

Parameters:
showPropDialog - the showPropDialog to set

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

getDefaultSize

public static double getDefaultSize()