com.qoppa.pdfNotes.settings
Class DistanceTool

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

public class DistanceTool
extends Object

This class manages the default properties and settings for the Distance 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
DistanceTool()
           
 
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 Color getDefaultFillColor()
          Returns the fill color.
static String getDefaultLineEndStyle()
          Gets the default line end style used when creating new line annotations.
static String getDefaultLineStartStyle()
          Gets the default line start style used when creating new line annotations.
static String getDefaultScaleDisplayUnits()
          Returns the default scale display units used when creating new measurements.
static String getDefaultScaleDisplayValue()
          Returns the default scale display value used when creating new measurements.
static String getDefaultScalePageUnits()
          Returns the default scale page units used when creating new measurements
static String getDefaultScalePageValue()
          Returns the default scale page value used when creating new measurements.
static String getDefaultScalePrecision()
          Returns the default scale precision used when creating new measurements
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 isShowCalibrateMessage()
          Returns the value of the show calibrate message flag.
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 setDefaultFillColor(Color defaultFillColor)
          Sets the default fill color.
static void setDefaultLineEndStyle(String defaultLineEndStyle)
          Possible values are: ShapeAnnotation.LE_NONE_STR ShapeAnnotation.LE_SQUARE_STR ShapeAnnotation.LE_CIRCLE_STR ShapeAnnotation.LE_DIAMOND_STR ShapeAnnotation.LE_OPENARROW_STR ShapeAnnotation.LE_CLOSEDARROW_STR
static void setDefaultLineStartStyle(String defaultLineStartStyle)
          Possible values are: ShapeAnnotation.LE_NONE_STR ShapeAnnotation.LE_SQUARE_STR ShapeAnnotation.LE_CIRCLE_STR ShapeAnnotation.LE_DIAMOND_STR ShapeAnnotation.LE_OPENARROW_STR ShapeAnnotation.LE_CLOSEDARROW_STR
static void setDefaultProperties(Line line)
          This is a convenience method to set the Line-Dimension properties to the MeasurementTool default properties.
static void setDefaultScaleDisplayUnits(String defaultScaleDisplayUnits)
          Sets the default scale display units to use when creating new measurements
static void setDefaultScaleDisplayValue(String defaultScaleDisplayValue)
          Sets the default scale display value to use when creating new measurements.
static void setDefaultScalePageUnits(String defaultScalePageUnits)
          Sets the default scale page units to use when creating new measurements
static void setDefaultScalePageValue(String defaultScalePageValue)
          Sets the default scale page value to use when creating new measurements.
static void setDefaultScalePrecision(String defaultScalePrecision)
          Sets the default scale precision to use when creating new measurements.
static void setDefaultTransparency(int defaultTransparency)
          Sets the default transparency values when new annotations are created.
static void setMinimumAnnotSize(Dimension minimumAnnotSize)
          Sets the minimum size for the annotations created with this Tool.
static void setShowCalibrateMessage(boolean show)
          Sets a flag to indicate whether to show the explanation message when calibrating the scale.
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

DistanceTool

public DistanceTool()
Method Detail

setDefaultProperties

public static void setDefaultProperties(Line line)
This is a convenience method to set the Line-Dimension properties to the MeasurementTool 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

getDefaultLineStartStyle

public static String getDefaultLineStartStyle()
Gets the default line start style used when creating new line annotations.

Returns:
the default line start style

setDefaultLineStartStyle

public static void setDefaultLineStartStyle(String defaultLineStartStyle)
Possible values are:

Parameters:
defaultLineStartStyle - the defaultLineStartStyle to set

getDefaultLineEndStyle

public static String getDefaultLineEndStyle()
Gets the default line end style used when creating new line annotations.

Returns:
the default line end style

setDefaultLineEndStyle

public static void setDefaultLineEndStyle(String defaultLineEndStyle)
Possible values are:

Parameters:
defaultLineEndStyle - the defaultLineEndStyle to set

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.

getDefaultFillColor

public static Color getDefaultFillColor()
Returns the fill color. This color is used to fill the arrow heads, if they are set to solid.

Returns:
the fill color

setDefaultFillColor

public static void setDefaultFillColor(Color defaultFillColor)
Sets the default fill color. This is the color used to fill in solid arrows when creating new arrow annotations.

Parameters:
defaultFillColor - the defaultFillColor to set

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

getDefaultScalePageValue

public static String getDefaultScalePageValue()
Returns the default scale page value used when creating new measurements.

Returns:
the default scale page value

setDefaultScalePageValue

public static void setDefaultScalePageValue(String defaultScalePageValue)
Sets the default scale page value to use when creating new measurements.

Parameters:
defaultScalePageValue - The new value of the default scale page value

getDefaultScalePageUnits

public static String getDefaultScalePageUnits()
Returns the default scale page units used when creating new measurements

Returns:
the default scale page units

setDefaultScalePageUnits

public static void setDefaultScalePageUnits(String defaultScalePageUnits)
Sets the default scale page units to use when creating new measurements

Parameters:
defaultScalePageUnits - The new value of the default scale page units

getDefaultScaleDisplayValue

public static String getDefaultScaleDisplayValue()
Returns the default scale display value used when creating new measurements.

Returns:
the default scale display value

setDefaultScaleDisplayValue

public static void setDefaultScaleDisplayValue(String defaultScaleDisplayValue)
Sets the default scale display value to use when creating new measurements.

Parameters:
defaultScaleDisplayValue - the new value of the default scale display value

getDefaultScaleDisplayUnits

public static String getDefaultScaleDisplayUnits()
Returns the default scale display units used when creating new measurements.

Returns:
the default scale display units

setDefaultScaleDisplayUnits

public static void setDefaultScaleDisplayUnits(String defaultScaleDisplayUnits)
Sets the default scale display units to use when creating new measurements

Parameters:
defaultScaleDisplayUnits - the new value for the default scale display units

getDefaultScalePrecision

public static String getDefaultScalePrecision()
Returns the default scale precision used when creating new measurements

Returns:
the default scale precision

setDefaultScalePrecision

public static void setDefaultScalePrecision(String defaultScalePrecision)
Sets the default scale precision to use when creating new measurements.

Parameters:
defaultScalePrecision - the new value of the default scale precision

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

setShowCalibrateMessage

public static void setShowCalibrateMessage(boolean show)
Sets a flag to indicate whether to show the explanation message when calibrating the scale.

Parameters:
show - The new value of the show calibrate message flag.

isShowCalibrateMessage

public static boolean isShowCalibrateMessage()
Returns the value of the show calibrate message flag.

Returns:
The value of the show calibrate message flag.