DynamicPDF by ceTe Software

com.cete.dynamicpdf.text
Class TextLine

java.lang.Object
  extended by com.cete.dynamicpdf.text.TextLine

public class TextLine
extends java.lang.Object

Represents a line of text.

Licensing:
This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:


Constructor Summary
TextLine(int start, int length, int mWidth, float yOffset, int spaceCount, boolean newParagraph, boolean hardReturn, boolean hyphenate)
          Initializes a new instance of the TextLine class.
 
Method Summary
 boolean getHardReturn()
          Gets a value indicating if the line ends with a hard return.
 boolean getHyphenate()
          Gets a value indicating if the line is to be hyphenated.
 int getLength()
          Gets the length of the lines text.
 int getMWidth()
          Gets the mwidth of the line.
 boolean getNewParagraph()
          Gets a value indicating if the line begins a paragraph.
 int getSpaceCount()
          Gets the space count for the line.
 int getStart()
          Gets the start index of the lines text.
 float getWidth(float fontSize)
          Returns the width of the line's text in points.
 float getYOffset()
          Gets the y offset of the line.
 void setHardReturn(boolean hardReturn)
          Sets a value indicating if the line ends with a hard return.
 void setHyphenate(boolean hyphenate)
          Sets a value indicating if the line is to be hyphenated.
 void setLength(int length)
          Sets the length of the lines text.
 void setMWidth(int mWidth)
          Sets the mwidth of the line.
 void setNewParagraph(boolean newParagraph)
          Sets a value indicating if the line begins a paragraph.
 void setSpaceCount(int spaceCount)
          Sets the space count for the line.
 void setStart(int start)
          Sets the start index of the lines text.
 void setYOffset(float yOffset)
          Sets the y offset of the line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextLine

public TextLine(int start,
                int length,
                int mWidth,
                float yOffset,
                int spaceCount,
                boolean newParagraph,
                boolean hardReturn,
                boolean hyphenate)
Initializes a new instance of the TextLine class.

Parameters:
start - int start index for the text.
length - int length of the text.
mWidth - int mWidth of the text.
yOffset - float Y offset for the line.
spaceCount - int number of spaces in the line.
newParagraph - boolean specifies if the line begins a paragraph.
hardReturn - boolean specifies if the line ends with a hard return.
hyphenate - boolean specifies if the line ends with a hyphenation.
Method Detail

setStart

public void setStart(int start)
Sets the start index of the lines text.

Parameters:
start - int start index of the lines text.

getStart

public int getStart()
Gets the start index of the lines text.

Returns:
int start index of the lines text.

setLength

public void setLength(int length)
Sets the length of the lines text.

Parameters:
length - int length of the lines text.

getLength

public int getLength()
Gets the length of the lines text.

Returns:
int length of the lines text.

setHardReturn

public void setHardReturn(boolean hardReturn)
Sets a value indicating if the line ends with a hard return.

Parameters:
hardReturn - boolean value indicating if the line ends with a hard return.

getHardReturn

public boolean getHardReturn()
Gets a value indicating if the line ends with a hard return.

Returns:
boolean value indicating if the line ends with a hard return.

setNewParagraph

public void setNewParagraph(boolean newParagraph)
Sets a value indicating if the line begins a paragraph.

Parameters:
newParagraph - boolean value indicating if the line begins a paragraph.

getNewParagraph

public boolean getNewParagraph()
Gets a value indicating if the line begins a paragraph.

Returns:
boolean value indicating if the line begins a paragraph.

setHyphenate

public void setHyphenate(boolean hyphenate)
Sets a value indicating if the line is to be hyphenated.

Parameters:
hyphenate - boolean value indicating if the line is to be hyphenated.

getHyphenate

public boolean getHyphenate()
Gets a value indicating if the line is to be hyphenated.

Returns:
boolean value indicating if the line is to be hyphenated.

setSpaceCount

public void setSpaceCount(int spaceCount)
Sets the space count for the line.

Parameters:
spaceCount - int space count for the line.

getSpaceCount

public int getSpaceCount()
Gets the space count for the line.

Returns:
int space count for the line.

setMWidth

public void setMWidth(int mWidth)
Sets the mwidth of the line.

Parameters:
mWidth - int mwidth of the line.

getMWidth

public int getMWidth()
Gets the mwidth of the line.

Returns:
int mwidth of the line.

setYOffset

public void setYOffset(float yOffset)
Sets the y offset of the line.

Parameters:
yOffset - float y offset of the line.

getYOffset

public float getYOffset()
Gets the y offset of the line.

Returns:
float y offset of the line.

getWidth

public float getWidth(float fontSize)
Returns the width of the line's text in points.

Parameters:
fontSize - float font size to use for the width.
Returns:
float width of the lines text.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software