com.qoppa.pdfNotes.settings
Class PencilTool

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

public class PencilTool
extends Object

This class manages the default properties and settings for the Pencil 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
PencilTool()
           
 
Method Summary
static Color getDefaultBorderColor()
          Returns the color used for the line when a new annotation is created.
static int getDefaultBorderWidth()
          Deprecated. Replaced with getDefaultBorderWidth2D() for more precise border widths
static double getDefaultBorderWidth2D()
          Returns the default line width, used when new annotations are created.
static int getDefaultTransparency()
          Gets the default transparency value that is used when new annotations are created.
static int getTimerDelay()
          Return the timer delay.
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 setDefaultBorderColor(Color defaultBorderColor)
          Sets the default line color.
static void setDefaultBorderWidth(int defaultBorderWidth)
          Deprecated. Replaced with setDefaultBorderWidth2D(double) for more precise border widths
static void setDefaultBorderWidth2D(double defaultBorderWidth)
          Sets the line width used when a new annotation is created.
static void setDefaultProperties(Ink ink)
          This is a convenience method to set the Ink properties to the PencilTool default properties.
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 setTimerDelay(int timerDelay)
          Sets the timer delay.
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

PencilTool

public PencilTool()
Method Detail

setDefaultProperties

public static void setDefaultProperties(Ink ink)
This is a convenience method to set the Ink properties to the PencilTool default properties.


getTimerDelay

public static int getTimerDelay()
Return the timer delay. This delay is used when the user lifts the mouse button after making a gesture. If the user starts a new gesture before this timer is expired, then the new gesture will be part of the same pencil annotation. Otherwise, a new pencil annotation is created.

Returns:
the current value of the time delay

setTimerDelay

public static void setTimerDelay(int timerDelay)
Sets the timer delay. This delay is used when the user lifts the mouse button after making a gesture. If the user starts a new gesture before this timer is expired, then the new gesture will be part of the same pencil annotation. Otherwise, a new pencil annotation is created.

Parameters:
timerDelay - The new value of the timer delay

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

getDefaultBorderWidth2D

public static double getDefaultBorderWidth2D()
Returns the default line width, used when new annotations are created.

Returns:
the default border width value

setDefaultBorderWidth2D

public static void setDefaultBorderWidth2D(double defaultBorderWidth)
Sets the line width used when a new annotation is created.

Parameters:
defaultBorderWidth - The new default line width

getDefaultBorderWidth

public static int getDefaultBorderWidth()
Deprecated. Replaced with getDefaultBorderWidth2D() for more precise border widths

Returns the default line width, used when new annotations are created.

Returns:
the default border width value

setDefaultBorderWidth

public static void setDefaultBorderWidth(int defaultBorderWidth)
Deprecated. Replaced with setDefaultBorderWidth2D(double) for more precise border widths

Sets the line width used when a new annotation is created.

Parameters:
defaultBorderWidth - The new default line width

getDefaultBorderColor

public static Color getDefaultBorderColor()
Returns the color used for the line when a new annotation is created. This property is called the border color because internally, the PDF format defines the line color as the border color.

Returns:
the default line color

setDefaultBorderColor

public static void setDefaultBorderColor(Color defaultBorderColor)
Sets the default line color. This color will be used when new annotations are created.

Parameters:
defaultBorderColor - The new default line 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