java.lang.Objectcom.pdfjet.CompositeTextLine
public class CompositeTextLine
Used to create composite text line objects.
Constructor Summary | |
---|---|
CompositeTextLine(float x,
float y)
|
Method Summary | |
---|---|
void |
addComponent(TextLine component)
Add a new text line. |
float[] |
drawOn(Page page)
Draws this line on the specified page. |
float |
getFontSize()
Gets the font size. |
float |
getHeight()
Returns the height of this CompositeTextLine. |
float[] |
getMinMax()
Returns the vertical coordinates of the top left and bottom right corners of the bounding box of this composite text line. |
int |
getNumberOfTextLines()
Returns the number of text lines. |
float[] |
getPosition()
Return the position of this composite text line. |
float |
getSubscriptFactor()
Gets the subscript factor for this text line. |
float |
getSubscriptPosition()
Gets the subscript position for this text line. |
float |
getSuperscriptFactor()
Gets the superscript factor for this text line. |
float |
getSuperscriptPosition()
Gets the superscript position for this text line. |
TextLine |
getTextLine(int index)
Return the nth entry in the TextLine array. |
float |
getWidth()
Returns the width of this CompositeTextLine. |
void |
setFontSize(float fontSize)
Sets the font size. |
void |
setLocation(float x,
float y)
Loop through all the text lines and reset their location based on the new location set here. |
void |
setPosition(double x,
double y)
Loop through all the text lines and reset their position based on the new position set here. |
void |
setPosition(float x,
float y)
Loop through all the text lines and reset their position based on the new position set here. |
void |
setSubscriptFactor(float subscript)
Sets the subscript factor for this composite text line. |
void |
setSubscriptPosition(float subscript_position)
Sets the subscript position for this composite text line. |
void |
setSuperscriptFactor(float superscript)
Sets the superscript factor for this composite text line. |
void |
setSuperscriptPosition(float superscript_position)
Sets the superscript position for this composite text line. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeTextLine(float x, float y)
Method Detail |
---|
public void setFontSize(float fontSize)
fontSize
- the font size.public float getFontSize()
public void setSuperscriptFactor(float superscript)
superscript
- the superscript size factor.public float getSuperscriptFactor()
public void setSubscriptFactor(float subscript)
subscript
- the subscript size factor.public float getSubscriptFactor()
public void setSuperscriptPosition(float superscript_position)
superscript_position
- the superscript position.public float getSuperscriptPosition()
public void setSubscriptPosition(float subscript_position)
subscript_position
- the subscript position.public float getSubscriptPosition()
public void addComponent(TextLine component)
component
- the component.public void setPosition(double x, double y)
x
- the x coordinate.y
- the y coordinate.public void setPosition(float x, float y)
x
- the x coordinate.y
- the y coordinate.public void setLocation(float x, float y)
x
- the x coordinate.y
- the y coordinate.public float[] getPosition()
public TextLine getTextLine(int index)
index
- the index of the nth element.
public int getNumberOfTextLines()
public float[] getMinMax()
public float getHeight()
public float getWidth()
public float[] drawOn(Page page) throws java.lang.Exception
drawOn
in interface Drawable
page
- the page to draw this line on.
java.lang.Exception