i-net Clear Reports

com.inet.report
Class AbstractLineElement

java.lang.Object
  extended by com.inet.report.ReportComponent
      extended by com.inet.report.Element
          extended by com.inet.report.AbstractLineElement
All Implemented Interfaces:
BorderProperties, GeneralProperties, LineProperties, NodeParser, com.inet.report.ReferenceHolder, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Box, Line

public abstract class AbstractLineElement
extends Element
implements LineProperties

This class is an abstract implementation of the interface LineProperties.

Since:
6.0
See Also:
AbstractLineElement.LineProperties, 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.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 getBottomLineStyle()
          Return the same as getLineStyle()
 Section getEndSection()
          Returns the value of the property 'end section'.
 int getHeight()
          Returns the height of an element.
 int getLeftLineStyle()
          Return the same as getLineStyle()
 int getLineStyle()
          Returns the value of the property 'line style', with one of the following line styles: single line, double line, dashed line, dotted line or no line.
 int getLineWidth()
          Returns the value of the property 'line width'.
 int getRightLineStyle()
          Return the same as getLineStyle()
 int getTopLineStyle()
          Return the same as getLineStyle()
 int getWidth()
          Returns the width of an element.
 int getX2()
          Returns the x position of the element in the end section, if the element does not end in the same section as it begins.
 int getY2()
          Returns the x position of the element in the end section, if the element does not end in the same section as it begins.
 boolean isExtendToBottomOfSectionWhenPrinting()
          Gets the value of the property 'extend to bottom of section when printing'.
 boolean isMultiSectionElement()
          Return true, if this element span over more than one section
 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 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 setEndSection(Section newValue)
          Sets the value of the property 'end section'.
 void setExtendToBottomOfSectionWhenPrinting(boolean newValue)
          Sets the value of the property 'extend to bottom of section when printing'.
 void setHeight(int h)
          Sets the height of an element.
 void setLineStyle(int lineStyle)
          Sets the value of the property 'line style' with one of the different line styles single line, double line, dashed line, dotted line or no line.
 void setLineWidth(int newValue)
          Sets the value of the property 'line width'.
 void setWidth(int w)
          Sets the width of an element.
 void setX2(int x2)
          Sets the x position of the element in the end section, if the element does not end in the same section as it begins.
 void setY2(int y2)
          Sets the y position of the element in the end section, if the element does not end in the same section as it begins.
 boolean spansMultipleSections()
          Returns whether this element spans multiple sections or not.
 
Methods inherited from class com.inet.report.Element
addListener, copy, copyXML2, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getDropShadowFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyleFormula, getParent, getPropertyFormulas, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isDropShadow, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setDropShadow, setDropShadowFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, 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, getKeepTogetherFormula, getSuppressFormula, getType, getX, getY, isKeepTogether, isSuppress, setBackColor, setBackColorFormula, setKeepTogether, setKeepTogetherFormula, setSuppress, setSuppressFormula, setX, setY
 
Methods inherited from interface com.inet.report.LineProperties
getForeColor, getSuppressFormula, getX, getY, isSuppress, setForeColor, setSuppress, setSuppressFormula, 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

setExtendToBottomOfSectionWhenPrinting

public final void setExtendToBottomOfSectionWhenPrinting(boolean newValue)
Sets the value of the property 'extend to bottom of section when printing'. Use this property if you want to extend the line/box to the bottom of section.

Specified by:
setExtendToBottomOfSectionWhenPrinting in interface LineProperties
Parameters:
newValue - true if the property should be set, else false.

isExtendToBottomOfSectionWhenPrinting

public boolean isExtendToBottomOfSectionWhenPrinting()
Gets the value of the property 'extend to bottom of section when printing'. If this property is true, the vertical line will extend up to the end of the section when printing.

Specified by:
isExtendToBottomOfSectionWhenPrinting in interface LineProperties
Returns:
true if the line will be extended, otherwise false.
Since:
7.0

setLineWidth

public final void setLineWidth(int newValue)
Sets the value of the property 'line width'. With this property you can specify the width of the line of the line/box.

Specified by:
setLineWidth in interface LineProperties
Parameters:
newValue - The new value of the property 'line width'.

getLineWidth

public final int getLineWidth()
Returns the value of the property 'line width'. With this property you can specify the width of the line of the line/box.

Specified by:
getLineWidth in interface LineProperties
Returns:
The current value of the property 'line width'.

setLineStyle

public void setLineStyle(int lineStyle)
Sets the value of the property 'line style' with one of the different line styles single line, double line, dashed line, dotted line or no line. If you have chosen one of the first 4 values, it inserts a line with the given style.

Specified by:
setLineStyle in interface LineProperties
Parameters:
lineStyle - The new value of the property 'line style'.
Throws:
java.lang.IllegalArgumentException - if newValue is a invalid line style
See Also:
BorderProperties.NO_LINE, BorderProperties.LINE_STYLE_SINGLE, BorderProperties.LINE_STYLE_DOUBLE, BorderProperties.LINE_STYLE_DASHED, BorderProperties.LINE_STYLE_DOTTED

getLineStyle

public final int getLineStyle()
Returns the value of the property 'line style', with one of the following line styles: single line, double line, dashed line, dotted line or no line.

Specified by:
getLineStyle in interface LineProperties
Returns:
The current value of the property 'line style'.
See Also:
BorderProperties.NO_LINE, BorderProperties.LINE_STYLE_SINGLE, BorderProperties.LINE_STYLE_DOUBLE, BorderProperties.LINE_STYLE_DASHED, BorderProperties.LINE_STYLE_DOTTED

