public class RMTextLine extends RMObject
Constructor and Description |
---|
RMTextLine(RMTextLayout aLayout,
RMTextLine aLastLine)
Creates an empty line object for a given layout.
|
Modifier and Type | Method and Description |
---|---|
RMTextFrag |
addFrag()
Adds an empty frag to the line.
|
char[] |
chars()
Returns a char array of the chars in the line.
|
void |
fragAddEnd()
Called after we added frags.
|
void |
fragAddStart()
Called before we start adding frags.
|
int |
getCharForX(float x)
Returns the character index of the character at the given x position.
|
int |
getEnd()
Returns the end character index of the line.
|
boolean |
getEndsWithNewline()
Returns whether line ends with newline.
|
RMTextFrag |
getFrag(int anIndex)
Returns the text frag at the given index.
|
int |
getFragCount()
Returns the number of frags in this line.
|
RMTextFrag |
getFragLast()
Returns the last text frag of this line.
|
float |
getHeight()
Returns the max height of the chars in this line.
|
float |
getHeight(boolean includeGap)
Returns the max height of the chars in this line.
|
float |
getHitMaxX()
Returns the max x position possible for layout's path.
|
float |
getIndent()
Returns the indent for this line.
|
int |
getLastWordStart()
Returns the index of the last word break character in the line.
|
RMTextLayout |
getLayout()
Returns the layout that this line is associated with.
|
float |
getLeading()
Returns the max leading of the chars in this line.
|
float |
getMaxAscent()
Returns the max ascent of the chars in this line.
|
float |
getMaxDescent()
Returns the max descent of the chars in this line.
|
float |
getMaxX()
Returns the maxX position for this line (in same coords as the layout frame).
|
float |
getMaxY()
Returns the maxY position for this line (in same coords as the layout frame).
|
float |
getMaxY(boolean includeGap)
Returns the maxY position for this line (in same coords as the layout frame).
|
float |
getNextLineX()
Returns what this line thinks is the next line's x.
|
int |
getStart()
Returns the start character index of the line.
|
float |
getUnderlineStroke()
Returns the max stroke width of any underlined chars in this line.
|
float |
getUnderlineY()
Returns the Y position of any underlined chars in this line.
|
float |
getWidth()
Returns the width of this line of chars.
|
float |
getX()
Returns the x position for this line (in same coords as the layout frame).
|
float |
getY()
Returns the maxY position for this line (in same coords as the layout frame).
|
float |
getYBaseline()
Returns the y position for this line (in same coords as the layout frame).
|
boolean |
hasTab()
Returns whether line has a tab.
|
boolean |
isEmpty()
Returns whether line has nothing in it.
|
void |
lineAddEnd() |
void |
performTabShift()
If line has any non-left tabs this method adjusts the width of the tab frags (and the positions of successive
frags to correct for shift of these tabs).
|
void |
reset()
Resets the line ivars (so that it can be reused).
|
void |
strip(int start)
Strips all characters after the given index from this line.
|
java.lang.String |
toString()
Returns the line as a string.
|
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public RMTextLine(RMTextLayout aLayout, RMTextLine aLastLine)
public RMTextLayout getLayout()
public int getStart()
public int getEnd()
public boolean isEmpty()
public float getX()
public float getY()
public float getWidth()
public float getHeight()
public float getHeight(boolean includeGap)
public float getYBaseline()
public float getMaxX()
public float getMaxY()
public float getMaxY(boolean includeGap)
public float getHitMaxX()
public float getNextLineX()
public float getMaxAscent()
public float getMaxDescent()
public float getLeading()
public float getIndent()
public float getUnderlineStroke()
public float getUnderlineY()
public int getLastWordStart()
public void strip(int start)
public int getCharForX(float x)
public int getFragCount()
public RMTextFrag getFrag(int anIndex)
public RMTextFrag getFragLast()
public RMTextFrag addFrag()
public boolean getEndsWithNewline()
public boolean hasTab()
public void performTabShift()
public void fragAddStart()
public void fragAddEnd()
public void lineAddEnd()
public void reset()
public char[] chars()
public java.lang.String toString()
toString
in class java.lang.Object