com.qoppa.pdfNotes.settings
Class CalloutTool

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

public class CalloutTool
extends Object

This class manages the default properties and settings for the Callout 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
CalloutTool()
           
 
Method Summary
static Color getDefaultBorderColor()
          Returns the color used for the border when a new annotation is created.
static int getDefaultBorderWidth()
          Deprecated. Replaced with getDefaultBorderWidth2D() for more precise border widths
static double getDefaultBorderWidth2D()
          Returns the default border width, used when new annotations are created.
static Color getDefaultColor()
          Returns the default color.
static Color getDefaultFillColor()
          Gets the default fill color.
static Font getDefaultFont()
          Gets the default font for free text annotations.
static int getDefaultHorizontalAlign()
          Returns the default horizontal alignment property used when a new free text annotation is created.
static int getDefaultVerticalAlign()
          Returns the default vertical alignment property used when a new free text annotation is 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 setDefaultBorderColor(Color defaultBorderColor)
          Sets the default border color.
static void setDefaultBorderWidth(int defaultBorderWidth)
          Deprecated. Replaced with setDefaultBorderWidth2D(double) for more precise border widths
static void setDefaultBorderWidth2D(double defaultBorderWidth)
          Sets the border width used when a new annotation is created.
static void setDefaultColor(Color defaultColor)
          Sets the default color.
static void setDefaultFillColor(Color defaultFillColor)
          Sets the default fill color.
static void setDefaultFont(String name, int style, int size)
          Sets the default Font for the CalloutTool.
static void setDefaultHorizontalAlign(int defaultHorizontalAlign)
          Sets the default horizontal alignment property.
static void setDefaultProperties(Callout callout)
          This is a convenience method to set the Callout properties to the CalloutTool default properties.
static void setDefaultVerticalAlign(int defaultVerticalAlign)
          Sets the default vertical alignment property.
static void setMinimumAnnotSize(Dimension minimumAnnotSize)
          Sets the minimum size for the annotations created with this Tool.
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

CalloutTool

public CalloutTool()
Method Detail

setDefaultProperties

public static void setDefaultProperties(Callout callout)
This is a convenience method to set the Callout properties to the CalloutTool default properties.


getDefaultFillColor

public static Color getDefaultFillColor()
Gets the default fill color. This color is used to fill in the annotation when a new annotation is created.

Returns:
the default fill color

setDefaultFillColor

public static void setDefaultFillColor(Color defaultFillColor)
Sets the default fill color. This color is used to fill in the annotation when a new annotation is created.

Parameters:
defaultFillColor - The new default fill color

getDefaultBorderColor

public static Color getDefaultBorderColor()
Returns the color used for the border when a new annotation is created.

Returns:
the default border color

setDefaultBorderColor

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

Parameters:
defaultBorderColor - The new default border color.

getDefaultBorderWidth2D

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

Returns:
the default border width value

setDefaultBorderWidth2D

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

Parameters:
defaultBorderWidth - The new default border 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

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 CalloutTool.

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

getDefaultHorizontalAlign

public static int getDefaultHorizontalAlign()
Returns the default horizontal alignment property used when a new free text annotation is created.

Returns:
the value of the horizontal alignment property

setDefaultHorizontalAlign

public static void setDefaultHorizontalAlign(int defaultHorizontalAlign)
Sets the default horizontal alignment property. This is used when a new free text annotation is created.

Parameters:
defaultHorizontalAlign - the new value for the default horizontal alignment

getDefaultVerticalAlign

public static int getDefaultVerticalAlign()
Returns the default vertical alignment property used when a new free text annotation is created.

Returns:
the value of the vertical alignment property

setDefaultVerticalAlign

public static void setDefaultVerticalAlign(int defaultVerticalAlign)
Sets the default vertical alignment property. This is used when a new free text annotation is created.

Parameters:
defaultVerticalAlign - the new value for the default vertical alignment

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

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