getLeftLineStyle

public final int getLeftLineStyle()
Return the same as getLineStyle()

Specified by:
getLeftLineStyle in interface BorderProperties
Overrides:
getLeftLineStyle in class Element
Returns:
The current value of the property 'line style'.
Since:
10.0
See Also:
BorderProperties.NO_LINE, BorderProperties.LINE_STYLE_SINGLE, BorderProperties.LINE_STYLE_DOUBLE, BorderProperties.LINE_STYLE_DASHED, BorderProperties.LINE_STYLE_DOTTED

getTopLineStyle

public final int getTopLineStyle()
Return the same as getLineStyle()

Specified by:
getTopLineStyle in interface BorderProperties
Overrides:
getTopLineStyle in class Element
Returns:
The current value of the property 'line style'.
Since:
10.0
See Also:
BorderProperties.NO_LINE, BorderProperties.LINE_STYLE_SINGLE, BorderProperties.LINE_STYLE_DOUBLE, BorderProperties.LINE_STYLE_DASHED, BorderProperties.LINE_STYLE_DOTTED

getRightLineStyle

public final int getRightLineStyle()
Return the same as getLineStyle()

Specified by:
getRightLineStyle in interface BorderProperties
Overrides:
getRightLineStyle in class Element
Returns:
The current value of the property 'line style'.
Since:
10.0
See Also:
BorderProperties.NO_LINE, BorderProperties.LINE_STYLE_SINGLE, BorderProperties.LINE_STYLE_DOUBLE, BorderProperties.LINE_STYLE_DASHED, BorderProperties.LINE_STYLE_DOTTED

getBottomLineStyle

public final int getBottomLineStyle()
Return the same as getLineStyle()

Specified by:
getBottomLineStyle in interface BorderProperties
Overrides:
getBottomLineStyle in class Element
Returns:
The current value of the property 'line style'.
Since:
10.0
See Also:
BorderProperties.NO_LINE, BorderProperties.LINE_STYLE_SINGLE, BorderProperties.LINE_STYLE_DOUBLE, BorderProperties.LINE_STYLE_DASHED, BorderProperties.LINE_STYLE_DOTTED

setX2

public final void setX2(int x2)
Sets the x position of the element in the end section, if the element does not end in the same section as it begins. The unit is in twips.

Specified by:
setX2 in interface LineProperties
Parameters:
x2 - The x position in twips.
Throws:
java.lang.IllegalArgumentException - if x2 is negative

getX2

public final int getX2()
Returns the x position of the element in the end section, if the element does not end in the same section as it begins. The unit is in twips.

Specified by:
getX2 in interface LineProperties
Returns:
The x position in the end section in twips.

setY2

public final void setY2(int y2)
Sets the y position of the element in the end section, if the element does not end in the same section as it begins.

Specified by:
setY2 in interface LineProperties
Parameters:
y2 - The y position in twips.
Throws:
java.lang.IllegalArgumentException - if y2 is negative

getY2

public final int getY2()
Returns the x position of the element in the end section, if the element does not end in the same section as it begins.

Specified by:
getY2 in interface LineProperties
Returns:
The x position in the end section in twips.

getEndSection

public Section getEndSection()
Returns the value of the property 'end section'. When the line should span some sections, you have to specify the end-section of the line.

Specified by:
getEndSection in interface LineProperties
Returns:
The section in that the line ends if the line goes across more than one section.

setEndSection

public void setEndSection(Section newValue)
Sets the value of the property 'end section'. When the line should span some sections, you have to specify the end-section of the line.

Specified by:
setEndSection in interface LineProperties
Parameters:
newValue - The section in that the line should ends, if the line should go accross more than one section.

getWidth

public final int getWidth()
Returns the width of an element. Use the 'element width' property to change the width of the element. The unit is in twips.

Specified by:
getWidth in interface LineProperties
Overrides:
getWidth in class ReportComponent
Returns:
The width in twips.

getHeight

public final int getHeight()
Returns the height of an element. Use the 'element height' property to change the width of the element. The unit is in twips.

Specified by:
getHeight in interface LineProperties
Overrides:
getHeight in class ReportComponent
Returns:
The width in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections

setWidth

public final void setWidth(int w)
Sets the width of an element. Use the 'element width' property to change the width of the element. The unit is in twips.

Specified by:
setWidth in interface LineProperties
Overrides:
setWidth in class ReportComponent
Parameters:
w - The width in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections
java.lang.IllegalArgumentException - if w is negative

setHeight

public final void setHeight(int h)
Sets the height of an element. Use the 'element height' property to change the width of the element. The unit is in twips.

Specified by:
setHeight in interface LineProperties
Overrides:
setHeight in class ReportComponent
Parameters:
h - The width in twips.
Throws:
java.lang.UnsupportedOperationException - if this element spans multiple sections
java.lang.IllegalArgumentException - if h is negative

spansMultipleSections

public final boolean spansMultipleSections()
Returns whether this element spans multiple sections or not.
Line and Box are the only elements which can span multiple section. If this method returns true the end section can be identified by calling getEndSection().

Returns:
True if this elements spans multiple sections, false otherwise.
Since:
7.1

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 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
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.

parseText

public 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. (Examples would be a formula's text or a text element's text)

Specified by:
parseText in interface NodeParser
Parameters:
text - text encountered and to be stored
parserMap - The map of current Parser.

isMultiSectionElement

public boolean isMultiSectionElement()
Return true, if this element span over more than one section

Returns:
true, if this element span over more than one section
Since:
11.1

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH