i-net Crystal-Clear

com.inet.report
Class AbstractFontElement

java.lang.Object
  extended by com.inet.report.ReportComponent
      extended by com.inet.report.Element
          extended by com.inet.report.AbstractFontElement
All Implemented Interfaces:
BorderProperties, FontProperties, GeneralProperties, NodeParser, com.inet.report.ReferenceHolder, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
AbstractValueElement, JavaBean, Subreport, TextPart

public abstract class AbstractFontElement
extends Element
implements FontProperties

The abstract class AbstractFontElement implements FontProperties class and extends Element. Inherit from this class to support ElementS that receive Font properties.

Since:
6.0
See Also:
Element, FontProperties, 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.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
 int getFontColor()
          Gets the value of the property 'font color'.
 FormulaField getFontColorFormula()
          Gets the formula for the property 'font color'.
 java.lang.String getFontName()
          Gets the value of the property 'font name'.
 FormulaField getFontNameFormula()
          Gets the formula for the property 'font name'.
 int getFontSize()
          Gets the value of the property 'font size'.
 FormulaField getFontSizeFormula()
          Gets the formula for the property 'font size'.
 int getFontSizeTwips()
          Gets the value of the property 'font size' in Twips.
 int getFontStyle()
          Gets the value of the property 'font style'.
 FormulaField getFontStyleFormula()
          Gets the formula for the property 'font style'.
 java.util.List getPropertyFormulas()
          Returns a list with all property formulas that are set for this element.
 FormulaField getStrikeoutFormula()
          Returns The formula field for the property 'strikeout'.
 FormulaField getUnderlineFormula()
          Returns the formula field for the property 'underline'.
 boolean isBold()
          Returns whether the text in this element is bold or not.
 boolean isItalic()
          Returns whether the text in this element is italic or not.
 boolean isStrikeout()
          Returns whether the text in this element is struck through or not.
 boolean isUnderline()
          Returns whether the text in this element is underlined or not.
 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 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. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

 void setBold(boolean newValue)
          Sets the value of the property 'font bold'.
 void setFontColor(int newValue)
          Sets the value of the property 'font color'.
 void setFontColorFormula(FormulaField newFormula)
          Sets the formula of the property 'font color'.
 void setFontName(java.lang.String newValue)
          Sets the value of the property 'font name'.
 void setFontNameFormula(FormulaField newFormula)
          Sets the formula for the property 'font name'.
 void setFontSize(int newValue)
          Sets the value of the property 'font size'.
 void setFontSizeFormula(FormulaField newFormula)
          Sets the formula for the property 'font size'.
 void setFontSizeTwips(int newValue)
          Sets the value of the property 'font size'.
 void setFontStyle(int fontStyle)
          Sets the value of the property 'font style'.
 void setFontStyleFormula(FormulaField newFormula)
          Sets the formula for the property 'font style'.
 void setItalic(boolean newValue)
          Sets the value of the property 'italic'.
 void setStrikeout(boolean newValue)
          Sets the value of the property 'strikeout'.
 void setStrikeoutFormula(FormulaField newFormula)
          Set the formula field for the property 'strikeout'.
 void setUnderline(boolean newValue)
          Sets the value of the property 'underline'.
 void setUnderlineFormula(FormulaField newFormula)
          Sets the formula field for the property 'underline'.
 
Methods inherited from class com.inet.report.Element
addListener, copy, copyXML2, getBottomLineStyle, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkType, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyle, getLeftLineStyleFormula, getParent, getRightLineStyle, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyle, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, parseText, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, setHyperlinkType, setHyperlinkUrl, setHyperlinkUrlFormula, setIndex, setLeftLineStyle, setLeftLineStyleFormula, setRightLineStyle, setRightLineStyleFormula, setSuppressIfDuplicated, setSuppressIfDuplicatedFormula, setTightHorizontal, setTightHorizontalFormula, setToolTipsText, setToolTipsTextFormula, setTopLineStyle, setTopLineStyleFormula
 
Methods inherited from class com.inet.report.ReportComponent
getBackColor, getBackColorFormula, getCustomData, getHeight, getKeepTogetherFormula, getSuppressFormula, getType, getWidth, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setCustomData, setHeight, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setWidth, setX, setY
 
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

setFontSize

public final void setFontSize(int newValue)
Sets the value of the property 'font size'. Use this property to change the font format of the labels in this field element.

Specified by:
setFontSize in interface FontProperties
Parameters:
newValue - The font size in points, i.e. 8.
Throws:
java.lang.IllegalArgumentException - if newValue is negative

getFontSize

public int getFontSize()
Gets the value of the property 'font size'. Use this property to change the font format of the labels in this field element.

