|
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.AbstractFontElement
com.inet.report.AbstractValueElement
com.inet.report.FieldElement
public class FieldElement
A FieldElement is an object like a label but the content of it comes dynamically from a field, i.e. a DatabaseField, FormulaField,
PromptField etc. With this class you can add a dynamic content into a section of your report. Add an instance of this class with method
Section.addFieldElement(Field, int, int, int, int) in class Section. If you want to insert a field into a Text using this class is wrong, use
FieldPart.
code example: adding a dynamic content to the detail section
Fields fields = engine.getFields();
Area area = engine.getArea("D");
Section section = area.getSection(0);
FieldElement fElem = section.addFieldElement(fields.getDatabaseField(0),0,0,1000,220);
code example: get existing FieldElements and change the property color
Area area = engine.getArea("D");
Section section = area.getSection(0);
Vector elementsV = section.getElementsV();
for(int i=0;i< elementsV.size();i++){
Element elem = (Element)elementsV.elementAt(i);
if(elem instanceof FieldElement){
FieldElement fElem = (FieldElement)elem;
fElem.setFontColor(CoderXML.COLOR_RED);
}
}
If you need a destined FieldElement you have to check some properties, to be sure having the right one.
Note that the properties for number and currency formats does not take effect when the property 'use system default format' is set. Changes at properties for date/time/datetime does not take effect
when the property 'date windows default type' is set to a short or long default format.
This class is part of the RDC.
Engine.getFields(),
Fields,
FieldPart,
Section.addFieldElement(Field, 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.ParagraphProperties |
|---|
INDENT_DEFAULT, LINE_SPACING_ABSOLUTE, LINE_SPACING_RELATIVE |
| 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.TextInterpretationProperties |
|---|
ADVANCED_HTML_TEXT, HTML_TEXT, PLAIN_TEXT, RTF_TEXT |
| Fields inherited from interface com.inet.report.FontProperties |
|---|
FONT_DIALOG, FONT_MONOSPACED, FONT_SANS_SERIF, FONT_SERIF, FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_STRIKETHROUGH, FONT_STYLE_UNDERLINE |
| 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 | |
|---|---|
java.lang.String |
getBaseUrl()
Returns the currently set base URL for relative URLs. |
FormulaField |
getBaseUrlFormula()
Returns the property formula set for the base URL property. |
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 |
getGlyphOrientation()
Returns the glyph orientation. |
FormulaField |
getGlyphOrientationFormula()
Returns the formula whose return value determines the glyph orientation. |
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. |
java.util.List |
getPropertyFormulas()
Returns a list with all property formulas that are set for this report element. |
int |
getRightIndent()
Returns the value of the property 'rightIndent'. |
FormulaField |
getRightIndentFormula()
Returns the formula whose return value determines the property 'right indent'. |
int |
getTextInterpretation()
Returns the type of text interpretation. |
FormulaField |
getTextInterpretationFormula()
Sets the formula for the type of text interpretation. |
int |
getTextRotation()
Returns the value of the property 'text rotation'. |
FormulaField |
getTextRotationFormula()
Returns the formula whose return value determines the property 'text rotation'. |
java.lang.String |
paramString()
Create a string representation of this class 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 |
parseEndElement(com.inet.report.parser.XMLTag group,
java.lang.String tag,
java.util.Map parserMap)
FOR INTERNAL USE ONLY Internal method for reading report XML Receive notification of the end of an XML tag. |
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 |
setBaseUrl(java.lang.String base)
Sets the base URL for relative URLs. |
void |
setBaseUrlFormula(FormulaField newFormula)
Sets a property formula for the base URL property. |
void |
setCanGrow(boolean canGrow)
Number and Currency Field Elements can be set can grow, however they then always have a maximum limit of 1 line, i.e. |
void |
setCanGrowCount(int limit)
Number and Currency Field Elements can only be set to a can grow maximum limit of 1. |
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 |
setGlyphOrientation(int orientation)
Sets the orientation of the glyphs. |
void |
setGlyphOrientationFormula(FormulaField formula)
Sets the formula whose return value determines the glyph orientation. |
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'. |
void |
setTextInterpretation(int interpretation)
Sets the type of text interpretation for the data of the field. |
void |
setTextInterpretationFormula(FormulaField newFormula)
Sets the formula for the type of text interpretation. |
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 |
| Method Detail |
|---|
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()public int getTextInterpretation()
getTextInterpretation in interface TextInterpretationPropertiesTextInterpretationProperties.PLAIN_TEXT,
TextInterpretationProperties.RTF_TEXT,
TextInterpretationProperties.HTML_TEXTpublic void setTextInterpretation(int interpretation)
setTextInterpretation in interface TextInterpretationPropertiesinterpretation - the new text interpretation to set. must be one of TextInterpretationProperties.PLAIN_TEXT, TextInterpretationProperties.RTF_TEXT, TextInterpretationProperties.HTML_TEXT or TextInterpretationProperties.ADVANCED_HTML_TEXTTextInterpretationProperties.getTextInterpretation(),
TextInterpretationProperties.PLAIN_TEXT,
TextInterpretationProperties.RTF_TEXT,
TextInterpretationProperties.HTML_TEXTpublic FormulaField getTextInterpretationFormula()
getTextInterpretationFormula in interface TextInterpretationPropertiesnull if none has been setTextInterpretationProperties.setTextInterpretation(int),
TextInterpretationProperties.getTextInterpretation(),
TextInterpretationProperties.setTextInterpretationFormula(com.inet.report.FormulaField),
TextInterpretationProperties.PLAIN_TEXT,
TextInterpretationProperties.RTF_TEXT,
TextInterpretationProperties.HTML_TEXTpublic void setTextInterpretationFormula(FormulaField newFormula)
setTextInterpretationFormula in interface TextInterpretationPropertiesnewFormula - the formula to set for text interpretation or null if no formula should be setTextInterpretationProperties.setTextInterpretation(int),
TextInterpretationProperties.getTextInterpretation(),
TextInterpretationProperties.getTextInterpretationFormula(),
TextInterpretationProperties.PLAIN_TEXT,
TextInterpretationProperties.RTF_TEXT,
TextInterpretationProperties.HTML_TEXTpublic java.lang.String getBaseUrl()
getBaseUrl in interface TextInterpretationPropertiesDocument.StreamDescriptionPropertypublic FormulaField getBaseUrlFormula()
getBaseUrlFormula in interface TextInterpretationPropertiesDocument.StreamDescriptionPropertypublic void setBaseUrl(java.lang.String base)
setBaseUrl in interface TextInterpretationPropertiesbase - Base URL to use for relative URLsDocument.StreamDescriptionPropertypublic void setBaseUrlFormula(FormulaField newFormula)
setBaseUrlFormula in interface TextInterpretationPropertiesnewFormula - formula field for the property formula for the base URL property, or nullDocument.StreamDescriptionPropertypublic java.lang.String paramString()
paramString in class Elementpublic java.util.List getPropertyFormulas()
getPropertyFormulas in class AbstractValueElementpublic 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 setCanGrow(boolean canGrow)
setCanGrow in interface GeneralPropertiessetCanGrow in class ElementcanGrow - whether or not this element should be able to "grow" vertically if its content exceeds its available space.Element.setCanGrow(boolean)public void setCanGrowCount(int limit)
setCanGrowCount in interface GeneralPropertiessetCanGrowCount in class Elementlimit - maximum "can grow" limit
java.lang.IllegalArgumentException - if this Element is a Number or Currency FieldElement and newFormula is not 1Element.setCanGrow(boolean)public 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 NodeParserparseElement in class AbstractValueElementgroup - 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 parseEndElement(com.inet.report.parser.XMLTag group,
java.lang.String tag,
java.util.Map parserMap)
throws FatalParserException
Receive notification of the end of an XML tag.
parseEndElement in interface NodeParsergroup - XMLTag of the current node to be parsed, or null if there is no such current group.tag - The XMLTag to be parsedparserMap - 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 | |||||||