public class TypewriterTool extends Object
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
.
Constructor and Description |
---|
TypewriterTool() |
Modifier and Type | Method and Description |
---|---|
static Color |
getDefaultColor()
Returns the default color.
|
static Font |
getDefaultFont()
Deprecated.
Use getDefaultFontName() and getDefaultFontSize() instead
|
static String |
getDefaultFontName()
Returns the name of the default font.
|
static float |
getDefaultFontSize()
Returns the point size of the default font
|
static boolean |
getDefaultStrikethrough()
Gets the default strikethrough value that is used when new annotations are created.
|
static int |
getDefaultTransparency()
Gets the default transparency value that is used when new annotations are created.
|
static boolean |
getDefaultUnderline()
Gets the default underline 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 |
isToolSticky()
Returns a flag indicating if this tool is sticky.
|
static void |
setDefaultColor(Color defaultColor)
Sets the default color.
|
static void |
setDefaultFont(String name,
int style,
int size)
Deprecated.
Use setDefaultFontName() and setDefaultFontSize() instead
|
static void |
setDefaultFontName(String fontName)
Sets the name of the default font.
|
static void |
setDefaultFontSize(float fontSize)
Sets the point size of the default font.
|
static void |
setDefaultProperties(FreeText freeText)
This is a convenience method to set the FreeText properties to the
TypewriterTool default properties.
|
static void |
setDefaultStrikethrough(boolean defaultStrikethrough)
Sets the default strikethrough value that is used when new annotations are created.
|
static void |
setDefaultTransparency(int defaultTransparency)
Sets the default transparency values when new annotations are created.
|
static void |
setDefaultUnderline(boolean defaultUnderline)
Sets the default underline value that is used when new annotations are created.
|
static void |
setMinimumAnnotSize(Dimension minimumAnnotSize)
Sets the minimum size for the annotations created with this Tool.
|
static void |
setToolSticky(boolean toolSticky)
Sets the flag that indicates whether this tool is sticky or not.
|
public static void setDefaultProperties(FreeText freeText)
public static Font getDefaultFont()
public static void setDefaultFont(String name, int style, int size)
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.
name
- style
- size
- public static Color getDefaultColor()
public static void setDefaultColor(Color defaultColor)
defaultColor
- the new default colorpublic static boolean isToolSticky()
public static void setToolSticky(boolean toolSticky)
toolSticky
- The new value of the sticky flag.public static Dimension getMinimumAnnotSize()
public static void setMinimumAnnotSize(Dimension minimumAnnotSize)
minimumAnnotSize
- the minimumAnnotSize to setpublic static String getDefaultFontName()
public static void setDefaultFontName(String fontName)
The supported fonts are Helvetica, Helvetica-Bold, Helvetica-Oblique, Helvetica-BoldOblique, Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique, Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic.
The font will default to Courier.
fontName
- The default font name.public static float getDefaultFontSize()
public static void setDefaultFontSize(float fontSize)
fontSize
- The default font size.public static int getDefaultTransparency()
public static void setDefaultTransparency(int defaultTransparency)
defaultTransparency
- The new default transparency valuepublic static boolean getDefaultStrikethrough()
public static void setDefaultStrikethrough(boolean defaultStrikethrough)
defaultStrikethrough
- The new default strikethrough valuepublic static boolean getDefaultUnderline()
public static void setDefaultUnderline(boolean defaultUnderline)
defaultUnderline
- The new default underline value