Specified by:
getFontSize in interface FontProperties
Returns:
The font size in points.

setFontSizeFormula

public final void setFontSizeFormula(FormulaField newFormula)
Sets the formula for the property 'font size'. Use this property to change the font format of the labels in this field element.

Specified by:
setFontSizeFormula in interface FontProperties
Parameters:
newFormula - The new formula for the property 'font size'.

getFontSizeFormula

public FormulaField getFontSizeFormula()
Gets the formula for the property 'font size'. Use this property to change the font format of the labels in this field element.

Specified by:
getFontSizeFormula in interface FontProperties
Returns:
FormulaField The formula for the property 'font size'.
See Also:
FormulaField

getFontName

public java.lang.String getFontName()
Gets the value of the property 'font name'. Use this property to change the name of the font, used by the labels in this field element.

Specified by:
getFontName in interface FontProperties
Returns:
The value of the property 'font name'.

setFontName

public final void setFontName(java.lang.String newValue)
Sets the value of the property 'font name'. Use this property to change the name of the font, used by the labels in this field element.
The font name will be used when the font-mapping to symbolic fonts is switched off in the i-net Crystal-Clear configuration (see UseNativeFonts and FontPath= for PDF export)

Specified by:
setFontName in interface FontProperties
Parameters:
newValue - The new value of the property 'font name'.

setFontNameFormula

public final void setFontNameFormula(FormulaField newFormula)
Sets the formula for the property 'font name'. Use this property to change the name of the font, used by the labels in this field element.

Specified by:
setFontNameFormula in interface FontProperties
Parameters:
newFormula - The formula for the property 'font name'.

getFontNameFormula

public FormulaField getFontNameFormula()
Gets the formula for the property 'font name'. Use this property to change the name of the font, used by the labels in this field element.

Specified by:
getFontNameFormula in interface FontProperties
Returns:
FormulaField The formula for the property 'font name'.

getFontStyle

public int getFontStyle()
Gets the value of the property 'font style'. The fontstyle property represents the different styles of a font, which can be italic, underlined and/or strikeouted.

Specified by:
getFontStyle in interface FontProperties
Returns:
The value of the property 'font style', where
italic is represented by second bit of newValue,
underline by the third bit of newValue,
strikeout by the fourth bit of newValue.
See Also:
FontProperties.FONT_STYLE_BOLD, FontProperties.FONT_STYLE_ITALIC, FontProperties.FONT_STYLE_UNDERLINE, FontProperties.FONT_STYLE_STRIKETHROUGH

setFontStyle

public final void setFontStyle(int fontStyle)
Sets the value of the property 'font style'. The fontstyle property represents the different styles of a font, which can be cursive, underlined and/or struck through.

Specified by:
setFontStyle in interface FontProperties
Parameters:
fontStyle - The new font style, where
bold is represented by the first bit,
cursive is represented by the second bit,
underline by the third bit,
strikeout by the fourth bit.
See Also:
FontProperties.FONT_STYLE_BOLD, FontProperties.FONT_STYLE_ITALIC, FontProperties.FONT_STYLE_UNDERLINE, FontProperties.FONT_STYLE_STRIKETHROUGH

setFontStyleFormula

public final void setFontStyleFormula(FormulaField newFormula)
Sets the formula for the property 'font style'. The fontstyle property represents the different styles of a font, which can be cursive, underlined and/or strikeouted.

Specified by:
setFontStyleFormula in interface FontProperties
Parameters:
newFormula - The new formula for the property 'font style'. The result of the formula should be within the range from 0 to 15, where
bold is represented by the first bit,
cursive is represented by the second bit,
underline by the third bit,
strikeout by the fourth bit.

getFontStyleFormula

public FormulaField getFontStyleFormula()
Gets the formula for the property 'font style'. The fontstyle property represents the different styles of a font, which can be cursive, underlined and/or strikeouted.

Specified by:
getFontStyleFormula in interface FontProperties
Returns:
FormulaField The formula for the property 'font style'.

setItalic

public final void setItalic(boolean newValue)
Sets the value of the property 'italic'. Use this property to toggle the fontstyle of a text.

Specified by:
setItalic in interface FontProperties
Parameters:
newValue - true if the property should be set, else false
See Also:
setFontStyleFormula(com.inet.report.FormulaField)

isItalic

public boolean isItalic()
Returns whether the text in this element is italic or not.

Specified by:
isItalic in interface FontProperties
Returns:
true if the text is italic, false otherwise.
Since:
7.0
See Also:
FontProperties.setFontStyle(int)

isUnderline

public boolean isUnderline()
Returns whether the text in this element is underlined or not.

Specified by:
isUnderline in interface FontProperties
Returns:
true if the text is underlined, false otherwise.
Since:
7.0
See Also:
FontProperties.setFontStyle(int)

