|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.inet.report.ReportComponent
com.inet.report.Element
com.inet.report.Paragraph
public class Paragraph
The Paragraph class represents a line in a Text
and is a set of TextPart elements and FieldPart
elements.
I.e. a Paragraph that consists of a text formatted with blue
color, a field, a text formatted with red color and a text formatted with
blue color, has to be split into four parts; three TextPart
elements and one FieldPart element.
The last part of a Paragraph is terminated with a newline.
After a FieldPart element, a TextPart element
that contains a newline is required.
This class is part of the RDC.
Text,
TextPart,
FieldPart,
Serialized Form| Field Summary |
|---|
| Fields inherited from class com.inet.report.Element |
|---|
BOX, CHART, CROSSTAB, CROSSTABCELL, CROSSTABCOLUMN, CROSSTABROW, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART |
| Fields inherited from interface com.inet.report.ParagraphProperties |
|---|
INDENT_DEFAULT, LINE_SPACING_ABSOLUTE, LINE_SPACING_RELATIVE |
| Fields inherited from interface com.inet.report.BorderProperties |
|---|
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE |
| Fields inherited from interface com.inet.report.GeneralProperties |
|---|
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT |
| Method Summary | |
|---|---|
FieldPart |
addFieldPart(Field newField)
Creates a new field part element and adds it into this paragraph. |
TextPart |
addTextPart(java.lang.String newText)
Creates a new text part element and adds it into this paragraph. |
int |
getFirstLineIndent()
Returns the value of the property 'first line indent'. |
FormulaField |
getFirstLineIndentFormula()
Returns the formula whose return value determines the property 'first line indent'. |
int |
getLeftIndent()
Returns the value of the property 'left indent'. |
FormulaField |
getLeftIndentFormula()
Returns the formula whose return value determines the property 'left indent'. |
int |
getLineSpacingAbsolute()
Returns the absolute distance between baselines of the lines in this paragraph, measured in twips. |
FormulaField |
getLineSpacingAbsoluteFormula()
Returns the formula whose return value determines the absolute distance between baselines of the lines in this paragraph, measured in twips. |
double |
getLineSpacingRelative()
Returns the factor by which the default line spacing is to be multiplied for this paragraph. |
FormulaField |
getLineSpacingRelativeFormula()
Returns the formula whose return value determines the factor by which the default line spacing is to be multiplied for this paragraph. |
Element |
getPart(int idx)
Returns the TextPart or the FieldPart at the specified index. |
int |
getPartCount()
Returns the number of TextParts and FieldParts of this paragraph. |
int |
getRightIndent()
Returns the value of the property 'rightIndent'. |
FormulaField |
getRightIndentFormula()
Returns the formula whose return value determines the property 'right indent'. |
Text |
getText()
Returns the parent Text element. |
int |
indexOf()
Returns the index of this Paragraph inside the parent Text element. |
FieldPart |
insertFieldPart(int pos,
Field newfield)
Inserts a FieldPart element into this Paragraph. |
TextPart |
insertTextPart(int pos,
java.lang.String newtext)
Inserts a text element into this Paragraph. |
void |
moveParts(int srcPos,
Paragraph dest,
int destPos,
int length)
Move FieldParts and TextParts from this Paragraph, beginning at the specified position, to the specified position of the destination Paragraph. |
void |
normalize()
Deprecated. As of i-net Crystal-Clear 9.1, replaced by normalize(boolean) |
void |
normalize(boolean replacePrompts)
Normalizes this paragraph. |
java.lang.String |
paramString()
Creates and return a String representation for debugging. |
NodeParser |
parseElement(com.inet.report.parser.XMLTag group,
java.lang.String tag,
org.xml.sax.Attributes atts,
java.util.Map parserMap)
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. |
void |
parseText(java.lang.String text,
java.util.Map parserMap)
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XML This method is called if text was encountered in the context of this node. |
void |
removePart(int idx)
Removes the TextPart or the FieldPart at the specified index. |
void |
setFirstLineIndent(int newValue)
Sets the value of the property 'first line indent'. |
void |
setFirstLineIndentFormula(FormulaField formula)
Sets the formula whose return value determines the property 'first line indent'. |
void |
setLeftIndent(int newLeftIndent)
Sets the value of the property 'left indent'. |
void |
setLeftIndentFormula(FormulaField formula)
Sets the formula whose return value determines the property 'left indent'. |
void |
setLineSpacingAbsolute(int lineSpacingAbsolute)
Sets the absolute distance between baselines of the lines in this paragraph, measured in twips. |
void |
setLineSpacingAbsoluteFormula(FormulaField formula)
Sets the formula whose return value determines the absolute distance between baselines of the lines in this paragraph, measured in twips. |
void |
setLineSpacingRelative(double lineSpacingRelative)
Sets the factor by which the default line spacing is to be multiplied for this paragraph. |
void |
setLineSpacingRelativeFormula(FormulaField formula)
Sets the formula whose return value determines the factor by which the default line spacing is to be multiplied for this paragraph. |
void |
setRightIndent(int newRightIndent)
Sets the value of the property 'rightIndent'. |
void |
setRightIndentFormula(FormulaField formula)
Sets the formula whose return value determines the property 'right indent'. |
| Methods inherited from class com.inet.report.ReportComponent |
|---|
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY |
| Methods inherited from interface com.inet.report.BorderProperties |
|---|
getBackColor, getBackColorFormula, setBackColor, setBackColorFormula |
| Methods inherited from interface com.inet.report.GeneralProperties |
|---|
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula |
| Methods inherited from interface com.inet.report.parser.NodeParser |
|---|
isDOMParser, parseDOM, parseEndElement |
| Method Detail |
|---|
public Text getText()
Text element.
public TextPart addTextPart(java.lang.String newText)
text is null, it will be replaced by
an empty String.
newText - the text of the text part as String
public TextPart insertTextPart(int pos,
java.lang.String newtext)
pos - The position where the text element shall be stored.newtext - The new text element that shall be stored.
public FieldPart addFieldPart(Field newField)
newField - The field which should be added into the paragraph.
DatabaseField,
FormulaField,
PromptField,
GroupField,
SummaryField,
SQLField
public FieldPart insertFieldPart(int pos,
Field newfield)
pos - The position where the element shall be stored.newfield - The new field that shall be stored.
public Element getPart(int idx)
idx - The index of the FieldPart or of the TextPart that should returned.
TextPart,
FieldPart,
addFieldPart(Field),
addTextPart(String),
getPartCount(),
removePart(int)public int getPartCount()
TextPart,
FieldPart,
addFieldPart(Field),
addTextPart(String),
getPart(int),
removePart(int)public void removePart(int idx)
idx - The index of the FieldPart or of the TextPart that should removed.
java.lang.IndexOutOfBoundsException - if idx is out of bounds.TextPart,
FieldPart,
addFieldPart(Field),
addTextPart(String),
getPart(int),
getPartCount()
public void moveParts(int srcPos,
Paragraph dest,
int destPos,
int length)
throws java.lang.IndexOutOfBoundsException,
java.lang.IllegalArgumentException
srcPos - starting position in this Paragraph. This is the index of FieldPart and TextPart starting with 0.dest - the destination ParagraphdestPos - starting position in the destination Paragraph. This is the index of FieldPart and TextPart starting
with 0.length - count of parts that should be moved.
java.lang.IndexOutOfBoundsException - if srcPos, destPost or length is out of bounds.
java.lang.IllegalArgumentException - If the Paragraph come from different Enginespublic java.lang.String paramString()
paramString in class Elementpublic int indexOf()
indexOf in class ElementElement.setIndex(int)public int getFirstLineIndent()
getFirstLineIndent in interface ParagraphPropertiespublic void setFirstLineIndent(int newValue)
setFirstLineIndent in interface ParagraphPropertiesnewValue - The new value of the property 'first line indent'. May be negative (which would cause the first line to be left
of the left margin).public int getLeftIndent()
getLeftIndent in interface ParagraphPropertiespublic void setLeftIndent(int newLeftIndent)
setLeftIndent in interface ParagraphPropertiesnewLeftIndent - The new value of the property 'left indent'.public int getRightIndent()
getRightIndent in interface ParagraphPropertiespublic void setRightIndent(int newRightIndent)
setRightIndent in interface ParagraphPropertiesnewRightIndent - The new value of the property 'rightIndent'.public void setLineSpacingAbsolute(int lineSpacingAbsolute)
setLineSpacingAbsolute in interface ParagraphPropertieslineSpacingAbsolute - Absolute distance between baselines in this paragraph, measured in twips, or
LINE_SPACING_RELATIVE in order to restore the default setting.ParagraphProperties.getLineSpacingAbsolute(),
ParagraphProperties.LINE_SPACING_RELATIVEpublic int getLineSpacingAbsolute()
getLineSpacingAbsolute in interface ParagraphPropertiesParagraphProperties.setLineSpacingAbsolute(int),
ParagraphProperties.LINE_SPACING_RELATIVEpublic void setLineSpacingRelative(double lineSpacingRelative)
setLineSpacingRelative in interface ParagraphPropertieslineSpacingRelative - Factor by which the default line spacing is to be multiplied for this paragraph,
or LINE_SPACING_ABSOLUTE if the default value is to be set (equivalent to "1")ParagraphProperties.LINE_SPACING_ABSOLUTE,
ParagraphProperties.getLineSpacingRelative()public double getLineSpacingRelative()
getLineSpacingRelative in interface ParagraphPropertiesParagraphProperties.LINE_SPACING_ABSOLUTE,
ParagraphProperties.getLineSpacingRelative()@Deprecated public void normalize()
normalize(boolean)
public void normalize(boolean replacePrompts)
replacePrompts - replace prompt fields with it current valuepublic FormulaField getFirstLineIndentFormula()
getFirstLineIndentFormula in interface ParagraphPropertiespublic FormulaField getLeftIndentFormula()
getLeftIndentFormula in interface ParagraphPropertiespublic FormulaField getLineSpacingAbsoluteFormula()
getLineSpacingAbsoluteFormula in interface ParagraphPropertiesParagraphProperties.setLineSpacingAbsolute(int)public FormulaField getLineSpacingRelativeFormula()
getLineSpacingRelativeFormula in interface ParagraphPropertiesParagraphProperties.getLineSpacingRelative()public FormulaField getRightIndentFormula()
getRightIndentFormula in interface ParagraphPropertiespublic void setFirstLineIndentFormula(FormulaField formula)
setFirstLineIndentFormula in interface ParagraphPropertiesformula - The formula whose return value determines the property 'first line indent'.public void setLeftIndentFormula(FormulaField formula)
setLeftIndentFormula in interface ParagraphPropertiesformula - The formula whose return value determines the property 'left indent'.public void setLineSpacingAbsoluteFormula(FormulaField formula)
setLineSpacingAbsoluteFormula in interface ParagraphPropertiesformula - formula whose return value determines the absolute distance between baselines in this paragraph, measured in twipsParagraphProperties.setLineSpacingAbsolute(int)public void setLineSpacingRelativeFormula(FormulaField formula)
setLineSpacingRelativeFormula in interface ParagraphPropertiesformula - formula whose return value determines the factor by which the default line spacing is to be multiplied for this paragraphParagraphProperties.setLineSpacingRelative(double)public void setRightIndentFormula(FormulaField formula)
setRightIndentFormula in interface ParagraphPropertiesformula - The formula whose return value determines the property 'right indent'.
public NodeParser parseElement(com.inet.report.parser.XMLTag group,
java.lang.String tag,
org.xml.sax.Attributes atts,
java.util.Map parserMap)
throws FatalParserException
Parses an XML node with the given information, and returns either a sub-element which was created as a result, or null if no sub-element was created, i.e. the information was applied to the ReportComponent itself. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.
parseElement in interface NodeParsergroup - XMLTag of the current node to be parsed, or null if there is no such current group. An XMLTag is a group
of nodes bundled together, usually it is a Properties node such as CommonProperties, BorderProperties, etc.tag - The XMLTag to be parsedatts - The set of attributes in the current XMLTagparserMap - The map of current Parser.
FatalParserException - if an exception occurs which causes the report to not be able to be read: causes the abortion of the
reading of the report.
public void parseText(java.lang.String text,
java.util.Map parserMap)
This method is called if text was encountered in the context of this node. (Examples would be a formula's text or a text element's text)
parseText in interface NodeParsertext - text encountered and to be storedparserMap - The map of current Parser.
|
i-net Clear Reports | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||