public class RMTextRun
extends java.awt.geom.Rectangle2D.Double
implements java.lang.CharSequence
Constructor and Description |
---|
RMTextRun() |
Modifier and Type | Method and Description |
---|---|
int |
addChars(RMXStringRun aRun,
int aStart,
int anEnd)
Adds chars to text run.
|
char |
charAt(int anIndex)
Returns the char value at the specified index.
|
int |
getCharIndex(double anX)
Returns the character index for the given x/y point.
|
float |
getCharSpacing()
Returns the run's char spacing.
|
RMColor |
getColor()
Returns the run color.
|
boolean |
getColorChanged()
Returns whether color changed from last run.
|
int |
getEnd()
Returns the char end of this line.
|
boolean |
getEndsWithNewline()
Returns whether run ends with newline.
|
boolean |
getEndsWithWhiteSpace()
Returns whether line ends with space.
|
RMFont |
getFont()
Returns the run font.
|
boolean |
getFontChanged()
Returns whether font changed from last run.
|
int |
getIndex()
Returns the index of this run in the line.
|
char |
getLastChar()
Returns the last char.
|
RMTextLayout |
getLayout()
Returns the layout.
|
RMTextLine |
getLine()
Returns the line this run is associated with.
|
RMTextRun |
getNext()
Returns the next run.
|
RMXString.Outline |
getOutline()
Returns whether the run should be outline.
|
RMParagraph |
getParagraph()
Returns the run paragraph.
|
java.awt.geom.Point2D |
getPointForChar(int anIndex)
Returns the text origin for the given character index.
|
RMXStringRun |
getRun()
Returns the RMXStringRun for this text run.
|
RMTextRun |
getRun(int anIndex)
Returns the run at given index.
|
RMTextRun |
getRunAt(int anIndex,
boolean isInclusive)
Returns the run that contains or ends (if given option is true) at given index.
|
int |
getRunCount()
Returns the run count.
|
RMTextRun |
getRunLast()
Returns the last run.
|
int |
getScripting()
Returns the run's scripting.
|
int |
getStart()
Returns the char start of this line.
|
float |
getTab()
Returns the tab location if this run is a tab.
|
char |
getTabType()
Returns tab type if this run is a tab.
|
double |
getUnderlineStroke()
Returns the stroke width for the underline.
|
int |
getUnderlineStyle()
Returns the underline style of this run.
|
double |
getUnderlineY()
Returns the Y position for the underline.
|
double |
getXForChar(int anIndex)
Returns the char advance to given char index.
|
RMXString |
getXString()
Returns the RMXString for this run.
|
double |
getYBaseline()
Returns the y baseline position for this run (in the same coords as the layout frame).
|
java.awt.font.GlyphVector |
glyphVector(java.awt.Graphics2D g)
Returns the glyph vector for the run.
|
boolean |
isHyphenated()
Returns whether this run has a hyphen at the end.
|
boolean |
isLocked()
Returns whether text layout is full.
|
boolean |
isTab()
Returns whether run is just a tab.
|
boolean |
isUnderlined()
Returns whether the run is underlined.
|
int |
length()
Returns the length of this text layout.
|
void |
setHyphenated(boolean aFlag)
Sets whether this run has a hyphen at the end.
|
void |
setLocked(boolean aFlag)
Sets whether text layout can add more characters.
|
java.lang.CharSequence |
subSequence(int aStart,
int anEnd)
Returns a new char sequence that is a subsequence of this sequence.
|
java.lang.String |
toString()
Standard toString implementation.
|
createIntersection, createUnion, getBounds2D, getHeight, getWidth, getX, getY, isEmpty, outcode, setRect, setRect
add, add, add, contains, contains, equals, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, union
public final RMTextLayout getLayout()
public final RMTextLine getLine()
public RMXString getXString()
public RMXStringRun getRun()
public int getIndex()
public int addChars(RMXStringRun aRun, int aStart, int anEnd)
public int getStart()
public int getEnd()
public int length()
length
in interface java.lang.CharSequence
public char charAt(int anIndex)
charAt
in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int aStart, int anEnd)
subSequence
in interface java.lang.CharSequence
public RMFont getFont()
public RMColor getColor()
public RMParagraph getParagraph()
public boolean isUnderlined()
public double getUnderlineStroke()
public double getUnderlineY()
public int getUnderlineStyle()
public RMXString.Outline getOutline()
public int getScripting()
public float getCharSpacing()
public boolean isHyphenated()
public void setHyphenated(boolean aFlag)
public boolean getFontChanged()
public boolean getColorChanged()
public double getYBaseline()
public boolean isLocked()
public void setLocked(boolean aFlag)
public int getCharIndex(double anX)
public double getXForChar(int anIndex)
public java.awt.geom.Point2D getPointForChar(int anIndex)
public boolean isTab()
public float getTab()
public char getTabType()
public boolean getEndsWithWhiteSpace()
public boolean getEndsWithNewline()
public char getLastChar()
public RMTextRun getNext()
public int getRunCount()
public RMTextRun getRun(int anIndex)
public RMTextRun getRunLast()
public RMTextRun getRunAt(int anIndex, boolean isInclusive)
public java.awt.font.GlyphVector glyphVector(java.awt.Graphics2D g)
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.awt.geom.Rectangle2D.Double