getUnderlineFormula

public FormulaField getUnderlineFormula()
Returns the formula field for the property 'underline'.

Specified by:
getUnderlineFormula in interface FontProperties
Returns:
the formula field for the property 'underline'.

isStrikeout

public boolean isStrikeout()
Returns whether the text in this element is struck through or not.

Specified by:
isStrikeout in interface FontProperties
Returns:
true if the text is struck through, false otherwise.
Since:
7.0
See Also:
FontProperties.setFontStyle(int)

getStrikeoutFormula

public FormulaField getStrikeoutFormula()
Returns The formula field for the property 'strikeout'.

Specified by:
getStrikeoutFormula in interface FontProperties
Returns:
The formula field for the property 'strikeout'.

setUnderline

public final void setUnderline(boolean newValue)
Sets the value of the property 'underline'. Use this property to underline a text.

Specified by:
setUnderline in interface FontProperties
Parameters:
newValue - true if the property should be set, else false
See Also:
FontProperties.setFontStyle(int)

setUnderlineFormula

public final void setUnderlineFormula(FormulaField newFormula)
Sets the formula field for the property 'underline'.

Specified by:
setUnderlineFormula in interface FontProperties
Parameters:
newFormula - the formula field for the property 'underline'.

setStrikeout

public final void setStrikeout(boolean newValue)
Sets the value of the property 'strikeout'. Use this property to strikeout a text.

Specified by:
setStrikeout in interface FontProperties
Parameters:
newValue - true if the property should be set, else false
See Also:
FontProperties.setFontStyle(int)

setStrikeoutFormula

public final void setStrikeoutFormula(FormulaField newFormula)
Set the formula field for the property 'strikeout'.

Specified by:
setStrikeoutFormula in interface FontProperties
Parameters:
newFormula - The formula field for the property 'strikeout'.

isBold

public boolean isBold()
Returns whether the text in this element is bold or not.

Specified by:
isBold in interface FontProperties
Returns:
true if the text is bold, false otherwise.
Since:
7.0
See Also:
FontProperties.setFontStyle(int)

setBold

public final void setBold(boolean newValue)
Sets the value of the property 'font bold'. Use this property to toggle the fontstyle of a text.

Specified by:
setBold in interface FontProperties
Parameters:
newValue - Whether or not this font element is to be set as bold. Note that this property can be overridden if a property formula is defined.
See Also:
setFontStyleFormula(com.inet.report.FormulaField)

setFontColor

public final void setFontColor(int newValue)
Sets the value of the property 'font color'. Use this property to change the color of the font.

Specified by:
setFontColor in interface FontProperties
Parameters:
newValue - The new value of the property 'font color'.

setFontColorFormula

public final void setFontColorFormula(FormulaField newFormula)
Sets the formula of the property 'font color'. Use this property to change the color of the font.

Specified by:
setFontColorFormula in interface FontProperties
Parameters:
newFormula - The new formula for the property 'font color'.

getFontColor

public int getFontColor()
Gets the value of the property 'font color'. Use this property to change the color of the font.

Specified by:
getFontColor in interface FontProperties
Returns:
The value of the property 'font color'.

getFontColorFormula

public FormulaField getFontColorFormula()
Gets the formula for the property 'font color'. Use this property to change the color of the font.

Specified by:
getFontColorFormula in interface FontProperties
Returns:
FormulaField The formula for the property 'font color'.

setFontSizeTwips

public final void setFontSizeTwips(int newValue)
Sets the value of the property 'font size'.

Specified by:
setFontSizeTwips in interface FontProperties
Parameters:
newValue - The font size in Twips.
Throws:
java.lang.IllegalArgumentException - if newValue is negative

getFontSizeTwips

public int getFontSizeTwips()
Gets the value of the property 'font size' in Twips.

Specified by:
getFontSizeTwips in interface FontProperties
Returns:
The font size in Twips.

getPropertyFormulas

public java.util.List getPropertyFormulas()
Returns a list with all property formulas that are set for this element.

Overrides:
getPropertyFormulas in class Element
Returns:
List of property formulas

parseElement

public NodeParser parseElement(com.inet.report.parser.XMLTag group,
                               java.lang.String tag,
                               org.xml.sax.Attributes atts,
                               java.util.Map parserMap)
                        throws FatalParserException
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. Note that the parsing is highly tolerant, i.e. exceptions are intercepted and suppressed if at all possible.

Specified by:
parseElement in interface NodeParser
Overrides:
parseElement in class Element
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 parsed
atts - The set of attributes in the current XMLTag
parserMap - 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.

i-net Crystal-Clear

Copyright © 1999-2010 by i-net software GmbH