i-net Clear Reports

com.inet.report
Class Line

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

public class Line
extends AbstractLineElement
implements java.lang.Cloneable

With the Line class you can draw a vertical or horizontal line anywhere in your report. You can draw a line in one section only or a line which spans multiple sections. A line differs from a border line in the report. You can place a line anywhere with any length, a border line is always attached to an element, i.e. to a FieldElement or a Text element. The line can span multiple sections, a border line cannot.
You can create a line using the methods Section.addHorizontalLine(int, int, int) and Section.addVerticalLine(int, int, int) in class Section. For vertical lines there are two methods, one adds a vertical line to one section, the other can add a line which spans multiple sections.
If you want to change the color of a line, use the method Element.setForeColor(int) inheritated from Element.

Please note: When the line is rendered, it is drawn from (x1, y1) (included) to (x2, y2) (excluded). This is different from the Java drawLine behavior, which draws both start point and end point of a line.

This class is part of the RDC.

See Also:
Section.addHorizontalLine(int, int, int), Section.addVerticalLine(int, int, int), Section.addVerticalLine(int, int, int, Section), Section.remove(Element), Section.getElements(), Section.getElementsV()

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
 FormulaField getDropShadowFormula()
          Lines do not support drop shadows.
 boolean isDropShadow()
          Lines do not support drop shadows.
 void setDropShadow(boolean newValue)
          Lines can not have drop shadows.
 void setDropShadowFormula(FormulaField newFormula)
          Lines can not have drop shadows.
 void setHyperlinkUrl(java.lang.String url)
          Setting hyperlinks on lines is not possible and will throw an UnsupportedOperationException
 void setHyperlinkUrlFormula(FormulaField newFormula)
          Setting hyperlinks on lines is not possible and will throw an UnsupportedOperationException
 
Methods inherited from class com.inet.report.AbstractLineElement
getBottomLineStyle, getEndSection, getHeight, getLeftLineStyle, getLineStyle, getLineWidth, getRightLineStyle, getTopLineStyle, getWidth, getX2, getY2, isExtendToBottomOfSectionWhenPrinting, isMultiSectionElement, parseElement, parseText, setEndSection, setExtendToBottomOfSectionWhenPrinting, setHeight, setLineStyle, setLineWidth, setWidth, setX2, setY2, spansMultipleSections
 
Methods inherited from class com.inet.report.Element
addListener, copy, copyXML2, getBottomLineStyleFormula, getCanGrowCount, getCanGrowFormula, getCloseBorderOnPageBreakFormula, getEngine, getField, getForeColor, getForeColorFormula, getHorAlign, getHorAlignFormula, getHyperlinkUrl, getHyperlinkUrlFormula, getLeftLineStyleFormula, getParent, getPropertyFormulas, getRightLineStyleFormula, getSuppressIfDuplicatedFormula, getTightHorizontalFormula, getToolTipsText, getToolTipsTextFormula, getTopLineStyleFormula, indexOf, isCanGrow, isCloseBorderOnPageBreak, isSuppressIfDuplicated, isTightHorizontal, paramString, removeListener, setBottomLineStyle, setBottomLineStyleFormula, setCanGrow, setCanGrowCount, setCanGrowFormula, setCloseBorderOnPageBreak, setCloseBorderOnPageBreakFormula, setField, setForeColor, setForeColorFormula, setHorAlign, setHorAlignFormula, 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

isDropShadow

public boolean isDropShadow()
Lines do not support drop shadows.

Specified by:
isDropShadow in interface BorderProperties
Overrides:
isDropShadow in class Element
Returns:
always false
Since:
6.1

getDropShadowFormula

public FormulaField getDropShadowFormula()
Lines do not support drop shadows.

Specified by:
getDropShadowFormula in interface BorderProperties
Overrides:
getDropShadowFormula in class Element
Returns:
always null Element
Since:
6.1

setDropShadow

public void setDropShadow(boolean newValue)
Lines can not have drop shadows. So this method throws an UnsupportedOperationException.

Specified by:
setDropShadow in interface BorderProperties
Overrides:
setDropShadow in class Element
Parameters:
newValue - has no effect
Throws:
java.lang.UnsupportedOperationException - will always be thrown
Since:
6.1

setDropShadowFormula

public void setDropShadowFormula(FormulaField newFormula)
Lines can not have drop shadows. So this method throws an UnsupportedOperationException.

Specified by:
setDropShadowFormula in interface BorderProperties
Overrides:
setDropShadowFormula in class Element
Parameters:
newFormula - has no effect
Throws:
java.lang.UnsupportedOperationException - will always be thrown
Since:
6.1

setHyperlinkUrl

public void setHyperlinkUrl(java.lang.String url)
Setting hyperlinks on lines is not possible and will throw an UnsupportedOperationException

Overrides:
setHyperlinkUrl in class Element
Parameters:
url - not used
Throws:
java.lang.UnsupportedOperationException - always because it is not possible to set hyperlinks on lines
Since:
9.0

setHyperlinkUrlFormula

public void setHyperlinkUrlFormula(FormulaField newFormula)
Setting hyperlinks on lines is not possible and will throw an UnsupportedOperationException

Overrides:
setHyperlinkUrlFormula in class Element
Parameters:
newFormula - not used
Throws:
java.lang.UnsupportedOperationException - always because it is not possible to set hyperlinks on lines
Since:
9.0

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH