Package com.inet.report
Class FieldPart
- java.lang.Object
-
- All Implemented Interfaces:
FontProperties
,GeneralProperties
,NodeParser
,com.inet.report.ReferenceHolder
,ValueProperties
,java.io.Serializable
,java.lang.Cloneable
public class FieldPart extends AbstractValueElement
This class provides an object commonly known as aFieldElement
, i.e. with aDatabaseField
or aSummaryField
. The difference is the location of the element.FieldElements
are located in a section directly,FieldPart
elements are located in aText
, more exact in aParagraph
.
For each set of the database table it will be evaluated and assigned with the value in the database or the value of a expression depending on the kind of the field. Note that it is not possible to instanciate this class direcly. Use theParagraph.addFieldPart(Field)
method in classParagraph
instead.
Note that the properties for number and currency format 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.- See Also:
Paragraph
,Text
,TextPart
,Fields
, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.inet.report.AbstractValueElement
AbstractValueElement.DateTimeProps, AbstractValueElement.NumberProps
-
Nested classes/interfaces inherited from class com.inet.report.AbstractFontElement
AbstractFontElement.FontProps
-
Nested classes/interfaces inherited from class com.inet.report.Element
Element.BorderProps, Element.CommonProperties, Element.ElementTypes, Element.HyperlinkProps, Element.StringProps
-
-
Field Summary
-
Fields inherited from class com.inet.report.Element
BOX, CHART, CROSSTAB, CROSSTABSECTION, DATABASE_PICTURE, FIELD, FIELDPART, FORMFIELD, INTERACTIVE_SORTING, JAVABEAN, LINE, PARAGRAPH, PICTURE, SIGNATURE, SUBREPORT, TEXT, TEXTPART
-
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.GeneralProperties
ALIGN_HORIZONTAL_CENTER, ALIGN_HORIZONTAL_DEFAULT, ALIGN_HORIZONTAL_JUSTIFIED, ALIGN_HORIZONTAL_LEFT, ALIGN_HORIZONTAL_RIGHT
-
Fields inherited from interface com.inet.report.ValueProperties
AM_PM_AFTER, AM_PM_BEFORE, BRACKETED, DATE_ONLY_ORDER, DATE_TIME_ORDER, DAY_MONTH_YEAR, DAY_OF_WEEK_ENCLOSURE_ANGLE, DAY_OF_WEEK_ENCLOSURE_NONE, DAY_OF_WEEK_ENCLOSURE_PARENTHESIS, DAY_OF_WEEK_ENCLOSURE_SQUARED, DEFAULT_FORMAT, FIXED_SYMBOL, FLOATING_SYMBOL, GREGORIAN_CALENDAR, GREGORIAN_US_CALENDAR, HIJRI_CALENDAR, JAPANESE_CALENDAR, KOREAN_CALENDAR, LEADING_CURRENCY_INSIDE_NEGATIVE, LEADING_CURRENCY_OUTSIDE_NEGATIVE, LEADING_DAY_OF_WEEK, LEADING_MINUS, LEADING_ZERO_NUMERIC_DAY, LEADING_ZERO_NUMERIC_MONTH, LONG_DAY_OF_WEEK, LONG_ERA, LONG_MONTH, LONG_YEAR, MONTH_DAY_YEAR, NO_DAY, NO_DAY_OF_WEEK, NO_ERA, NO_HOUR, NO_MINUTE, NO_MONTH, NO_SYMBOL, NO_YEAR, NOT_NEGATIVE, NOT_USING_SYSTEM_DEFAULTS, NUMBER_FORMAT_CURRENCY, NUMBER_FORMAT_FRACTIONAL, NUMBER_FORMAT_INTEGER, NUMBER_FORMAT_PERCENT, NUMERAL_LANGUAGE_ARABIC, NUMERAL_LANGUAGE_BENGALI, NUMERAL_LANGUAGE_DEVANAGARI, NUMERAL_LANGUAGE_EASTERN_ARABIC, NUMERAL_LANGUAGE_ETHIOPIC, NUMERAL_LANGUAGE_EUROPEAN, NUMERAL_LANGUAGE_GUJARATI, NUMERAL_LANGUAGE_GURMUKHI, NUMERAL_LANGUAGE_KANNADA, NUMERAL_LANGUAGE_KHMER, NUMERAL_LANGUAGE_LAO, NUMERAL_LANGUAGE_MALAYALAM, NUMERAL_LANGUAGE_MONGOLIAN, NUMERAL_LANGUAGE_MYANMAR, NUMERAL_LANGUAGE_ORIYA, NUMERAL_LANGUAGE_TAMIL, NUMERAL_LANGUAGE_TELUGU, NUMERAL_LANGUAGE_THAI, NUMERAL_LANGUAGE_TIBETAN, NUMERIC_DAY, NUMERIC_HOUR, NUMERIC_HOUR_NO_LEADING_ZERO, NUMERIC_MINUTE, NUMERIC_MINUTE_NO_LEADING_ZERO, NUMERIC_MONTH, NUMERIC_NO_LEADING_ZERO, NUMERIC_NO_SECOND, NUMERIC_SECOND, ONE_OR_ZERO, ROUND_CEILING, ROUND_DOWN, ROUND_FLOOR, ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_HALF_UP, ROUND_UP, SHORT_DAY_OF_WEEK, SHORT_ERA, SHORT_MONTH, SHORT_YEAR, T_OR_F, TAIWANESE_CALENDAR, THAI_CALENDAR, TIME_DATE_ORDER, TIME_ONLY_ORDER, TRAILING_CURRENCY_INSIDE_NEGATIVE, TRAILING_CURRENCY_OUTSIDE_NEGATIVE, TRAILING_DAY_OF_WEEK, TRAILING_MINUS, TRUE_OR_FALSE, TWELVE_HOURS, TWENTY_FOUR_HOURS, USE_CUSTOM_FORMAT, USE_SYSTEM_LONG_DATE, USE_SYSTEM_LONG_TIME, USE_SYSTEM_MEDIUM_DATE, USE_SYSTEM_MEDIUM_TIME, USE_SYSTEM_SHORT_DATE, USE_SYSTEM_SHORT_TIME, Y_OR_N, YEAR_MONTH_DAY, YES_OR_NO
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHorAlign()
Use the value of the parent paragraph.FormulaField
getHorAlignFormula()
Use the value of the parent paragraph.Paragraph
getParentParagraph()
Returns this field part's parent's paragraph.java.util.List<? extends ReportComponent>
getSubComponents()
Returns allReportComponent
s that are descendants of this one.int
indexOf()
Returns the index of this field part in the paragraph it is located in.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<java.lang.String,java.lang.Object> parserMap)
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY Internal method for reading report XMLvoid
parseEndElement(com.inet.report.parser.XMLTag group, java.lang.String tag, java.util.Map<java.lang.String,java.lang.Object> parserMap)
FOR INTERNAL USE ONLY Internal method for reading report XMLvoid
resetReferences()
FOR INTERNAL USE ONLYvoid
setHorAlign(int value)
Use the value of the parent paragraph.void
setHorAlignFormula(FormulaField newFormula)
Use the value of the parent paragraph.-
Methods inherited from class com.inet.report.AbstractValueElement
getAllowFieldClippingFormula, getAmPmOrder, getAmPmOrderFormula, getAmString, getAmStringFormula, getBooleanFormatOutputType, getBooleanFormatOutputTypeFormula, getCurrencyPosition, getCurrencyPositionFormula, getCurrencySeparator, getCurrencySeparatorFormula, getCurrencySymbol, getCurrencySymbolFormula, getCurrencySymbolType, getCurrencySymbolTypeFormula, getDateCalendarType, getDateCalendarTypeFormula, getDateEraType, getDateEraTypeFormula, getDateFirstSeparator, getDateFirstSeparatorFormula, getDateFormatType, getDateFormatTypeFormula, getDateOrder, getDateOrderFormula, getDatePrefixSeparator, getDatePrefixSeparatorFormula, getDateSecondSeparator, getDateSecondSeparatorFormula, getDateSuffixSeparator, getDateSuffixSeparatorFormula, getDateTimeOrder, getDateTimeOrderFormula, getDateTimeSeparator, getDateTimeSeparatorFormula, getDateWindowsDefaultTypeFormula, getDayOfWeekEnclosure, getDayOfWeekEnclosureFormula, getDayOfWeekPosition, getDayOfWeekPositionFormula, getDayOfWeekSeparator, getDayOfWeekSeparatorFormula, getDayOfWeekType, getDayOfWeekTypeFormula, getDayType, getDayTypeFormula, getDecimalSeparatorSymbol, getDecimalSeparatorSymbolFormula, getHourMinuteSeparator, getHourMinuteSeparatorFormula, getHourType, getHourTypeFormula, getManualFormatFormula, getMinuteSecondSeparator, getMinuteSecondSeparatorFormula, getMinuteType, getMinuteTypeFormula, getMonthType, getMonthTypeFormula, getNDecimalPlaces, getNDecimalPlacesFormula, getNegativeType, getNegativeTypeFormula, getNumberFormatType, getNumberFormatTypeFormula, getNumeralLanguage, getPmString, getPmStringFormula, getPropertyFormulas, getReverseSignForDisplayFormula, getRounding, getRoundingFormula, getRoundingMode, getRoundingModeFormula, getSecondType, getSecondTypeFormula, getSuppressIfZero, getSuppressIfZeroFormula, getThousandsSeparatorSymbol, getThousandsSeparatorSymbolFormula, getTimeBase, getTimeBaseFormula, getTimeFormatType, getTimeFormatTypeFormula, getUseLeadingZero, getUseLeadingZeroFormula, getUseOneCurrencySymbolPerPage, getUseOneCurrencySymbolPerPageFormula, getUseThousandsSeparator, getUseThousandsSeparatorFormula, getYearType, getYearTypeFormula, getZeroValueString, isAllowFieldClipping, isReverseSignForDisplay, setAllowFieldClipping, setAllowFieldClippingFormula, setAmPmOrder, setAmPmOrderFormula, setAmString, setAmStringFormula, setBooleanFormatOutputType, setBooleanFormatOutputTypeFormula, setCurrencyPosition, setCurrencyPositionFormula, setCurrencySeparator, setCurrencySeparatorFormula, setCurrencySymbol, setCurrencySymbolFormula, setCurrencySymbolType, setCurrencySymbolTypeFormula, setDateCalendarType, setDateCalendarTypeFormula, setDateEraType, setDateEraTypeFormula, setDateFirstSeparator, setDateFirstSeparatorFormula, setDateFormatType, setDateFormatTypeFormula, setDateOrder, setDateOrderFormula, setDatePrefixSeparator, setDatePrefixSeparatorFormula, setDateSecondSeparator, setDateSecondSeparatorFormula, setDateSuffixSeparator, setDateSuffixSeparatorFormula, setDateTimeOrder, setDateTimeOrderFormula, setDateTimeSeparator, setDateTimeSeparatorFormula, setDateWindowsDefaultTypeFormula, setDayOfWeekEnclosure, setDayOfWeekEnclosureFormula, setDayOfWeekPosition, setDayOfWeekPositionFormula, setDayOfWeekSeparator, setDayOfWeekSeparatorFormula, setDayOfWeekType, setDayOfWeekTypeFormula, setDayType, setDayTypeFormula, setDecimalSeparatorSymbol, setDecimalSeparatorSymbolFormula, setField, setHourMinuteSeparator, setHourMinuteSeparatorFormula, setHourType, setHourTypeFormula, setManualFormatFormula, setMinuteSecondSeparator, setMinuteSecondSeparatorFormula, setMinuteType, setMinuteTypeFormula, setMonthType, setMonthTypeFormula, setNDecimalPlaces, setNDecimalPlacesFormula, setNegativeType, setNegativeTypeFormula, setNumberFormatType, setNumberFormatTypeFormula, setNumeralLanguage, setPmString, setPmStringFormula, setReverseSignForDisplay, setReverseSignForDisplayFormula, setRounding, setRoundingFormula, setRoundingMode, setRoundingModeFormula, setSecondType, setSecondTypeFormula, setSuppressIfZero, setSuppressIfZeroFormula, setThousandsSeparatorSymbol, setThousandsSeparatorSymbolFormula, setTimeBase, setTimeBaseFormula, setTimeFormatType, setTimeFormatTypeFormula, setUseLeadingZero, setUseLeadingZeroFormula, setUseOneCurrencySymbolPerPage, setUseOneCurrencySymbolPerPageFormula, setUseThousandsSeparator, setUseThousandsSeparatorFormula, setYearType, setYearTypeFormula, setZeroValueString
-
Methods inherited from class com.inet.report.AbstractFontElement
getFontColor, getFontColorFormula, getFontName, getFontNameFormula, getFontSize, getFontSizeFormula, getFontSizeTwips, getFontStyle, getFontStyleFormula, getStrikeoutFormula, getUnderlineFormula, isBold, isItalic, isStrikeout, isUnderline, setBold, setFontColor, setFontColorFormula, setFontName, setFontNameFormula, setFontSize, setFontSizeFormula, setFontSizeTwips, setFontStyle, setFontStyleFormula, setItalic, setStrikeout, setStrikeoutFormula, setUnderline, setUnderlineFormula
-
Methods inherited from class com.inet.report.Element
addListener, copy, getBottomLineStyle, getBottomLineStyleFormula, getBulletValueStack, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getListStack, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, getTypeAsString, isCanGrow, isCloseBorderOnPageBreak, isCloseBorderOnPageBreakInternal, isDropShadow, isInCrossTab, isSuppressIfDuplicated, isTightHorizontal, parseText, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setBulletValueStack, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setForeColor, setForeColorFormula, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setListStack, setReferences, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
-
Methods inherited from class com.inet.report.ReportComponent
addPropertyChangeListener, addPropertyChangeListener, addReferencedObject, addVetoableChangeListener, addVetoableChangeListener, getBackColor, getBackColorFormula, getCustomData, getHeight, getKeepTogetherFormula, getRealReferencedObjectCount, getReferencedObjectCount, getReferencedObjects, getSuppressFormula, getType, getWidth, getX, getY, isDOMParser, isKeepTogether, isSuppress, parseDOM, removePropertyChangeListener, removePropertyChangeListener, removeReferencedObject, removeVetoableChangeListener, removeVetoableChangeListener, setBackColor, setBackColorFormula, setCustomData, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.inet.report.GeneralProperties
getKeepTogetherFormula, getSuppressFormula, isKeepTogether, isSuppress, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula
-
-
-
-
Method Detail
-
getParentParagraph
public Paragraph getParentParagraph()
Returns this field part's parent's paragraph.- Returns:
- This field part's parent's paragraph.
- Since:
- 6.0
- See Also:
Paragraph
-
paramString
public java.lang.String paramString()
Creates and return a String representation for debugging.- Overrides:
paramString
in classElement
- Returns:
- String representation of this Element for debugging purposes
-
indexOf
public int indexOf()
Returns the index of this field part in the paragraph it is located in.- Overrides:
indexOf
in classElement
- Returns:
- Index of this field part in the paragraph it is located in.
- Since:
- 6.0
- See Also:
Element.setIndex(int)
-
resetReferences
public void resetReferences()
FOR INTERNAL USE ONLY- Specified by:
resetReferences
in interfacecom.inet.report.ReferenceHolder
- Overrides:
resetReferences
in classReportComponent
-
parseElement
public NodeParser parseElement(com.inet.report.parser.XMLTag group, java.lang.String tag, org.xml.sax.Attributes atts, java.util.Map<java.lang.String,java.lang.Object> parserMap) throws FatalParserException
FOR INTERNAL USE ONLY FOR INTERNAL USE ONLY FOR 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.
- Specified by:
parseElement
in interfaceNodeParser
- Overrides:
parseElement
in classAbstractValueElement
- Parameters:
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.- Returns:
- The NodeParser sub-element if one needed to be created, or null if none was created.
- Throws:
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.
-
parseEndElement
public void parseEndElement(com.inet.report.parser.XMLTag group, java.lang.String tag, java.util.Map<java.lang.String,java.lang.Object> parserMap) throws FatalParserException
FOR INTERNAL USE ONLY Internal method for reading report XMLReceive notification of the end of an XML tag.
- Specified by:
parseEndElement
in interfaceNodeParser
- Overrides:
parseEndElement
in classReportComponent
- Parameters:
group
- 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.- Throws:
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.
-
getHorAlign
public int getHorAlign()
Use the value of the parent paragraph. Returns the value of the property 'horizontal alignment'.
Possible alignments are default, left, center, right or justified.- Specified by:
getHorAlign
in interfaceGeneralProperties
- Overrides:
getHorAlign
in classElement
- Returns:
- Possible return values are default, left, center, right or justified.
- See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT
,GeneralProperties.ALIGN_HORIZONTAL_LEFT
,GeneralProperties.ALIGN_HORIZONTAL_CENTER
,GeneralProperties.ALIGN_HORIZONTAL_RIGHT
,GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED
-
getHorAlignFormula
public FormulaField getHorAlignFormula()
Use the value of the parent paragraph. Returns the formula for the property 'horizontal alignment'.
Possible alignments are default, left, center, right or justified.- Specified by:
getHorAlignFormula
in interfaceGeneralProperties
- Overrides:
getHorAlignFormula
in classElement
- Returns:
- FormulaField The formula for the property 'horizontal alignment'.
-
setHorAlign
public void setHorAlign(int value)
Use the value of the parent paragraph. Sets the value of the property 'horizontal alignment'.
Possible alignments are default, left, center, right or justified.- Specified by:
setHorAlign
in interfaceGeneralProperties
- Overrides:
setHorAlign
in classElement
- Parameters:
value
- The new value of the property 'horizontal alignment'.- See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT
,GeneralProperties.ALIGN_HORIZONTAL_LEFT
,GeneralProperties.ALIGN_HORIZONTAL_CENTER
,GeneralProperties.ALIGN_HORIZONTAL_RIGHT
,GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED
-
setHorAlignFormula
public void setHorAlignFormula(FormulaField newFormula)
Use the value of the parent paragraph. Sets the formula for the property 'horizontal alignment'.
Possible alignments are default, left, center, right or justified.- Specified by:
setHorAlignFormula
in interfaceGeneralProperties
- Overrides:
setHorAlignFormula
in classElement
- Parameters:
newFormula
- The new formula for the property 'horizontal alignment'. The result of the formula should be in range from 0 to 4.- See Also:
GeneralProperties.ALIGN_HORIZONTAL_DEFAULT
,GeneralProperties.ALIGN_HORIZONTAL_LEFT
,GeneralProperties.ALIGN_HORIZONTAL_CENTER
,GeneralProperties.ALIGN_HORIZONTAL_RIGHT
,GeneralProperties.ALIGN_HORIZONTAL_JUSTIFIED
-
getSubComponents
public java.util.List<? extends ReportComponent> getSubComponents()
Returns allReportComponent
s that are descendants of this one. E.G. this will return all Element of aSection
. But it's as well useful forCrossTab
s orText
elements which have additional elements.- Specified by:
getSubComponents
in classReportComponent
- Returns:
- a list with all sub components which can be empty as well; will be
null
if the component has no descendants
-
-