public class RMTextFrag extends RMObject
Constructor and Description |
---|
RMTextFrag(RMTextLine aLine)
Creates an empty text frag for a given layout and line.
|
Modifier and Type | Method and Description |
---|---|
char |
charAt(int anIndex)
Returns an individual char at the given index.
|
char[] |
chars()
Returns the original layout char array.
|
int |
getCharForX(float xOrigin)
Returns the character for the given x position.
|
float |
getCharSpacing()
Returns the frag's char spacing.
|
RMColor |
getColor()
Returns the color for this frag.
|
int |
getEnd()
Returns the end char index for this frag.
|
RMFont |
getFont()
Returns the font for this frag.
|
float |
getHeight()
Returns the height for this frag.
|
boolean |
getHyphenated()
Returns whether this frag has a hyphen at the end.
|
RMTextLayout |
getLayout()
Returns the layout for this frag.
|
RMTextLine |
getLine()
Returns the line for this frag.
|
float |
getMaxX()
Returns the maxX position for this frag (in the same coords as the layout frame).
|
RMXString.Outline |
getOutline()
Returns whether the frag should be outline.
|
int |
getStart()
Returns the start char index for this frag.
|
float |
getTab()
Returns the tab location if this frag is a tab.
|
char |
getTabType()
Returns tab type if this frag is a tab.
|
float |
getUnderlineStroke()
Returns the stroke width for the underline.
|
float |
getUnderlineY()
Returns the Y position for the underline.
|
float |
getWidth()
Returns the width for this frag.
|
float |
getX()
Returns the x position for this frag (in the same coords as the layout frame).
|
float |
getXForChar(int charpos)
Returns the x position of the given character index.
|
float |
getY()
Returns the minY position for this frag (in the same coords as the layout frame).
|
float |
getYBaseline()
Returns the y position for this frag (in the same coords as the layout frame).
|
java.awt.font.GlyphVector |
glyphVector(java.awt.Graphics2D g)
Returns the glyph vector for the frag.
|
boolean |
isColorChanged()
Returns whether the color for this frag has changed from the last one.
|
boolean |
isFontChanged()
Returns whether the font for this frag has changed from the last one.
|
boolean |
isTab()
Returns whether frag is just a tab.
|
boolean |
isUnderlined()
Returns whether the frag is underlined.
|
int |
length()
Returns the number of chars in this frag.
|
void |
setHyphenated(boolean aFlag)
Sets whether this frag has a hyphen at the end.
|
void |
strip(int start)
Strips characters after the given index from the frag.
|
java.lang.String |
toString()
Returns the frag chars as a string.
|
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public RMTextFrag(RMTextLine aLine)
public RMTextLayout getLayout()
public RMTextLine getLine()
public char[] chars()
public char charAt(int anIndex)
public int getStart()
public int getEnd()
public int length()
public float getX()
public float getY()
public float getYBaseline()
public float getWidth()
public float getHeight()
public float getMaxX()
public RMFont getFont()
public RMColor getColor()
public boolean isFontChanged()
public boolean isColorChanged()
public boolean isUnderlined()
public float getUnderlineStroke()
public float getUnderlineY()
public RMXString.Outline getOutline()
public float getCharSpacing()
public boolean getHyphenated()
public void setHyphenated(boolean aFlag)
public void strip(int start)
public float getXForChar(int charpos)
public int getCharForX(float xOrigin)
public boolean isTab()
public float getTab()
public char getTabType()
public java.awt.font.GlyphVector glyphVector(java.awt.Graphics2D g)
public java.lang.String toString()
toString
in class java.lang.Object