public class Text extends Element implements TextProperties, com.inet.report.ReferenceHolder, HyperlinkProperties, BorderProperties
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");
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. BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART
GLYPH_DEFAULT, GLYPH_DOWN, GLYPH_LEFT, GLYPH_RIGHT, GLYPH_UP, ROTATE_0, ROTATE_180, ROTATE_270, ROTATE_90
LINE_STYLE_DASHED, LINE_STYLE_DOTTED, LINE_STYLE_DOUBLE, LINE_STYLE_SINGLE, NO_LINE
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
Modifier and Type | Method and Description |
---|---|
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.
|
java.util.List<Paragraph> |
getSubComponents()
Returns all
ReportComponent s that are descendants of this one. |
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.
|
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'.
|
addListener, copy, getBottomLineStyle, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getParent, getPropertyFormulas, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlignFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
getBackColor, getBackColorFormula, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
getHyperlinkUrl, getHyperlinkUrlFormula, setHyperlinkUrl, setHyperlinkUrlFormula
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, setTopLineStyleFormula
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
public Paragraph addParagraph()
Paragraph
public 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 TextProperties
TextProperties.setGlyphOrientation(int)
,
TextProperties.GLYPH_DEFAULT
,
TextProperties.GLYPH_UP
,
TextProperties.GLYPH_DOWN
,
TextProperties.GLYPH_RIGHT
,
TextProperties.GLYPH_LEFT
public void setGlyphOrientation(int orientation)
setGlyphOrientation
in interface TextProperties
orientation
- 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_LEFT
public void setGlyphOrientationFormula(FormulaField formula)
setGlyphOrientationFormula
in interface TextProperties
formula
- the formula whose return value determines the glyph orientationpublic FormulaField getGlyphOrientationFormula()
getGlyphOrientationFormula
in interface TextProperties
public void setTextRotation(int rotation)
setTextRotation
in interface TextProperties
rotation
- The new value of the property 'text rotation'. Rotation is done counter-clockwise.TextProperties.ROTATE_0
,
TextProperties.ROTATE_90
,
TextProperties.ROTATE_180
,
TextProperties.ROTATE_270
public int getTextRotation()
getTextRotation
in interface TextProperties
TextProperties.ROTATE_0
,
TextProperties.ROTATE_90
,
TextProperties.ROTATE_180
,
TextProperties.ROTATE_270
public FormulaField getTextRotationFormula()
getTextRotationFormula
in interface TextProperties
TextProperties.getTextRotation()
,
TextProperties.setTextRotation(int)
public void setTextRotationFormula(FormulaField formula)
setTextRotationFormula
in interface TextProperties
formula
- formula whose return value determines the property 'text rotation'.TextProperties.getTextRotation()
,
TextProperties.setTextRotation(int)
public void setHorAlign(int value)
setHorAlign
in interface GeneralProperties
setHorAlign
in class Element
value
- 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_JUSTIFIED
public int getHorAlign()
getHorAlign
in interface GeneralProperties
getHorAlign
in class Element
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT
if they have different horizontal alignmentsGeneralProperties.ALIGN_HORIZONTAL_DEFAULT
,
GeneralProperties.ALIGN_HORIZONTAL_LEFT
,
GeneralProperties.ALIGN_HORIZONTAL_CENTER
,
GeneralProperties.ALIGN_HORIZONTAL_RIGHT
,
GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED
public java.util.List<Paragraph> getSubComponents()
ReportComponent
s that are descendants of this one. E.G. this will return all Element
of a Section
. But it's as well useful for CrossTab
s or Text
elements which have
additional elements.getSubComponents
in class ReportComponent
null
if the component has no descendantsCopyright © 1999-2020 by i-net software GmbH