|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfTextFormatter
This class is used to retrieve and
specify settings related to text formatting. A single instance of
the class can be associated with multiple PdfPage
objects. An object of this class is returned when
getTextFormatter
method is used on a PdfPage
object. Formatting settings specified on the
PdfTextFormatter
object will affect subsequent calls
to writeText
method for the page.
The text formatting attributes supported by this class are as follows:
An object of the PdfTextFormatter
class has the
following settings as default:
Field Summary | |
static int |
CENTER
Constant to align text to center. |
static int |
HORIZONTAL
|
static int |
JUSTIFIED
Constant to align text to both left and right margins. |
static int |
LEFT
Constant to align text to left margin. |
static int |
LEFT_TO_RIGHT
|
static boolean |
NO_WRAP
Constant to prevent text wrapping. |
static int |
RIGHT
Constant to align text to right margin. |
static int |
RIGHT_TO_LEFT
|
static int |
VERTICAL
|
static boolean |
WRAP
Constant to wrap text. |
Constructor Summary | |
PdfTextFormatter()
Zero-argument default constructor. |
Method Summary | |
Object |
clone()
|
int |
getAlignment()
Retrieves text alignment. |
double |
getCharSpacing()
|
int |
getDirection()
|
double |
getFirstLinePosition()
Retrieves default position where first line of text is set to be written inside rectangles. |
double |
getLineSpacing()
|
double |
getRise()
|
double |
getScaling()
|
double |
getWordSpacing()
|
int |
getWritingMode()
|
boolean |
isJustifyLastLine()
Retrieves whether last line is aligned to both left and right margins. |
boolean |
isWrap()
Retrieves whether text is set to wrap. |
void |
setAlignment(int alignment)
Specifies text alignment. |
void |
setCharSpacing(double charSpacing)
|
void |
setDirection(int direction)
|
void |
setFirstLinePosition(double firstLinePosition)
Specifies default position where first line of text should be written inside rectangles. |
void |
setJustifyLastLine(boolean justifyLastLine)
Specifies whether last line should be aligned to both left and right margins. |
void |
setLineSpacing(double lineSpacing)
|
void |
setRise(double rise)
|
void |
setScaling(double scaling)
|
void |
setWordSpacing(double wordSpacing)
|
void |
setWrap(boolean wrap)
Specifies whether text should wrap. |
void |
setWritingMode(int writingMode)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean WRAP
public static final boolean NO_WRAP
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public static final int JUSTIFIED
public static final int HORIZONTAL
public static final int VERTICAL
public static final int LEFT_TO_RIGHT
public static final int RIGHT_TO_LEFT
Constructor Detail |
public PdfTextFormatter()
Method Detail |
public Object clone()
public int getAlignment()
setAlignment(int)
public void setAlignment(int alignment)
alignment
- constant specifying text alignmentgetAlignment()
public double getCharSpacing()
public void setCharSpacing(double charSpacing)
public int getDirection()
public void setDirection(int direction)
public double getLineSpacing()
public void setLineSpacing(double lineSpacing)
public double getRise()
public void setRise(double rise)
public double getScaling()
public void setScaling(double scaling)
public double getWordSpacing()
public void setWordSpacing(double wordSpacing)
public boolean isWrap()
setWrap(boolean)
public void setWrap(boolean wrap)
wrap
- constant specifying whether text needs to wrappedisWrap()
public int getWritingMode()
public void setWritingMode(int writingMode)
public double getFirstLinePosition()
setFirstLinePosition(double)
public void setFirstLinePosition(double firstLinePosition)
firstLinePosition
must be less than the total width of the rectangle. Else, the
first line defaults to the first position on the second line.
firstLinePosition
- default position inside rectangles where the first
line of text should begin (Applied in current
measurement unit)getFirstLinePosition()
public boolean isJustifyLastLine()
true
if last line is aligned to both left
and right margins.
false
if otherwise.setJustifyLastLine(boolean)
public void setJustifyLastLine(boolean justifyLastLine)
justifyLastLine
- true
aligns last line text to both left and
right margins.
false
defaults the alignment to the left
margin.isJustifyLastLine()
|
Pro. Ed. v1.41 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |