|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cete.dynamicpdf.text.TextLineList
public abstract class TextLineList
Represents a list of text lines.
Licensing:
This class is a DynamicPDF Generator Professional Edition
feature. One of the following licenses is required for non-evaluation usage:
Constructor Summary | |
---|---|
protected |
TextLineList(char[] text,
int start,
int length,
float width,
float height,
Font font,
float fontSize,
boolean initialLineIsNewParagraph)
Initializes a new instance of the TextLineList class. |
protected |
TextLineList(int start,
float width,
float height,
boolean initialLineIsNewParagraph,
TextLineList textLineList)
Initializes a new instance of the TextLineList class. |
Method Summary | |
---|---|
protected void |
add(TextLine line)
Add a text line to the text line list. |
protected abstract boolean |
calculateLines(com.cete.dynamicpdf.text.LineCalculationMode mode)
Calculates the lines of the text line list. |
void |
draw(OperatorWriter writer,
float x,
float y,
TextAlign align,
Color textColor,
boolean underline,
boolean rightToLeft)
Draws the text line list to the given OperatorWriter object. |
void |
draw(OperatorWriter writer,
float x,
float y,
TextAlign align,
Color textColor,
boolean underline,
int startLine,
int lineCount,
boolean rightToLeft)
|
void |
draw(OperatorWriter writer,
float x,
float y,
TextAlign align,
Color textColor,
boolean underline,
int startLine,
int lineCount,
boolean rightToLeft,
boolean strikeThrough)
Draws the text line list to the given OperatorWriter object. |
void |
draw(OperatorWriter writer,
float x,
float y,
TextAlign align,
Color textColor,
Color textOutlineColor,
float textOutlineWidth,
boolean underline,
boolean rightToLeft,
boolean strikeThrough)
Draws the text line list to the given OperatorWriter object. |
boolean |
getAutoLeading()
Gets the leading of the text line list, calculated automatically. |
protected float |
getBaseLine()
Gets the baseline value for the text line list. |
boolean |
getCleanParagraphBreaks()
Gets if the text line list should have clean paragraph breaks. |
protected int |
getEnd()
Gets the ending index for text in the text line list. |
Font |
getFont()
Gets the font of the text line list. |
float |
getFontSize()
Gets the font size of the text line list. |
float |
getHeight()
Gets the height of the text line list. |
boolean |
getkerningEnabled()
|
float |
getLeading()
Gets the leading of the text line list. |
protected int |
getLineCount()
Gets the line count of the text line list. |
int |
getLineCount(int startLine,
float height)
Returns the number of lines that will draw for the given height. |
float |
getMaximumWidth()
Get the maximum width of text in the line list. |
abstract TextLineList |
getOverflow(float width,
float height)
Returns an overflow TextLineList . |
abstract java.lang.String |
getOverflowText()
Returns the overflow text of the text line list. |
float |
getParagraphIndent()
Gets the paragraph indention of the text line list. |
float |
getParagraphSpacing()
Gets the paragraph spacing of the text line list. |
float |
getRequiredHeight(int startLine)
Returns the required height for the all the text to display. |
protected int |
getStart()
Gets the start index for text in the text line list. |
java.lang.String |
getText()
Returns the text of the text line list. |
protected char[] |
getTextArray()
Gets the text of the text line list. |
float |
getTextHeight()
Returns the height of the visible text. |
float |
getTextHeight(int lineCount)
Returns the height of the visible text. |
protected TextLine |
getTextLine(int index)
Gets the text line at the given index. |
int |
getVisibleLineCount()
Gets the number of lines that will be drawn. |
float |
getWidth()
Gets the width of the text line list. |
abstract boolean |
hasOverflow()
Returns a value indicating if the text line list has overflow lines. |
protected abstract void |
initializeLines(boolean newParagraph)
Initializes the text line list. |
void |
setAutoLeading(boolean value)
Sets whether the leading of the text line list should be calculated automatically. |
void |
setCleanParagraphBreaks(boolean cleanParagraphBreaks)
Sets if the text line list should have clean paragraph breaks. |
protected void |
setEnd(int end)
Sets the ending index for text in the text line list. |
void |
setFont(Font font)
Sets the font of the text line list. |
void |
setFontSize(float fontSize)
Sets the font size of the text line list. |
void |
setHeight(float height)
Sets the height of the text line list. |
boolean |
setkerningEnabled(boolean value)
|
void |
setLeading(float leading)
Sets the leading of the text line list. |
protected void |
setLines(boolean setAllLines)
Sets the lines of the line list. |
void |
setParagraphIndent(float paragraphIndent)
Sets the paragraph indention of the text line list. |
void |
setParagraphSpacing(float paragraphSpacing)
Sets the paragraph spacing of the text line list. |
protected void |
setStart(int start)
Sets the start index for text in the text line list. |
void |
setText(char[] text)
Sets the text of the text line list to a new value. |
void |
setText(java.lang.String text)
Sets the text of the text line list to a new value. |
protected void |
setTextArray(char[] text)
Sets the text of the text line list. |
void |
setWidth(float width)
Set the width of the text line list. |
int |
size()
Gets the number of lines in the text line list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TextLineList(char[] text, int start, int length, float width, float height, Font font, float fontSize, boolean initialLineIsNewParagraph)
TextLineList
class.
text
- Text of the text line list.start
- Start index of the text for the text line list.length
- Length of the text for the text line list.width
- Width of the text line list.height
- Height of the text line list.font
- Font
to use for text of the text line list.fontSize
- Font size to use for text of the text line list.initialLineIsNewParagraph
- Specifies if the first line of the
text line list is a new paragraph.Font
protected TextLineList(int start, float width, float height, boolean initialLineIsNewParagraph, TextLineList textLineList)
TextLineList
class.
start
- Start index of the text for the text line list.width
- Width of the text line list.height
- Height of the text line list.initialLineIsNewParagraph
- Specifies if the first line of the
text line list is a new paragraph.textLineList
- Previous text line list.Method Detail |
---|
protected void setLines(boolean setAllLines)
setAllLines
- Specifies if all lines should be set.public boolean getkerningEnabled()
public boolean setkerningEnabled(boolean value)
protected abstract boolean calculateLines(com.cete.dynamicpdf.text.LineCalculationMode mode)
mode
- Mode to use for the calculation.
protected abstract void initializeLines(boolean newParagraph)
newParagraph
- public abstract TextLineList getOverflow(float width, float height)
TextLineList
.
width
- Width of the overflow text line list.height
- Height of the overflow text line list.
TextLineList
containing the overflowed lines.TextLineList
public abstract boolean hasOverflow()
public abstract java.lang.String getOverflowText()
public java.lang.String getText()
public void setText(java.lang.String text)
text
- Text to set as the text of the text line list.public void setText(char[] text)
text
- Character array to set as the text of the text line list.protected void setStart(int start)
start
- Start index for text in the text line list.protected int getStart()
protected void setEnd(int end)
end
- Ending index for text in the text line list.protected int getEnd()
protected void add(TextLine line)
line
- TextLine
which is to be added to the
text line list.TextLine
protected int getLineCount()
public int getVisibleLineCount()
protected float getBaseLine()
protected TextLine getTextLine(int index)
index
- Index from which text line is accessed.
TextLine
at the given index.TextLine
protected void setTextArray(char[] text)
text
- Text of the text line list.protected char[] getTextArray()
public void setWidth(float width)
width
- Width of the text line list.public float getWidth()
public void setCleanParagraphBreaks(boolean cleanParagraphBreaks)
cleanParagraphBreaks
- Specifies if the text line list should have
clean paragraph breaks.public boolean getCleanParagraphBreaks()
public void setHeight(float height)
height
- Height of the text line list.public float getHeight()
public void setFont(Font font)
font
- Font of the text line list.Font
public Font getFont()
Font
public void setFontSize(float fontSize)
fontSize
- Font size of the text line list.public float getFontSize()
public void setLeading(float leading)
Setting this property will automatically set the AutoLeading
property to false.
leading
- Leading of the text line list.public float getLeading()
public boolean getAutoLeading()
public void setAutoLeading(boolean value)
This property is automatically set to false any time the
Leading
property is set.
value
- The leading of the text line list should be calculated automatically.public int size()
public void setParagraphIndent(float paragraphIndent)
paragraphIndent
- Paraghraph indention of the text line list.public float getParagraphIndent()
public void setParagraphSpacing(float paragraphSpacing)
paragraphSpacing
- Paragraph spacing of the text line list.public float getParagraphSpacing()
public float getRequiredHeight(int startLine)
startLine
- Start text line index.
public float getTextHeight(int lineCount)
lineCount
- the number of lines to use for the calculation.
public float getMaximumWidth()
public float getTextHeight()
public int getLineCount(int startLine, float height)
startLine
- Start text line index.height
- Height used for the calculation.
public void draw(OperatorWriter writer, float x, float y, TextAlign align, Color textColor, boolean underline, boolean rightToLeft)
OperatorWriter
object.
writer
- OperatorWriter
object to receive the link's output.x
- X coordinate of the text.y
- Y coordinate of the text.align
- Alignment of the text.textColor
- Color
of the text.underline
- Specifies if the text should be underlined.rightToLeft
- Specifies if the text should be drawn right to left.OperatorWriter
public void draw(OperatorWriter writer, float x, float y, TextAlign align, Color textColor, boolean underline, int startLine, int lineCount, boolean rightToLeft, boolean strikeThrough)
OperatorWriter
object.
writer
- OperatorWriter
object to receive the link's output.x
- X coordinate of the text.y
- Y coordinate of the text.align
- Alignment of the text.textColor
- Color
of the text.underline
- Specifies if the text should be underlined.startLine
- Start line for the text.lineCount
- Number of lines to draw.rightToLeft
- Specifies if the text should be drawn right to left.strikeThrough
- Specifies if the text should be StrikeThroughOperatorWriter
public void draw(OperatorWriter writer, float x, float y, TextAlign align, Color textColor, Color textOutlineColor, float textOutlineWidth, boolean underline, boolean rightToLeft, boolean strikeThrough)
OperatorWriter
object.
writer
- OperatorWriter
object to receive the link's output.x
- X coordinate of the text.y
- Y coordinate of the text.align
- Alignment of the text.textColor
- Color
of the text.textOutlineColor
- Text outline color of the text.textOutlineWidth
- width of the text outline.underline
- Specifies if the text should be underlined.rightToLeft
- Specifies if the text should be drawn right to left.strikeThrough
- Specifies if the text should be StrikeThroughOperatorWriter
public void draw(OperatorWriter writer, float x, float y, TextAlign align, Color textColor, boolean underline, int startLine, int lineCount, boolean rightToLeft)
|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |