|
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.Text
public class Text
This class provides an object that represents a label. It consists of paragraph elements and will be used like a frame for the containing paragraphs. Note that it is not possible to insert a text
or a field directly. You have to add it into a paragraph and the paragraph into a text object.
code example:
Text text = section.addText(0,0,1000,200);
Paragraph para = text.addParagraph();
para.addTextPart("This line has");
TextPart tPart = para.addTextPart("different ");tPart.setCursive(true);
para.addTextPart(" format.\n");
Paragraph paraDyn = text.addParagraph();
paraDyn.addFieldPart(fields.getDatabaseField(0));
FieldPart fPart = paraDyn.addFieldPart(fields.getDatabaseField(1));fPart.setFontColor(CoderXML.COLOR_BLUE);
paraDyn.addTextPart("\n");
This example inserts a label into the section section and into the label two lines para and paraDyn. Into both lines it inserts three part, four static
textes and two dynamic. The dynamic parts consists of the database fields with idx 0 and 1. Note that you need one single part for each field.
This class is part of the RDC.
Paragraph,
TextPart,
FieldPart,
FieldElement,
Section.addText(int, int, int, int),
Section.remove(Element),
Section.getElements(),
Section.getElementsV(),
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.TextProperties |
|---|
GLYPH_DEFAULT, GLYPH_DOWN, GLYPH_LEFT, GLYPH_RIGHT, GLYPH_UP, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90 |
| 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 | |
|---|---|
Paragraph |
addParagraph()
Create a new paragraph element and adds it into this text element. |
int |
getGlyphOrientation()
Returns the glyph orientation. |
FormulaField |
getGlyphOrientationFormula()
Returns the formula whose return value determines the glyph orientation. |
int |
getHorAlign()
Returns the common HorAlign value from Paragraph Elements if they're all equals or ALIGN_HORIZONTAL_DEFAULT otherwise |
Paragraph |
getParagraph(int idx)
Returns the Paragraph with the specified index. |
int |
getParagraphCount()
Returns the count of Paragraphs in this Text. |
int |
getTextRotation()
Returns the value of the property 'text rotation'. |
FormulaField |
getTextRotationFormula()
Returns the formula whose return value determines the property 'text rotation'. |
Paragraph |
insertParagraph(int pos)
Creates a new Paragraph instance which is located at a specific position within the text. |
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 |
removeAllParagraphs()
Removes all Paragraphs from the Text Element. |
void |
removeParagraph(int idx)
Removes the Paragraph at the specified index. |
void |
setGlyphOrientation(int orientation)
Sets the orientation of the glyphs. |
void |
setGlyphOrientationFormula(FormulaField formula)
Sets the formula whose return value determines the glyph orientation. |
void |
setHorAlign(int value)
Sets the value of the property 'horizontal alignment'. |
void |
setTextRotation(int rotation)
Sets the value of the property 'text rotation'. |
void |
setTextRotationFormula(FormulaField formula)
Sets the formula whose return value determines the property 'text rotation'. |
| 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.HyperlinkProperties |
|---|
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula |
| 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 Paragraph addParagraph()
Paragraphpublic Paragraph insertParagraph(int pos)
pos - The index for the position of the Paragraph.
public Paragraph getParagraph(int idx)
idx - The 0-based index of the Paragraph that should returned.
Paragraph,
addParagraph(),
getParagraphCount(),
removeParagraph(int)public int getParagraphCount()
Paragraph,
addParagraph(),
getParagraph(int),
removeParagraph(int)public void removeParagraph(int idx)
idx - The 0-based index of the Paragraph that should removed.
java.lang.IndexOutOfBoundsException - If the paragraph at the desired position does not exist.Paragraph,
addParagraph(),
getParagraph(int),
getParagraphCount(),
removeAllParagraphs()public void removeAllParagraphs()
Paragraph,
addParagraph(),
getParagraph(int),
getParagraphCount(),
removeParagraph(int)public int getGlyphOrientation()
getGlyphOrientation in interface TextPropertiesTextProperties.setGlyphOrientation(int),
TextProperties.GLYPH_DEFAULT,
TextProperties.GLYPH_UP,
TextProperties.GLYPH_DOWN,
TextProperties.GLYPH_RIGHT,
TextProperties.GLYPH_LEFTpublic void setGlyphOrientation(int orientation)
setGlyphOrientation in interface TextPropertiesorientation - Orientation to be set for the glyphs (i.e. the rotation of every individual character of the line of text)TextProperties.getGlyphOrientation(),
TextProperties.GLYPH_DEFAULT,
TextProperties.GLYPH_UP,
TextProperties.GLYPH_DOWN,
TextProperties.GLYPH_RIGHT,
TextProperties.GLYPH_LEFTpublic void setGlyphOrientationFormula(FormulaField formula)
setGlyphOrientationFormula in interface TextPropertiesformula - the formula whose return value determines the glyph orientationpublic FormulaField getGlyphOrientationFormula()
getGlyphOrientationFormula in interface TextPropertiespublic void setTextRotation(int rotation)
setTextRotation in interface TextPropertiesrotation - The new value of the property 'text rotation'. Rotation is done counter-clockwise.TextProperties.ROTATE_0,
TextProperties.ROTATE_90,
TextProperties.ROTATE_180,
TextProperties.ROTATE_270public int getTextRotation()
getTextRotation in interface TextPropertiesTextProperties.ROTATE_0,
TextProperties.ROTATE_90,
TextProperties.ROTATE_180,
TextProperties.ROTATE_270public FormulaField getTextRotationFormula()
getTextRotationFormula in interface TextPropertiesTextProperties.getTextRotation(),
TextProperties.setTextRotation(int)public void setTextRotationFormula(FormulaField formula)
setTextRotationFormula in interface TextPropertiesformula - formula whose return value determines the property 'text rotation'.TextProperties.getTextRotation(),
TextProperties.setTextRotation(int)public void setHorAlign(int value)
setHorAlign in interface GeneralPropertiessetHorAlign in class Elementvalue - The new value of the property 'horizontal alignment'.GeneralProperties.ALIGN_HORIZONTAL_DEFAULT,
GeneralProperties.ALIGN_HORIZONTAL_LEFT,
GeneralProperties.ALIGN_HORIZONTAL_CENTER,
GeneralProperties.ALIGN_HORIZONTAL_RIGHT,
GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIEDpublic int getHorAlign()
getHorAlign in interface GeneralPropertiesgetHorAlign in class ElementGeneralProperties.ALIGN_HORIZONTAL_DEFAULT if they have different horiziontal alignmentsGeneralProperties.ALIGN_HORIZONTAL_DEFAULT,
GeneralProperties.ALIGN_HORIZONTAL_LEFT,
GeneralProperties.ALIGN_HORIZONTAL_CENTER,
GeneralProperties.ALIGN_HORIZONTAL_RIGHT,
GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED
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 | |||||||