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 Integer
bottomPadding
protected JRBoxPen
bottomPen
protected JRBoxContainer
boxContainer
protected Integer
leftPadding
protected JRBoxPen
leftPen
protected Integer
padding
protected JRBoxPen
pen
static String
PROPERTY_BOTTOM_PADDING
static String
PROPERTY_LEFT_PADDING
static String
PROPERTY_PADDING
static String
PROPERTY_RIGHT_PADDING
static String
PROPERTY_TOP_PADDING
protected Integer
rightPadding
protected JRBoxPen
rightPen
protected Integer
topPadding
protected JRBoxPen
topPen
-
Constructor Summary
Constructors Constructor Description JRBaseLineBox(JRBoxContainer boxContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JRLineBox
clone(JRBoxContainer boxContainer)
void
copyBottomPen(JRBoxPen bottomPen)
void
copyLeftPen(JRBoxPen leftPen)
void
copyPen(JRBoxPen pen)
void
copyRightPen(JRBoxPen rightPen)
void
copyTopPen(JRBoxPen topPen)
Integer
getBottomPadding()
JRBoxPen
getBottomPen()
Gets the pen properties for the bottom border.JRBoxContainer
getBoxContainer()
Color
getDefaultLineColor()
Float
getDefaultLineWidth()
JRDefaultStyleProvider
getDefaultStyleProvider()
JRPropertyChangeSupport
getEventSupport()
Returns the property change support object for this instance.int
getHashCode()
Returns a hash code to be used for the deduplicate map.Integer
getLeftPadding()
JRBoxPen
getLeftPen()
Gets the pen properties for the left border.Integer
getOwnBottomPadding()
Integer
getOwnLeftPadding()
Integer
getOwnPadding()
Integer
getOwnRightPadding()
Integer
getOwnTopPadding()
Integer
getPadding()
Gets the default padding in pixels (can be overwritten by individual settings).JRBoxPen
getPen()
Gets the pen properties for the border.Integer
getRightPadding()
JRBoxPen
getRightPen()
Gets the pen properties for the right border.JRStyle
getStyle()
Returns this object's style.String
getStyleNameReference()
Returns the name of an external style which is to be used by this object.protected StyleResolver
getStyleResolver()
Integer
getTopPadding()
JRBoxPen
getTopPen()
Gets the pen properties for the top border.boolean
isIdentical(Object object)
Determines if this instance is identical to another object.void
populateStyle()
void
setBottomPadding(Integer bottomPadding)
void
setLeftPadding(Integer leftPadding)
void
setPadding(Integer padding)
Sets the default padding in pixels (can be overwritten by individual settings).void
setRightPadding(Integer rightPadding)
void
setTopPadding(Integer topPadding)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getStyleName
-
-
-
-
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:
getDefaultStyleProvider
in interfaceJRStyleContainer
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getStyle
public JRStyle getStyle()
Description copied from interface:JRStyleContainer
Returns this object's style.- Specified by:
getStyle
in interfaceJRStyleContainer
- Returns:
- this object's style
-
getStyleNameReference
public String getStyleNameReference()
Description copied from interface:JRStyleContainer
Returns the name of an external style which is to be used by this object. External styles are defined intemplates
and are resolved at fill time. This attribute is only effective if no direct style (as returned bygetStyle()
is specified for this object.- Specified by:
getStyleNameReference
in interfaceJRStyleContainer
- Returns:
- the name of an external style
-
getBoxContainer
public JRBoxContainer getBoxContainer()
- Specified by:
getBoxContainer
in interfaceJRLineBox
-
getDefaultLineWidth
public Float getDefaultLineWidth()
- Specified by:
getDefaultLineWidth
in interfaceJRPenContainer
-
getDefaultLineColor
public Color getDefaultLineColor()
- Specified by:
getDefaultLineColor
in interfaceJRPenContainer
-
getPen
public JRBoxPen getPen()
Description copied from interface:JRLineBox
Gets the pen properties for the border.
-
getTopPen
public JRBoxPen getTopPen()
Description copied from interface:JRLineBox
Gets the pen properties for the top border.
-
copyTopPen
public void copyTopPen(JRBoxPen topPen)
- Specified by:
copyTopPen
in interfaceJRLineBox
-
getLeftPen
public JRBoxPen getLeftPen()
Description copied from interface:JRLineBox
Gets the pen properties for the left border.- Specified by:
getLeftPen
in interfaceJRLineBox
-
copyLeftPen
public void copyLeftPen(JRBoxPen leftPen)
- Specified by:
copyLeftPen
in interfaceJRLineBox
-
getBottomPen
public JRBoxPen getBottomPen()
Description copied from interface:JRLineBox
Gets the pen properties for the bottom border.- Specified by:
getBottomPen
in interfaceJRLineBox
-
copyBottomPen
public void copyBottomPen(JRBoxPen bottomPen)
- Specified by:
copyBottomPen
in interfaceJRLineBox
-
getRightPen
public JRBoxPen getRightPen()
Description copied from interface:JRLineBox
Gets the pen properties for the right border.- Specified by:
getRightPen
in interfaceJRLineBox
-
copyRightPen
public void copyRightPen(JRBoxPen rightPen)
- Specified by:
copyRightPen
in interfaceJRLineBox
-
getPadding
public Integer getPadding()
Description copied from interface:JRLineBox
Gets the default padding in pixels (can be overwritten by individual settings).- Specified by:
getPadding
in interfaceJRLineBox
-
getOwnPadding
public Integer getOwnPadding()
- Specified by:
getOwnPadding
in interfaceJRLineBox
-
setPadding
public void setPadding(Integer padding)
Description copied from interface:JRLineBox
Sets the default padding in pixels (can be overwritten by individual settings).- Specified by:
setPadding
in interfaceJRLineBox
-
getTopPadding
public Integer getTopPadding()
- Specified by:
getTopPadding
in interfaceJRLineBox
-
getOwnTopPadding
public Integer getOwnTopPadding()
- Specified by:
getOwnTopPadding
in interfaceJRLineBox
-
setTopPadding
public void setTopPadding(Integer topPadding)
- Specified by:
setTopPadding
in interfaceJRLineBox
-
getLeftPadding
public Integer getLeftPadding()
- Specified by:
getLeftPadding
in interfaceJRLineBox
-
getOwnLeftPadding
public Integer getOwnLeftPadding()
- Specified by:
getOwnLeftPadding
in interfaceJRLineBox
-
setLeftPadding
public void setLeftPadding(Integer leftPadding)
- Specified by:
setLeftPadding
in interfaceJRLineBox
-
getBottomPadding
public Integer getBottomPadding()
- Specified by:
getBottomPadding
in interfaceJRLineBox
-
getOwnBottomPadding
public Integer getOwnBottomPadding()
- Specified by:
getOwnBottomPadding
in interfaceJRLineBox
-
setBottomPadding
public void setBottomPadding(Integer bottomPadding)
- Specified by:
setBottomPadding
in interfaceJRLineBox
-
getRightPadding
public Integer getRightPadding()
- Specified by:
getRightPadding
in interfaceJRLineBox
-
getOwnRightPadding
public Integer getOwnRightPadding()
- Specified by:
getOwnRightPadding
in interfaceJRLineBox
-
setRightPadding
public void setRightPadding(Integer rightPadding)
- Specified by:
setRightPadding
in interfaceJRLineBox
-
clone
public JRLineBox clone(JRBoxContainer boxContainer)
-
getEventSupport
public JRPropertyChangeSupport getEventSupport()
Description copied from interface:JRChangeEventsSupport
Returns the property change support object for this instance.- Specified by:
getEventSupport
in interfaceJRChangeEventsSupport
- Returns:
- the property change support object for this instance
-
getHashCode
public int getHashCode()
Description copied from interface:Deduplicable
Returns 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:
getHashCode
in interfaceDeduplicable
- Returns:
- deduplication hash code
-
isIdentical
public boolean isIdentical(Object object)
Description copied from interface:Deduplicable
Determines if this instance is identical to another object.- Specified by:
isIdentical
in interfaceDeduplicable
- Parameters:
object
- the object to compare with this instance- Returns:
true
if the two objects are identical and can be deduplicated
-
populateStyle
public void populateStyle()
- Specified by:
populateStyle
in interfaceJRLineBox
-
-