net.sf.jasperreports.engine.fill
Class JRTemplateRectangle

java.lang.Object
  extended by net.sf.jasperreports.engine.fill.JRTemplateElement
      extended by net.sf.jasperreports.engine.fill.JRTemplateGraphicElement
          extended by net.sf.jasperreports.engine.fill.JRTemplateRectangle
All Implemented Interfaces:
java.io.Serializable, Deduplicable, JRCommonElement, JRCommonGraphicElement, JRCommonRectangle, JRIdentifiable, JRPenContainer, JRPropertiesHolder, JRStyleContainer

public class JRTemplateRectangle
extends JRTemplateGraphicElement
implements JRCommonRectangle

Rectangle information shared by multiple print rectangle objects.

Version:
$Id: JRTemplateRectangle.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
JRTemplatePrintRectangle, Serialized Form

Field Summary
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplateGraphicElement
linePen
 
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplateElement
defaultStyleProvider, origin, parentStyle
 
Constructor Summary
  JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider)
          Creates a template rectangle.
protected JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRRectangle rectangle)
           
protected JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRSubreport subreport)
           
 
Method Summary
 int getHashCode()
          Returns a hash code to be used for the deduplicate map.
 java.lang.Integer getOwnRadius()
           
 int getRadius()
          Indicates the corner radius for rectangles with round corners.
 boolean isIdentical(java.lang.Object object)
          Determines if this instance is identical to another object.
 void setRadius(int radius)
          Sets the corner radius for rectangles with round corners.
 void setRadius(java.lang.Integer radius)
           
protected  void setRectangle(JRRectangle rectangle)
           
protected  void setSubreport(JRSubreport subreport)
           
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplateGraphicElement
addGraphicHash, copyLinePen, getDefaultLineColor, getDefaultLineWidth, getFillValue, getLinePen, getOwnFillValue, graphicIdentical, setFill, setGraphicElement
 
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplateElement
addTemplateHash, getBackcolor, getBaseStyle, getDefaultStyleProvider, getForecolor, getHeight, getId, getKey, getModeValue, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPropertiesMap, getStyle, getStyleNameReference, getUUID, getWidth, hasProperties, setBackcolor, setElement, setForecolor, setKey, setMode, setStyle, templateIdentical
 
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
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getKey, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 

Constructor Detail

JRTemplateRectangle

protected JRTemplateRectangle(JROrigin origin,
                              JRDefaultStyleProvider defaultStyleProvider,
                              JRRectangle rectangle)

JRTemplateRectangle

protected JRTemplateRectangle(JROrigin origin,
                              JRDefaultStyleProvider defaultStyleProvider,
                              JRSubreport subreport)

JRTemplateRectangle

public JRTemplateRectangle(JROrigin origin,
                           JRDefaultStyleProvider defaultStyleProvider)
Creates a template rectangle.

Parameters:
origin - the origin of the elements that will use this template
defaultStyleProvider - the default style provider to use for this template
Method Detail

setRectangle

protected void setRectangle(JRRectangle rectangle)

setSubreport

protected void setSubreport(JRSubreport subreport)

getRadius

public int getRadius()
Description copied from interface: JRCommonRectangle
Indicates the corner radius for rectangles with round corners. The default is 0.

Specified by:
getRadius in interface JRCommonRectangle

getOwnRadius

public java.lang.Integer getOwnRadius()
Specified by:
getOwnRadius in interface JRCommonRectangle

setRadius

public void setRadius(int radius)
Description copied from interface: JRCommonRectangle
Sets the corner radius for rectangles with round corners.

Specified by:
setRadius in interface JRCommonRectangle

setRadius

public void setRadius(java.lang.Integer radius)
Specified by:
setRadius in interface JRCommonRectangle

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 wiwh Deduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.

Specified by:
getHashCode in interface Deduplicable
Returns:
deduplication hash code

isIdentical

public boolean isIdentical(java.lang.Object object)
Description copied from interface: Deduplicable
Determines if this instance is identical to another object.

Specified by:
isIdentical in interface Deduplicable
Parameters:
object - the object to compare with this instance
Returns:
true if the two objects are identical and can be deduplicated


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com