com.qoppa.pdfNotes.settings
Class TextMarkupTools

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

public class TextMarkupTools
extends Object

This class manages the default properties and settings for the Text Markup Tools.

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
TextMarkupTools()
           
 
Method Summary
static Color getDefaultCrossoutColor()
          Returns the default crossout color.
static int getDefaultCrossoutTransparency()
          Returns the default crossout transparency.
static Color getDefaultHighlightColor()
          Returns the default highlight color.
static int getDefaultHighlightTransparency()
          Returns the default highlight transparency.
static Color getDefaultReplacementColor()
          Returns the default replacement color.
static int getDefaultReplacementTransparency()
          Returns the default replacement transparency.
static Color getDefaultSquigglyColor()
          Returns the default squiggly underline color.
static int getDefaultSquigglyTransparency()
          Returns the default squiggly underline transparency.
static Color getDefaultUnderlineColor()
          Returns the default underline color.
static int getDefaultUnderlineTransparency()
          Returns the default underline transparency.
static Dimension getMinimumAnnotSize()
          Gets the minimum size for the annotations created with this Tool.
static boolean isCrossoutSticky()
          Returns a flag indicating if this tool is sticky.
static boolean isHighlightSticky()
          Returns a flag indicating if this tool is sticky.
static boolean isReplacementSticky()
          Returns a flag indicating if this tool is sticky.
static boolean isSetContentsFromTextCrossout()
          Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.
static boolean isSetContentsFromTextHighlight()
          Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.
static boolean isSetContentsFromTextReplacement()
          Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.
static boolean isSetContentsFromTextSquiggly()
          Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.
static boolean isSetContentsFromTextUnderline()
          Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.
static boolean isShowPropDialogCrossout()
          Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static boolean isShowPropDialogHighlight()
          Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static boolean isShowPropDialogReplacement()
          Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static boolean isShowPropDialogSquiggly()
          Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static boolean isShowPropDialogUnderline()
          Gets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static boolean isSquigglySticky()
          Returns a flag indicating if this tool is sticky.
static boolean isUnderlineSticky()
          Returns a flag indicating if this tool is sticky.
static void setContentsFromTextCrossout(boolean setContentsFromText)
          Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation.
static void setContentsFromTextHighlight(boolean setContentsFromText)
          Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation.
static void setContentsFromTextReplacement(boolean setContentsFromText)
          Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation.
static void setContentsFromTextSquiggly(boolean setContentsFromText)
          Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation.
static void setContentsFromTextUnderline(boolean setContentsFromText)
          Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation.
static void setCrossoutSticky(boolean sticky)
          Sets the flag that indicates whether this tool is sticky or not.
static void setDefaultCrossoutColor(Color defaultCrossoutColor)
          Sets the default crossout color.
static void setDefaultCrossoutTransparency(int defaultCrossoutTransparency)
          Sets the default crossout transparency.
static void setDefaultHighlightColor(Color defaultHighlightColor)
          Sets the default highlight color.
static void setDefaultHighlightTransparency(int defaultHighlightTransparency)
          Sets the default highlight transparency.
static void setDefaultReplacementColor(Color defaultReplacementColor)
          Sets the default replacement color.
static void setDefaultReplacementTransparency(int defaultReplacementTransparency)
          Sets the default replacement transparency.
static void setDefaultSquigglyColor(Color defaultSquigglyColor)
          Sets the default squiggly underline color.
static void setDefaultSquigglyTransparency(int defaultSquigglyTransparency)
          Sets the default squiggly underline transparency.
static void setDefaultUnderlineColor(Color defaultUnderlineColor)
          Sets the default underline color.
static void setDefaultUnderlineTransparency(int defaultUnderlineTransparency)
          Sets the default underline transparency.
static void setHighlightSticky(boolean sticky)
          Sets the flag that indicates whether this tool is sticky or not.
static void setMinimumAnnotSize(Dimension minimumAnnotSize)
          Sets the minimum size for the annotations created with this Tool.
static void setReplacementSticky(boolean sticky)
          Sets the flag that indicates whether this tool is sticky or not.
static void setShowPropDialogCrossout(boolean showPropDialogCrossout)
          Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static void setShowPropDialogHighlight(boolean showPropDialogHighlight)
          Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static void setShowPropDialogReplacement(boolean showPropDialogReplacement)
          Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static void setShowPropDialogSquiggly(boolean showPropDialogSquiggly)
          Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static void setShowPropDialogUnderline(boolean showPropDialogUnderline)
          Sets the flag for this Tool to show or not the annotation properties popup dialog after an annotation has been created.
static void setSquigglySticky(boolean sticky)
          Sets the flag that indicates whether this tool is sticky or not.
static void setUnderlineSticky(boolean sticky)
          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

TextMarkupTools

public TextMarkupTools()
Method Detail

getDefaultHighlightColor

public static Color getDefaultHighlightColor()
Returns the default highlight color. This color is used when creating new highlight annotations.

Returns:
the default highlight color

setDefaultHighlightColor

public static void setDefaultHighlightColor(Color defaultHighlightColor)
Sets the default highlight color. This color is used when creating new highlight annotations.

Parameters:
defaultHighlightColor - The new value of the default highlight color to set

getDefaultUnderlineColor

public static Color getDefaultUnderlineColor()
Returns the default underline color. This color is used when creating new underline annotations.

Returns:
the default underline color

setDefaultUnderlineColor

public static void setDefaultUnderlineColor(Color defaultUnderlineColor)
Sets the default underline color. This color is used when creating new underline annotations.

Parameters:
defaultUnderlineColor - The new value of the default underline color to set

getDefaultCrossoutColor

public static Color getDefaultCrossoutColor()
Returns the default crossout color. This color is used when creating new crossout annotations.

Returns:
the default crossout color

setDefaultCrossoutColor

public static void setDefaultCrossoutColor(Color defaultCrossoutColor)
Sets the default crossout color. This color is used when creating new crossout annotations.

Parameters:
defaultCrossoutColor - The new value of the default crossout color to set

getDefaultSquigglyColor

public static Color getDefaultSquigglyColor()
Returns the default squiggly underline color. This color is used when creating new squiggly underline annotations.

Returns:
the default squiggly underline color

setDefaultSquigglyColor

public static void setDefaultSquigglyColor(Color defaultSquigglyColor)
Sets the default squiggly underline color. This color is used when creating new squiggly underline annotations.

Parameters:
defaultSquigglyColor - The new value of the default squiggly underline color to set

getDefaultReplacementColor

public static Color getDefaultReplacementColor()
Returns the default replacement color. This color is used when creating new replacement annotations.

Returns:
the default replacement color

setDefaultReplacementColor

public static void setDefaultReplacementColor(Color defaultReplacementColor)
Sets the default replacement color. This color is used when creating new replacement annotations.

Parameters:
defaultReplacementColor - The new value of the default replacement color to set

getDefaultHighlightTransparency

public static int getDefaultHighlightTransparency()
Returns the default highlight transparency. This transparency is used when creating new highlight annotations.

Returns:
the default highlight transparency

setDefaultHighlightTransparency

public static void setDefaultHighlightTransparency(int defaultHighlightTransparency)
Sets the default highlight transparency. This transparency is used when creating new highlight annotations.

Parameters:
defaultHighlightTransparency - The new value of the default highlight transparency to set

getDefaultUnderlineTransparency

public static int getDefaultUnderlineTransparency()
Returns the default underline transparency. This transparency is used when creating new underline annotations.

Returns:
the default underline transparency

setDefaultUnderlineTransparency

public static void setDefaultUnderlineTransparency(int defaultUnderlineTransparency)
Sets the default underline transparency. This transparency is used when creating new underline annotations.

Parameters:
defaultUnderlineTransparency - The new value of the default underline transparency to set

getDefaultCrossoutTransparency

public static int getDefaultCrossoutTransparency()
Returns the default crossout transparency. This transparency is used when creating new crossout annotations.

Returns:
the default crossout transparency

setDefaultCrossoutTransparency

public static void setDefaultCrossoutTransparency(int defaultCrossoutTransparency)
Sets the default crossout transparency. This color is used when creating new crossout annotations.

Parameters:
defaultCrossoutTransparency - The new value of the default crossout transparency to set

getDefaultSquigglyTransparency

public static int getDefaultSquigglyTransparency()
Returns the default squiggly underline transparency. This transparency is used when creating new squiggly underline annotations.

Returns:
the default squiggly underline transparency

setDefaultSquigglyTransparency

public static void setDefaultSquigglyTransparency(int defaultSquigglyTransparency)
Sets the default squiggly underline transparency. This transparency is used when creating new squiggly underline annotations.

Parameters:
defaultSquigglyTransparency - The new value of the default squiggly underline transparency to set

getDefaultReplacementTransparency

public static int getDefaultReplacementTransparency()
Returns the default replacement transparency. This transparency is used when creating new replacement annotations.

Returns:
the default replacement transparency

setDefaultReplacementTransparency

public static void setDefaultReplacementTransparency(int defaultReplacementTransparency)
Sets the default replacement transparency. This transparency is used when creating new replacement annotations.

Parameters:
defaultReplacementTransparency - The new value of the default replacement transparency to set

isShowPropDialogHighlight

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

Returns:
the showPropDialogHighlight

setShowPropDialogHighlight

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

