java.lang.Objectcom.pdfjet.TextLine
public class TextLine
Used to create text line objects.
Constructor Summary | |
---|---|
TextLine(Font font)
Constructor for creating text line objects. |
|
TextLine(Font font,
java.lang.String text)
Constructor for creating text line objects. |
Method Summary | |
---|---|
float[] |
drawOn(Page page)
Draws this text line on the specified page. |
java.lang.String |
getActualText()
|
java.lang.String |
getAltDescription()
|
int |
getColor()
Returns the text line color. |
float |
getDestinationY()
Returns the y coordinate of the destination. |
Font |
getFallbackFont()
Returns the fallback font. |
Font |
getFont()
Gets the font to use for this text line. |
java.lang.String |
getGoToAction()
Returns the GoTo action string. |
float |
getHeight()
Returns the height of this TextLine. |
java.lang.String |
getLanguage()
|
boolean |
getStrikeout()
Returns the strikeout flag. |
java.lang.String |
getText()
Returns the text. |
int |
getTextDirection()
Returns the text direction. |
int |
getTextEffect()
Returns the text effect. |
boolean |
getTrailingSpace()
Returns the trailing space. |
boolean |
getUnderline()
Returns the underline flag. |
java.lang.String |
getURIAction()
Returns the action URI. |
float |
getVerticalOffset()
Returns the vertical text offset. |
float |
getWidth()
Returns the width of this TextLine. |
float |
getY()
Returns the y coordinate of the destination. |
TextLine |
placeIn(Box box)
Places this text line in the specified box. |
TextLine |
placeIn(Box box,
double x_offset,
double y_offset)
Places this text line in the box at the specified offset. |
TextLine |
placeIn(Box box,
float x_offset,
float y_offset)
Places this text line in the box at the specified offset. |
TextLine |
setActualText(java.lang.String actualText)
Sets the actual text for this text line. |
TextLine |
setAltDescription(java.lang.String altDescription)
Sets the alternate description of this text line. |
TextLine |
setColor(int color)
Sets the color for this text line. |
TextLine |
setColor(int[] color)
Sets the pen color. |
TextLine |
setFallbackFont(Font fallbackFont)
Sets the fallback font. |
TextLine |
setFallbackFontSize(float fallbackFontSize)
Sets the fallback font size to use for this text line. |
TextLine |
setFont(Font font)
Sets the font to use for this text line. |
TextLine |
setFontSize(float fontSize)
Sets the font size to use for this text line. |
TextLine |
setGoToAction(java.lang.String key)
Sets the destination key for the action. |
TextLine |
setLanguage(java.lang.String language)
|
TextLine |
setLocation(float x,
float y)
Sets the location where this text line will be drawn on the page. |
TextLine |
setPosition(double x,
double y)
Sets the position where this text line will be drawn on the page. |
TextLine |
setPosition(float x,
float y)
Sets the position where this text line will be drawn on the page. |
TextLine |
setStrikeout(boolean strikeout)
Sets the strike variable. |
TextLine |
setText(java.lang.String text)
Sets the text. |
TextLine |
setTextDirection(int degrees)
Sets the direction in which to draw the text. |
TextLine |
setTextEffect(int textEffect)
Sets the text effect. |
TextLine |
setTrailingSpace(boolean trailingSpace)
Sets the trailing space after this text line when used in paragraph. |
TextLine |
setUnderline(boolean underline)
Sets the underline variable. |
TextLine |
setURIAction(java.lang.String uri)
Sets the URI for the "click text line" action. |
TextLine |
setURIActualText(java.lang.String uriActualText)
|
TextLine |
setURIAltDescription(java.lang.String uriAltDescription)
|
TextLine |
setURILanguage(java.lang.String uriLanguage)
|
TextLine |
setVerticalOffset(float verticalOffset)
Sets the vertical offset of the text. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextLine(Font font)
font
- the font to use.public TextLine(Font font, java.lang.String text)
font
- the font to use.text
- the text.Method Detail |
---|
public TextLine setText(java.lang.String text)
text
- the text.
public java.lang.String getText()
public TextLine setPosition(double x, double y)
x
- the x coordinate of the text line.y
- the y coordinate of the text line.
public TextLine setPosition(float x, float y)
x
- the x coordinate of the text line.y
- the y coordinate of the text line.
public TextLine setLocation(float x, float y)
x
- the x coordinate of the text line.y
- the y coordinate of the text line.
public TextLine setFont(Font font)
font
- the font to use.
public Font getFont()
public TextLine setFontSize(float fontSize)
fontSize
- the fontSize to use.
public TextLine setFallbackFont(Font fallbackFont)
fallbackFont
- the fallback font.
public TextLine setFallbackFontSize(float fallbackFontSize)
fallbackFontSize
- the fallback font size.
public Font getFallbackFont()
public TextLine setColor(int color)
color
- the color is specified as an integer.
public TextLine setColor(int[] color)
color
- the color. See the Color class for predefined values or define your own using 0x00RRGGBB packed integers.
public int getColor()
public float getDestinationY()
public float getY()
public float getWidth()
public float getHeight()
public TextLine setURIAction(java.lang.String uri)
uri
- the URI
public java.lang.String getURIAction()
public TextLine setGoToAction(java.lang.String key)
key
- the destination name.
public java.lang.String getGoToAction()
public TextLine setUnderline(boolean underline)
underline
- the underline flag.
public boolean getUnderline()
public TextLine setStrikeout(boolean strikeout)
strikeout
- the strikeout flag.
public boolean getStrikeout()
public TextLine setTextDirection(int degrees)
degrees
- the number of degrees.
public int getTextDirection()
public TextLine setTextEffect(int textEffect)
textEffect
- Effect.NORMAL, Effect.SUBSCRIPT or Effect.SUPERSCRIPT.
public int getTextEffect()
public TextLine setVerticalOffset(float verticalOffset)
verticalOffset
- the vertical offset.
public float getVerticalOffset()
public TextLine setTrailingSpace(boolean trailingSpace)
trailingSpace
- the trailing space.
public boolean getTrailingSpace()
public TextLine setLanguage(java.lang.String language)
public java.lang.String getLanguage()
public TextLine setAltDescription(java.lang.String altDescription)
altDescription
- the alternate description of the text line.
public java.lang.String getAltDescription()
public TextLine setActualText(java.lang.String actualText)
actualText
- the actual text for the text line.
public java.lang.String getActualText()
public TextLine setURILanguage(java.lang.String uriLanguage)
public TextLine setURIAltDescription(java.lang.String uriAltDescription)
public TextLine setURIActualText(java.lang.String uriActualText)
public TextLine placeIn(Box box) throws java.lang.Exception
box
- the specified box.
java.lang.Exception
public TextLine placeIn(Box box, double x_offset, double y_offset) throws java.lang.Exception
box
- the specified box.x_offset
- the x offset from the top left corner of the box.y_offset
- the y offset from the top left corner of the box.
java.lang.Exception
public TextLine placeIn(Box box, float x_offset, float y_offset) throws java.lang.Exception
box
- the specified box.x_offset
- the x offset from the top left corner of the box.y_offset
- the y offset from the top left corner of the box.
java.lang.Exception
public float[] drawOn(Page page) throws java.lang.Exception
drawOn
in interface Drawable
page
- the page to draw this text line on.
java.lang.Exception