Package com.reportmill.text
Class RMTextFrag
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.text.RMTextFrag
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
This class represents a group of characters in a text line that all share the same text attributes and are
 simply spaced apart by their char widths.
- 
Constructor SummaryConstructorsConstructorDescriptionRMTextFrag(RMTextLine aLine) Creates an empty text frag for a given layout and line.
- 
Method SummaryModifier and TypeMethodDescriptioncharcharAt(int anIndex) Returns an individual char at the given index.char[]chars()Returns the original layout char array.intgetCharForX(float xOrigin) Returns the character for the given x position.floatReturns the frag's char spacing.getColor()Returns the color for this frag.intgetEnd()Returns the end char index for this frag.getFont()Returns the font for this frag.floatReturns the height for this frag.booleanReturns whether this frag has a hyphen at the end.Returns the layout for this frag.getLine()Returns the line for this frag.floatgetMaxX()Returns the maxX position for this frag (in the same coords as the layout frame).Returns whether the frag should be outline.intgetStart()Returns the start char index for this frag.floatgetTab()Returns the tab location if this frag is a tab.charReturns tab type if this frag is a tab.floatReturns the stroke width for the underline.floatReturns the Y position for the underline.floatgetWidth()Returns the width for this frag.floatgetX()Returns the x position for this frag (in the same coords as the layout frame).floatgetXForChar(int charpos) Returns the x position of the given character index.floatgetY()Returns the minY position for this frag (in the same coords as the layout frame).floatReturns the y position for this frag (in the same coords as the layout frame).Returns the glyph vector for the frag.booleanReturns whether the color for this frag has changed from the last one.booleanReturns whether the font for this frag has changed from the last one.booleanisTab()Returns whether frag is just a tab.booleanReturns whether the frag is underlined.intlength()Returns the number of chars in this frag.voidsetHyphenated(boolean aFlag) Sets whether this frag has a hyphen at the end.voidstrip(int start) Strips characters after the given index from the frag.toString()Returns the frag chars as a string.Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
- 
Constructor Details- 
RMTextFragCreates an empty text frag for a given layout and line.
 
- 
- 
Method Details- 
getLayoutReturns the layout for this frag.
- 
getLineReturns the line for this frag.
- 
charspublic char[] chars()Returns the original layout char array.
- 
charAtpublic char charAt(int anIndex) Returns an individual char at the given index.
- 
getStartpublic int getStart()Returns the start char index for this frag.
- 
getEndpublic int getEnd()Returns the end char index for this frag.
- 
lengthpublic int length()Returns the number of chars in this frag.
- 
getXpublic float getX()Returns the x position for this frag (in the same coords as the layout frame).
- 
getYpublic float getY()Returns the minY position for this frag (in the same coords as the layout frame).
- 
getYBaselinepublic float getYBaseline()Returns the y position for this frag (in the same coords as the layout frame).
- 
getWidthpublic float getWidth()Returns the width for this frag.
- 
getHeightpublic float getHeight()Returns the height for this frag.
- 
getMaxXpublic float getMaxX()Returns the maxX position for this frag (in the same coords as the layout frame).
- 
getFontReturns the font for this frag.
- 
getColorReturns the color for this frag.
- 
isFontChangedpublic boolean isFontChanged()Returns whether the font for this frag has changed from the last one.
- 
isColorChangedpublic boolean isColorChanged()Returns whether the color for this frag has changed from the last one.
- 
isUnderlinedpublic boolean isUnderlined()Returns whether the frag is underlined.
- 
getUnderlineStrokepublic float getUnderlineStroke()Returns the stroke width for the underline.
- 
getUnderlineYpublic float getUnderlineY()Returns the Y position for the underline.
- 
getOutlineReturns whether the frag should be outline.
- 
getCharSpacingpublic float getCharSpacing()Returns the frag's char spacing.
- 
getHyphenatedpublic boolean getHyphenated()Returns whether this frag has a hyphen at the end.
- 
setHyphenatedpublic void setHyphenated(boolean aFlag) Sets whether this frag has a hyphen at the end.
- 
strippublic void strip(int start) Strips characters after the given index from the frag.
- 
getXForCharpublic float getXForChar(int charpos) Returns the x position of the given character index.
- 
getCharForXpublic int getCharForX(float xOrigin) Returns the character for the given x position.
- 
isTabpublic boolean isTab()Returns whether frag is just a tab.
- 
getTabpublic float getTab()Returns the tab location if this frag is a tab.
- 
getTabTypepublic char getTabType()Returns tab type if this frag is a tab.
- 
glyphVectorReturns the glyph vector for the frag.
- 
toStringReturns the frag chars as a string.
 
-