Package com.reportmill.text
Class RMParagraph
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.text.RMParagraph
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
This class represents attributes of a paragraph in an RMXString (all of the characters up to and including each
 newline in an RMXString make up a paragraph). Paragraphs can have their own alignment, indentation, min/max line
 height, etc. You might use this class like this:
 
   RMParagraph pgraph = RMParagraph.defaultParagraph.deriveAligned(RMParagraph.ALIGN_RIGHT);
   RMXString xstring = new RMXString("Hello World", pgraph);- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final RMParagraphstatic final charstatic final charstatic final charstatic final char
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new paragraph object initialized to defaultParagraph.RMParagraph(int anAlign, float leftIndent, float leftIndentFirst, float rightIndent) Creates a new paragraph with the given alignment and indentation.
- 
Method SummaryModifier and TypeMethodDescriptionderiveAligned(int anAlign) Returns a paragraph identical to the receiver, but with the given alignment.deriveIndent(float leftIndent, float leftIndentFirst, float rightIndent) Returns a paragraph identical to the receiver, but with the given indentation values.deriveLineGap(float aHeight) Returns a paragraph identical to the receiver, but with the given line gap.deriveLineHeightMax(float aHeight) Returns a paragraph identical to the receiver, but with the given max line height.deriveLineHeightMin(float aHeight) Returns a paragraph identical to the receiver, but with the given min line height.deriveLineSpacing(float aHeight) Returns a paragraph identical to the receiver, but with the given line spacing.deriveTab(int anIndex, float tabValue, char tabType) Returns a paragraph identical to the receiver, but with new value for tab at given index.deriveTabs(float[] newTabs, char[] newTypes) Returns a paragraph identical to the receiver, but with the given tabs.booleanStandard equals implementation.fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.bytegetAlign()Returns the alignment associated with this paragraph.byteReturns an alignment for the given string, "left", "center", "right" or "full".Returns a string representation of the alignment associated with this paragraph, "left", "center" or "right".floatReturns the left side indentation of this paragraph.floatReturns the left side indentation of the first line in this paragraph (this can be set different than successive lines).floatReturns additional line spacing expressed as a constant amount in points.floatReturns the maximum line height in printer points associated with this paragraph.floatReturns the minimum line height in printer points associated with this paragraph.floatReturns the spacing of lines expressed as a factor of a given line's height.floatReturns the spacing between paragraphs in printer points associated with this paragraph.floatReturns the right side indentation of this paragraph.floatgetTab(int anIndex) Returns the specific tab value for the given index in printer points.intReturns the number of tabs associated with this paragraph.intgetTabIndex(float aLocation) Returns the tab index for the given location.Returns the values of all the tabs associated with this paragraph as a comma separated string.chargetTabType(int anIndex) Returns the type of tab at the given index.initWithArchiver(RMArchiver archive) Legacy unarchival.toXML(RXArchiver anArchiver) XML archival.Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, undoClone, undoCopy, undoEquals
- 
Field Details- 
DEFAULT
- 
ALIGN_LEFTpublic static final byte ALIGN_LEFT- See Also:
 
- 
ALIGN_RIGHTpublic static final byte ALIGN_RIGHT- See Also:
 
- 
ALIGN_CENTERpublic static final byte ALIGN_CENTER- See Also:
 
- 
ALIGN_FULLpublic static final byte ALIGN_FULL- See Also:
 
- 
TAB_LEFTpublic static final char TAB_LEFT- See Also:
 
- 
TAB_RIGHTpublic static final char TAB_RIGHT- See Also:
 
- 
TAB_CENTERpublic static final char TAB_CENTER- See Also:
 
- 
TAB_DECIMALpublic static final char TAB_DECIMAL- See Also:
 
 
- 
- 
Constructor Details- 
RMParagraphpublic RMParagraph()Creates a new paragraph object initialized to defaultParagraph. You should probably use RMParagraph.defaultParagraph instead.
- 
RMParagraphpublic RMParagraph(int anAlign, float leftIndent, float leftIndentFirst, float rightIndent) Creates a new paragraph with the given alignment and indentation.
 
- 
- 
Method Details- 
getAlignpublic byte getAlign()Returns the alignment associated with this paragraph.
- 
getAlignStringReturns a string representation of the alignment associated with this paragraph, "left", "center" or "right".
- 
getAlignReturns an alignment for the given string, "left", "center", "right" or "full".
- 
getLeftIndentpublic float getLeftIndent()Returns the left side indentation of this paragraph.
- 
getLeftIndentFirstpublic float getLeftIndentFirst()Returns the left side indentation of the first line in this paragraph (this can be set different than successive lines).
- 
getRightIndentpublic float getRightIndent()Returns the right side indentation of this paragraph.
- 
getLineSpacingpublic float getLineSpacing()Returns the spacing of lines expressed as a factor of a given line's height.
- 
getLineGappublic float getLineGap()Returns additional line spacing expressed as a constant amount in points.
- 
getLineHeightMinpublic float getLineHeightMin()Returns the minimum line height in printer points associated with this paragraph.
- 
getLineHeightMaxpublic float getLineHeightMax()Returns the maximum line height in printer points associated with this paragraph.
- 
getParagraphSpacingpublic float getParagraphSpacing()Returns the spacing between paragraphs in printer points associated with this paragraph.
- 
getTabCountpublic int getTabCount()Returns the number of tabs associated with this paragraph.
- 
getTabpublic float getTab(int anIndex) Returns the specific tab value for the given index in printer points.
- 
getTabTypepublic char getTabType(int anIndex) Returns the type of tab at the given index.
- 
getTabIndexpublic int getTabIndex(float aLocation) Returns the tab index for the given location.
- 
getTabsStringReturns the values of all the tabs associated with this paragraph as a comma separated string.
- 
deriveAlignedReturns a paragraph identical to the receiver, but with the given alignment.
- 
deriveIndentReturns a paragraph identical to the receiver, but with the given indentation values.
- 
deriveLineSpacingReturns a paragraph identical to the receiver, but with the given line spacing.
- 
deriveLineGapReturns a paragraph identical to the receiver, but with the given line gap.
- 
deriveLineHeightMinReturns a paragraph identical to the receiver, but with the given min line height.
- 
deriveLineHeightMaxReturns a paragraph identical to the receiver, but with the given max line height.
- 
deriveTabsReturns a paragraph identical to the receiver, but with the given tabs.
- 
deriveTabReturns a paragraph identical to the receiver, but with new value for tab at given index.
- 
equalsStandard equals implementation.
- 
initWithArchiverLegacy unarchival.- Specified by:
- initWithArchiverin interface- RMArchiver.Archiving
- Overrides:
- initWithArchiverin class- RMObject
 
- 
toXMLXML archival.
- 
fromXMLXML unarchival.
 
-