Klasse Text
java.lang.Object
com.inet.report.ReportComponent
com.inet.report.Element
com.inet.report.Text
- Alle implementierten Schnittstellen:
BorderProperties, GeneralProperties, HyperlinkProperties, NodeParser, com.inet.report.ReferenceHolder, TextProperties, Serializable, Cloneable
public class Text
extends Element
implements TextProperties, com.inet.report.ReferenceHolder, HyperlinkProperties, BorderProperties
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:
This example inserts a label into the section
This class is part of the
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 parts, four static
texts 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.- Seit:
- 6.0
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen Element
Element.BorderProps, Element.CommonProperties, Element.ElementTypes, Element.HyperlinkProps, Element.StringProps -
Feldübersicht
Von Klasse geerbte Felder Element
BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPARTVon Schnittstelle geerbte Felder BorderProperties
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINEVon Schnittstelle geerbte Felder GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT, ALIGN_VERTICAL_BOTTOM, ALIGN_VERTICAL_CENTER, ALIGN_VERTICAL_TOPVon Schnittstelle geerbte Felder TextProperties
GLYPH_DEFAULT, GLYPH_DOWN, GLYPH_LEFT, GLYPH_RIGHT, GLYPH_UP, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90 -
Methodenübersicht
Modifikator und TypMethodeBeschreibungCreate a new paragraph element and adds it into this text element.intReturns the glyph orientation.Returns the formula whose return value determines the glyph orientation.intReturns the common HorAlign value from Paragraph Elements if they're all equals or ALIGN_HORIZONTAL_DEFAULT otherwisegetParagraph(int idx) Returns the Paragraph with the specified index.intReturns the count of Paragraphs in this Text.Returns allReportComponents that are descendants of this one.intReturns the value of the property 'text rotation'.Returns the formula whose return value determines the property 'text rotation'.insertParagraph(int pos) Creates a new Paragraph instance which is located at a specific position within the text.parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLvoidFOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLvoidRemoves all Paragraphs from the Text Element.voidremoveParagraph(int idx) Removes the Paragraph at the specified index.voidFOR INTERNAL USE ONLYvoidsetGlyphOrientation(int orientation) Sets the orientation of the glyphs.voidsetGlyphOrientationFormula(FormulaField formula) Sets the formula whose return value determines the glyph orientation.voidsetHorAlign(int value) Sets the value of the property 'horizontal alignment'.
Possible alignments are default, left, center, right or justified.voidFOR INTERNAL USE ONLYvoidsetTextRotation(int rotation) Sets the value of the property 'text rotation'.voidsetTextRotationFormula(FormulaField formula) Sets the formula whose return value determines the property 'text rotation'.Von Klasse geerbte Methoden Element
addListener, copy, getBottomLineStyle, getBottomLineStyleFormula, getBulletValueStack, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getListStack, getParent, getPropertyFormulas, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, getTypeAsString, getVerAlign, getVerAlignFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isCloseBorderOnPageBreakInternal, isDropShadow, isInCrossTab, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setBulletValueStack, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setListStack, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula, setVerAlign, setVerAlignFormulaVon Klasse geerbte Methoden ReportComponent
addPropertyChangeListener, addPropertyChangeListener, addReferencedObject, addVetoableChangeListener, addVetoableChangeListener, getBackColor, getBackColorFormula, getCustomData, getHeight, getKeepTogetherFormula, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, getStructElem, getSuppressFormula, getType, getWidth, getX, getY, isDOMParser, isKeepTogether, isSuppress, parseDOM, parseEndElement, removePropertyChangeListener, removePropertyChangeListener, removeReferencedObject, removeVetoableChangeListener, removeVetoableChangeListener, setBackColor, setBackColorFormula, setCustomData, setHeight, setKeepTogether, setKeepTogetherFormula, setStructElem, setSuppress, setSuppressFormula, setWidth, setX, setYVon Klasse geerbte Methoden Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden BorderProperties
getBackColor, getBackColorFormula, getBottomLineStyle, getBottomLineStyleFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getForeColor, getForeColorFormula, getLeftLineStyle, getLeftLineStyleFormula, getRightLineStyle, getRightLineStyleFormula, getTightHorizontalFormula, getTopLineStyle, getTopLineStyleFormula, isCloseBorderOnPageBreak, isDropShadow, isTightHorizontal, setBackColor, setBackColorFormula, setBottomLineStyle, setBottomLineStyleFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setForeColor, setForeColorFormula, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setTightHorizontal, setTightHorizontalFormula, setTopLineStyle, setTopLineStyleFormulaVon Schnittstelle geerbte Methoden GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormulaVon Schnittstelle geerbte Methoden HyperlinkProperties
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormulaVon Schnittstelle geerbte Methoden com.inet.report.ReferenceHolder
addReferencedObject, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, removeReferencedObject
-
Methodendetails
-
addParagraph
Create a new paragraph element and adds it into this text element. The added paragraph is empty, that means it contains no field or text part element.- Gibt zurück:
- the created paragraph
- Seit:
- 6.0
- Siehe auch:
-
insertParagraph
Creates a new Paragraph instance which is located at a specific position within the text.- Parameter:
pos- The index for the position of the Paragraph.- Gibt zurück:
- The newly created Paragraph instance.
- Seit:
- 7.0
-
getParagraph
Returns the Paragraph with the specified index.- Parameter:
idx- The 0-based index of the Paragraph that should returned.- Gibt zurück:
- the paragraph at the desired index
- Seit:
- 6.0
- Siehe auch:
-
getParagraphCount
public int getParagraphCount()Returns the count of Paragraphs in this Text.- Gibt zurück:
- the number of paragraphs of this Text element
- Seit:
- 6.0
- Siehe auch:
-
removeParagraph
public void removeParagraph(int idx) Removes the Paragraph at the specified index.- Parameter:
idx- The 0-based index of the Paragraph that should removed.- Löst aus:
IndexOutOfBoundsException- If the paragraph at the desired position does not exist.- Seit:
- 6.0
- Siehe auch:
-
removeAllParagraphs
public void removeAllParagraphs()Removes all Paragraphs from the Text Element.- Seit:
- 6.0
- Siehe auch:
-
setReferences
public void setReferences()FOR INTERNAL USE ONLY- Angegeben von:
setReferencesin Schnittstellecom.inet.report.ReferenceHolder- Setzt außer Kraft:
setReferencesin KlasseElement- Seit:
- 6.0
-
resetReferences
public void resetReferences()FOR INTERNAL USE ONLY- Angegeben von:
resetReferencesin Schnittstellecom.inet.report.ReferenceHolder- Setzt außer Kraft:
resetReferencesin KlasseReportComponent
-
getGlyphOrientation
public int getGlyphOrientation()Returns the glyph orientation. This is the rotation of every individual character in the line. The default value is GLYPH_DEFAULT, that is, the glyphs point towards the source of the given block progression. Use the GLYPH constants for the orientation.- Angegeben von:
getGlyphOrientationin SchnittstelleTextProperties- Gibt zurück:
- glyph orientation
- Siehe auch:
-
setGlyphOrientation
public void setGlyphOrientation(int orientation) Sets the orientation of the glyphs. This is the rotation of every individual character in the line. The default value is GLYPH_DEFAULT, that is, the glyphs point towards the source of the given block progression. Use the GLYPH constants for the orientation.- Angegeben von:
setGlyphOrientationin SchnittstelleTextProperties- Parameter:
orientation- Orientation to be set for the glyphs (i.e. the rotation of every individual character of the line of text)- Siehe auch:
-
setGlyphOrientationFormula
Sets the formula whose return value determines the glyph orientation. This is the rotation of every individual character in each line. This formula should return one of the formula constants GlyphDefault, GlyphLeft, GlyphRight, or GlyphDown.- Angegeben von:
setGlyphOrientationFormulain SchnittstelleTextProperties- Parameter:
formula- the formula whose return value determines the glyph orientation
-
getGlyphOrientationFormula
Returns the formula whose return value determines the glyph orientation. This is the rotation of every individual character in each line. This formula should return one of the formula constants GlyphDefault, GlyphLeft, GlyphRight, or GlyphDown.- Angegeben von:
getGlyphOrientationFormulain SchnittstelleTextProperties- Gibt zurück:
- the formula whose return value determines the glyph orientation
-
setTextRotation
public void setTextRotation(int rotation) Sets the value of the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. For example, to have a text element have vertical text running from top to bottom and each line run from right to left, you'd set a glyph orientation of GLYPH_LEFT and a text rotation of ROTATE_270.- Angegeben von:
setTextRotationin SchnittstelleTextProperties- Parameter:
rotation- The new value of the property 'text rotation'. Rotation is done counter-clockwise.- Seit:
- 5.4
- Siehe auch:
-
getTextRotation
public int getTextRotation()Returns the value of the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. For example, to have a text element have vertical text running from top to bottom and each line run from right to left, you'd set a glyph orientation of GLYPH_LEFT and a text rotation of ROTATE_270.- Angegeben von:
getTextRotationin SchnittstelleTextProperties- Gibt zurück:
- The value of the property 'text rotation'.
- Seit:
- 5.4
- Siehe auch:
-
getTextRotationFormula
Returns the formula whose return value determines the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. This formula should return one of the formula constants Rotate0, Rotate90, Rotate180, or Rotate270.- Angegeben von:
getTextRotationFormulain SchnittstelleTextProperties- Gibt zurück:
- formula whose return value determines the property 'text rotation'.
- Siehe auch:
-
setTextRotationFormula
Sets the formula whose return value determines the property 'text rotation'. This property defines a final rotation of the entire element after the text is laid out. This formula should return one of the formula constants Rotate0, Rotate90, Rotate180, or Rotate270.- Angegeben von:
setTextRotationFormulain SchnittstelleTextProperties- Parameter:
formula- formula whose return value determines the property 'text rotation'.- Siehe auch:
-
setHorAlign
public void setHorAlign(int value) Sets the value of the property 'horizontal alignment'.
Possible alignments are default, left, center, right or justified.- Angegeben von:
setHorAlignin SchnittstelleGeneralProperties- Setzt außer Kraft:
setHorAlignin KlasseElement- Parameter:
value- The new value of the property 'horizontal alignment'.- Siehe auch:
-
getHorAlign
public int getHorAlign()Returns the common HorAlign value from Paragraph Elements if they're all equals or ALIGN_HORIZONTAL_DEFAULT otherwise- Angegeben von:
getHorAlignin SchnittstelleGeneralProperties- Setzt außer Kraft:
getHorAlignin KlasseElement- Gibt zurück:
- the horizontal alignment for all paragraphs or
GeneralProperties.ALIGN_HORIZONTAL_DEFAULTif they have different horizontal alignments - Seit:
- 6.0
- Siehe auch:
-
parseElement
public NodeParser parseElement(com.inet.report.parser.XMLTag group, String tag, Attributes atts, Map<String, Object> parserMap) throws FatalParserExceptionFOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLParses 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.
- Angegeben von:
parseElementin SchnittstelleNodeParser- Setzt außer Kraft:
parseElementin KlasseElement- Parameter:
group- 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.- Gibt zurück:
- The NodeParser sub-element if one needed to be created, or null if none was created.
- Löst aus:
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.
-
parseText
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLThis 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)
- Angegeben von:
parseTextin SchnittstelleNodeParser- Setzt außer Kraft:
parseTextin KlasseElement- Parameter:
text- text encountered and to be storedparserMap- The map of current Parser.
-
getSubComponents
Returns allReportComponents that are descendants of this one. E.G. this will return all Element of aSection. But it's as well useful forCrossTabs orTextelements which have additional elements.- Angegeben von:
getSubComponentsin KlasseReportComponent- Gibt zurück:
- a list with all sub components which can be empty as well; will be
nullif the component has no descendants
-