Package net.sf.jasperreports.engine.base
Class JRBaseLineBox
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseLineBox
-
- All Implemented Interfaces:
Serializable,Cloneable,Deduplicable,JRChangeEventsSupport,JRLineBox,JRPenContainer,JRStyleContainer
public class JRBaseLineBox extends Object implements JRLineBox, Serializable, Cloneable, JRChangeEventsSupport, Deduplicable
This is useful for drawing borders around text elements and images. Boxes can have borders and paddings, which can have different width and colour on each side of the element.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected IntegerbottomPaddingprotected JRBoxPenbottomPenprotected JRBoxContainerboxContainerprotected IntegerleftPaddingprotected JRBoxPenleftPenprotected Integerpaddingprotected JRBoxPenpenstatic StringPROPERTY_BOTTOM_PADDINGstatic StringPROPERTY_LEFT_PADDINGstatic StringPROPERTY_PADDINGstatic StringPROPERTY_RIGHT_PADDINGstatic StringPROPERTY_TOP_PADDINGprotected IntegerrightPaddingprotected JRBoxPenrightPenprotected IntegertopPaddingprotected JRBoxPentopPen
-
Constructor Summary
Constructors Constructor Description JRBaseLineBox(JRBoxContainer boxContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JRLineBoxclone(JRBoxContainer boxContainer)voidcopyBottomPen(JRBoxPen bottomPen)voidcopyLeftPen(JRBoxPen leftPen)voidcopyPen(JRBoxPen pen)voidcopyRightPen(JRBoxPen rightPen)voidcopyTopPen(JRBoxPen topPen)IntegergetBottomPadding()JRBoxPengetBottomPen()Gets the pen properties for the bottom border.JRBoxContainergetBoxContainer()ColorgetDefaultLineColor()FloatgetDefaultLineWidth()JRDefaultStyleProvidergetDefaultStyleProvider()JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.intgetHashCode()Returns a hash code to be used for the deduplicate map.IntegergetLeftPadding()JRBoxPengetLeftPen()Gets the pen properties for the left border.IntegergetOwnBottomPadding()IntegergetOwnLeftPadding()IntegergetOwnPadding()IntegergetOwnRightPadding()IntegergetOwnTopPadding()IntegergetPadding()Gets the default padding in pixels (can be overwritten by individual settings).JRBoxPengetPen()Gets the pen properties for the border.IntegergetRightPadding()JRBoxPengetRightPen()Gets the pen properties for the right border.JRStylegetStyle()Returns this object's style.StringgetStyleNameReference()Returns the name of an external style which is to be used by this object.protected StyleResolvergetStyleResolver()IntegergetTopPadding()JRBoxPengetTopPen()Gets the pen properties for the top border.booleanisIdentical(Object object)Determines if this instance is identical to another object.voidpopulateStyle()voidsetBottomPadding(Integer bottomPadding)voidsetLeftPadding(Integer leftPadding)voidsetPadding(Integer padding)Sets the default padding in pixels (can be overwritten by individual settings).voidsetRightPadding(Integer rightPadding)voidsetTopPadding(Integer topPadding)
-
-
-
Field Detail
-
PROPERTY_PADDING
public static final String PROPERTY_PADDING
- See Also:
- Constant Field Values
-
PROPERTY_TOP_PADDING
public static final String PROPERTY_TOP_PADDING
- See Also:
- Constant Field Values
-
PROPERTY_LEFT_PADDING
public static final String PROPERTY_LEFT_PADDING
- See Also:
- Constant Field Values
-
PROPERTY_BOTTOM_PADDING
public static final String PROPERTY_BOTTOM_PADDING
- See Also:
- Constant Field Values
-
PROPERTY_RIGHT_PADDING
public static final String PROPERTY_RIGHT_PADDING
- See Also:
- Constant Field Values
-
boxContainer
protected JRBoxContainer boxContainer
-
pen
protected JRBoxPen pen
-
topPen
protected JRBoxPen topPen
-
leftPen
protected JRBoxPen leftPen
-
bottomPen
protected JRBoxPen bottomPen
-
rightPen
protected JRBoxPen rightPen
-
padding
protected Integer padding
-
topPadding
protected Integer topPadding
-
leftPadding
protected Integer leftPadding
-
bottomPadding
protected Integer bottomPadding
-
rightPadding
protected Integer rightPadding
-
-
Constructor Detail
-
JRBaseLineBox
public JRBaseLineBox(JRBoxContainer boxContainer)
-
-
Method Detail
-
getDefaultStyleProvider
public JRDefaultStyleProvider getDefaultStyleProvider()
- Specified by:
getDefaultStyleProviderin interfaceJRStyleContainer
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getStyle
public JRStyle getStyle()
Description copied from interface:JRStyleContainerReturns this object's style.- Specified by:
getStylein interfaceJRStyleContainer- Returns:
- this object's style
-
getStyleNameReference
public String getStyleNameReference()
Description copied from interface:JRStyleContainerReturns the name of an external style which is to be used by this object. External styles are defined intemplatesand are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()is specified for this object.- Specified by:
getStyleNameReferencein interfaceJRStyleContainer- Returns:
- the name of an external style
-
getBoxContainer
public JRBoxContainer getBoxContainer()
- Specified by:
getBoxContainerin interfaceJRLineBox
-
getDefaultLineWidth
public Float getDefaultLineWidth()
- Specified by:
getDefaultLineWidthin interfaceJRPenContainer
-
getDefaultLineColor
public Color getDefaultLineColor()
- Specified by:
getDefaultLineColorin interfaceJRPenContainer
-
getPen
public JRBoxPen getPen()
Description copied from interface:JRLineBoxGets the pen properties for the border.
-
getTopPen
public JRBoxPen getTopPen()
Description copied from interface:JRLineBoxGets the pen properties for the top border.
-
copyTopPen
public void copyTopPen(JRBoxPen topPen)
- Specified by:
copyTopPenin interfaceJRLineBox
-
getLeftPen
public JRBoxPen getLeftPen()
Description copied from interface:JRLineBoxGets the pen properties for the left border.- Specified by:
getLeftPenin interfaceJRLineBox
-
copyLeftPen
public void copyLeftPen(JRBoxPen leftPen)
- Specified by:
copyLeftPenin interfaceJRLineBox
-
getBottomPen
public JRBoxPen getBottomPen()
Description copied from interface:JRLineBoxGets the pen properties for the bottom border.- Specified by:
getBottomPenin interfaceJRLineBox
-
copyBottomPen
public void copyBottomPen(JRBoxPen bottomPen)
- Specified by:
copyBottomPenin interfaceJRLineBox
-
getRightPen
public JRBoxPen getRightPen()
Description copied from interface:JRLineBoxGets the pen properties for the right border.- Specified by:
getRightPenin interfaceJRLineBox
-
copyRightPen
public void copyRightPen(JRBoxPen rightPen)
- Specified by:
copyRightPenin interfaceJRLineBox
-
getPadding
public Integer getPadding()
Description copied from interface:JRLineBoxGets the default padding in pixels (can be overwritten by individual settings).- Specified by:
getPaddingin interfaceJRLineBox
-
getOwnPadding
public Integer getOwnPadding()
- Specified by:
getOwnPaddingin interfaceJRLineBox
-
setPadding
public void setPadding(Integer padding)
Description copied from interface:JRLineBoxSets the default padding in pixels (can be overwritten by individual settings).- Specified by:
setPaddingin interfaceJRLineBox
-
getTopPadding
public Integer getTopPadding()
- Specified by:
getTopPaddingin interfaceJRLineBox
-
getOwnTopPadding
public Integer getOwnTopPadding()
- Specified by:
getOwnTopPaddingin interfaceJRLineBox
-
setTopPadding
public void setTopPadding(Integer topPadding)
- Specified by:
setTopPaddingin interfaceJRLineBox
-
getLeftPadding
public Integer getLeftPadding()
- Specified by:
getLeftPaddingin interfaceJRLineBox
-
getOwnLeftPadding
public Integer getOwnLeftPadding()
- Specified by:
getOwnLeftPaddingin interfaceJRLineBox
-
setLeftPadding
public void setLeftPadding(Integer leftPadding)
- Specified by:
setLeftPaddingin interfaceJRLineBox
-
getBottomPadding
public Integer getBottomPadding()
- Specified by:
getBottomPaddingin interfaceJRLineBox
-
getOwnBottomPadding
public Integer getOwnBottomPadding()
- Specified by:
getOwnBottomPaddingin interfaceJRLineBox
-
setBottomPadding
public void setBottomPadding(Integer bottomPadding)
- Specified by:
setBottomPaddingin interfaceJRLineBox
-
getRightPadding
public Integer getRightPadding()
- Specified by:
getRightPaddingin interfaceJRLineBox
-
getOwnRightPadding
public Integer getOwnRightPadding()
- Specified by:
getOwnRightPaddingin interfaceJRLineBox
-
setRightPadding
public void setRightPadding(Integer rightPadding)
- Specified by:
setRightPaddingin interfaceJRLineBox
-
clone
public JRLineBox clone(JRBoxContainer boxContainer)
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
getHashCode
public int getHashCode()
Description copied from interface:DeduplicableReturns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwhDeduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.- Specified by:
getHashCodein interfaceDeduplicable- Returns:
- deduplication hash code
-
isIdentical
public boolean isIdentical(Object object)
Description copied from interface:DeduplicableDetermines if this instance is identical to another object.- Specified by:
isIdenticalin interfaceDeduplicable- Parameters:
object- the object to compare with this instance- Returns:
trueif the two objects are identical and can be deduplicated
-
populateStyle
public void populateStyle()
- Specified by:
populateStylein interfaceJRLineBox
-
-