Parameters:
showPropDialogHighlight - the showPropDialogHighlight to set

isShowPropDialogUnderline

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

Returns:
the showPropDialogUnderline

setShowPropDialogUnderline

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

Parameters:
showPropDialogUnderline - the showPropDialogUnderline to set

isShowPropDialogCrossout

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

Returns:
the showPropDialogCrossout

setShowPropDialogCrossout

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

Parameters:
showPropDialogCrossout - the showPropDialogCrossout to set

isShowPropDialogSquiggly

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

Returns:
the showPropDialogSquiggly

isShowPropDialogReplacement

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

Returns:
the showPropDialogReplacement

setShowPropDialogSquiggly

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

Parameters:
showPropDialogSquiggly - the showPropDialogSquiggly to set

setShowPropDialogReplacement

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

Parameters:
showPropDialogReplacement - the showPropDialogReplacement 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

setContentsFromTextHighlight

public static void setContentsFromTextHighlight(boolean setContentsFromText)
Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation. If the document's permissions do not allow text extraction, a silent exception will be caught and the MarkUpText content will not be set.

Parameters:
setContentsFromText - if true, the MarkUpText annotation content will be initialized to the text within the quadrilaterals

isSetContentsFromTextHighlight

public static boolean isSetContentsFromTextHighlight()
Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.

Returns:
true if the MarkUpText annotation content should be initialized to the text contained within the quadrilaterals, false otherwise.

setContentsFromTextUnderline

public static void setContentsFromTextUnderline(boolean setContentsFromText)
Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation. If the document's permissions do not allow text extraction, a silent exception will be caught and the MarkUpText content will not be set.

Parameters:
setContentsFromText - if true, the MarkUpText annotation content will be initialized to the text within the quadrilaterals

isSetContentsFromTextUnderline

public static boolean isSetContentsFromTextUnderline()
Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.

Returns:
true if the MarkUpText annotation content should be initialized to the text contained within the quadrilaterals, false otherwise.

setContentsFromTextCrossout

public static void setContentsFromTextCrossout(boolean setContentsFromText)
Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation. If the document's permissions do not allow text extraction, a silent exception will be caught and the MarkUpText content will not be set.

Parameters:
setContentsFromText - if true, the MarkUpText annotation content will be initialized to the text within the quadrilaterals

isSetContentsFromTextCrossout

public static boolean isSetContentsFromTextCrossout()
Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.

Returns:
true if the MarkUpText annotation content should be initialized to the text contained within the quadrilaterals, false otherwise.

setContentsFromTextSquiggly

public static void setContentsFromTextSquiggly(boolean setContentsFromText)
Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation. If the document's permissions do not allow text extraction, a silent exception will be caught and the MarkUpText content will not be set.

Parameters:
setContentsFromText - if true, the MarkUpText annotation content will be initialized to the text within the quadrilaterals

isSetContentsFromTextSquiggly

public static boolean isSetContentsFromTextSquiggly()
Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.

Returns:
true if the MarkUpText annotation content should be initialized to the text contained within the quadrilaterals, false otherwise.

setContentsFromTextReplacement

public static void setContentsFromTextReplacement(boolean setContentsFromText)
Sets the MarkUpText annotation content to the text contained within the quadrilaterals when creating a new MarkUpText annotation. If the document's permissions do not allow text extraction, a silent exception will be caught and the MarkUpText content will not be set.

Parameters:
setContentsFromText - if true, the MarkUpText annotation content will be initialized to the text within the quadrilaterals

isSetContentsFromTextReplacement

public static boolean isSetContentsFromTextReplacement()
Returns true if a new MarkUpText annotation content should be initialzed to the text contained within the quadrilaterals.

Returns:
true if the MarkUpText annotation content should be initialized to the text contained within the quadrilaterals, false otherwise.

isHighlightSticky

public static boolean isHighlightSticky()
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

setHighlightSticky

public static void setHighlightSticky(boolean sticky)
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:
sticky - The new value of the sticky flag.

isUnderlineSticky

public static boolean isUnderlineSticky()
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

setUnderlineSticky

public static void setUnderlineSticky(boolean sticky)
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:
sticky - The new value of the sticky flag.

isCrossoutSticky

public static boolean isCrossoutSticky()
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

setCrossoutSticky

public static void setCrossoutSticky(boolean sticky)
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:
sticky - The new value of the sticky flag.

isSquigglySticky

public static boolean isSquigglySticky()
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

setSquigglySticky

public static void setSquigglySticky(boolean sticky)
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:
sticky - The new value of the sticky flag.

isReplacementSticky

public static boolean isReplacementSticky()
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

setReplacementSticky

public static void setReplacementSticky(boolean sticky)
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:
sticky - The new value of the sticky flag.