public class AnnotationTools extends Object
All of the tool's property values can be retrieved and initialized with the
methods toXMLString()
and setFromXML()
.
Modifier and Type | Field and Description |
---|---|
static String |
XMLKEY_TOOL_DEFAULTS
XML Element name used for reading/writing as an XML string
|
Constructor and Description |
---|
AnnotationTools() |
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultAuthor()
Returns the default author.
|
static boolean |
isAuthorEditable()
Returns the value of the editable flag for the author field.
|
static boolean |
isContextMenuEnabled()
Returns the value of the flag that controls whether the context menu will
be shown when right-clickin on annotations.
|
static boolean |
isDeleteEnabled()
Returns the value of the annotation delete enabled flag.
|
static boolean |
isFlatteningEnabled()
Returns the value of the flattening enabled flag.
|
static boolean |
isGroupingEnabled()
Returns the value of the annotation grouping enabled flag.
|
static boolean |
isReviewEnabled()
Returns the flag that indicates whether the review status cycle is enabled.
|
static boolean |
isShiftKeyPressed()
Returns the value of the flag that controls whether the Shift key should
be simulated when creating Lines, Polylines, Polygons, and each of the
respective dimension annotations (Distance, Perimeter, Area).
|
static boolean |
isShowDimensionDialog()
Returns the value of the show dimension dialog flag.
|
static boolean |
isSnapEnabled()
Returns the value of the snap to content enabled flag.
|
static void |
setAuthorEditable(boolean editable)
Sets the author field as editable or read only.
|
static void |
setContextMenuEnabled(boolean contexrtMenuEnabled)
Sets a flag to indicate whether the context menu should be displayed when
right-clicking on annotations.
|
static void |
setDefaultAuthor(String defaultAuthor)
Sets the default author.
|
static void |
setDeleteEnabled(boolean enabled)
Sets a flag to indicate whether annotation deletion should be enabled.
|
static void |
setFlatteningEnabled(boolean enabled)
Sets a flag to indicate whether annotation flattening should be enabled
in the bean.
|
static void |
setFromXML(String xmlString)
This method sets the Tool default properties with properly formatted
String xml element. |
static void |
setGroupingEnabled(boolean enabled)
Sets a flag to indicate whether annotation grouping should be enabled.
|
static void |
setReviewEnabled(boolean reviewEnabled)
Sets a flag to indicate whether annotation review status should be enabled.
|
static void |
setShiftKeyPressed(boolean shiftKeyPressed)
Sets a flag to indicate whether the Shift key should be simulated when
creating Lines, Polylines, Polygons, and each of the respective dimension
annotations (Distance, Perimeter, Area).
|
static void |
setSnapToContent(boolean snap)
Sets a flag to indicate whether snapping to content should be enabled
when drawing dimension annotations.
|
static void |
showDimensionDialog(boolean show)
Sets a flag to indicate whether to show the dimension dialog when
creating dimension annotations (distance, perimeter, area).
|
static String |
toXMLString()
This method creates a
String that contains an xml element of
the Tool default properties. |
public static final String XMLKEY_TOOL_DEFAULTS
public static String getDefaultAuthor()
public static void setDefaultAuthor(String defaultAuthor)
defaultAuthor
- The defaultAuthor to setpublic static void setAuthorEditable(boolean editable)
editable
- the new value of the flag.public static boolean isAuthorEditable()
public static void setFromXML(String xmlString)
String
xml element.
Properties are set for AreaHighlightTool, AreaTool, ArrowTool,
BookmarkTool, CalloutTool, CaretTool, CircleTool, CloudTool, DistanceTool,
FileAttachmentTool, FreeTextTool, LineTool, LinkTool, PencilTool,
PerimeterTool, PolygonTool, PolylineTool, RedactionTool, RubberStampTool,
SoundTool, SquareTool, StickyNoteTool, TextMarkupTools, and TypewriterTool.toXMLString()
public static String toXMLString()
String
that contains an xml element of
the Tool default properties. This String
can be stored and
used to set the Tool default properties.
Attributes are set for AreaHighlightTool, AreaTool, ArrowTool,
BookmarkTool, CalloutTool, CaretTool, CircleTool, CloudTool, DistanceTool,
FileAttachmentTool, FreeTextTool, LineTool, LinkTool, PencilTool,
PerimeterTool, PolygonTool, PolylineTool, RedactionTool, RubberStampTool,
SoundTool, SquareTool, StickyNoteTool, TextMarkupTools, and TypewriterTool.String
containing an xml element of the Tool
default properties.setFromXML(String)
public static void setFlatteningEnabled(boolean enabled)
enabled
- The new value of the flattening enabled flagpublic static boolean isFlatteningEnabled()
public static void setDeleteEnabled(boolean enabled)
enabled
- The new value of the delete annotations flagpublic static boolean isDeleteEnabled()
public static void setGroupingEnabled(boolean enabled)
enabled
- The new value of the grouping annotations flagpublic static boolean isGroupingEnabled()
public static void setSnapToContent(boolean snap)
snap
- The new value of the snap to content flagpublic static boolean isSnapEnabled()
public static void showDimensionDialog(boolean show)
show
- The new value of the show dimension dialog flag.public static boolean isShowDimensionDialog()
public static boolean isContextMenuEnabled()
public static void setContextMenuEnabled(boolean contexrtMenuEnabled)
contexrtMenuEnabled
- The new value of the flagpublic static void setReviewEnabled(boolean reviewEnabled)
reviewEnabled
- The new value of the flag.public static boolean isReviewEnabled()
public static boolean isShiftKeyPressed()
public static void setShiftKeyPressed(boolean shiftKeyPressed)
shiftKeyPressed
- The new value of the flag