Class JRDesignSection
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBaseSection
-
- net.sf.jasperreports.engine.design.JRDesignSection
-
- All Implemented Interfaces:
Serializable,Cloneable,JRChangeEventsSupport,JRCloneable,JRSection
public class JRDesignSection extends JRBaseSection
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<JRBand>bandsListprotected List<JRPart>partsListstatic StringPROPERTY_BANDSstatic StringPROPERTY_PARTS-
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseSection
bands, parts
-
-
Constructor Summary
Constructors Constructor Description JRDesignSection(JROrigin origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBand(int index, JRBand band)Adds a band to the section.voidaddBand(JRBand band)Adds a band to the section.voidaddPart(int index, JRPart part)Adds a part to the section.voidaddPart(JRPart part)Adds a part to the section.JRBand[]getBands()Returns the bands within the current section.List<JRBand>getBandsList()Gets a list of all bands within the current section.JROrigingetOrigin()Returns the section origin, i.e. its location/role within the report (e.g. detail/title/group header/etc).JRPart[]getParts()Returns the parts within the current section.List<JRPart>getPartsList()Gets a list of all parts within the current section.JRBandremoveBand(int index)Removes a band from the section.JRBandremoveBand(JRBand band)Removes a band from the section.JRPartremovePart(int index)Removes a part from the section.JRPartremovePart(JRPart part)Removes a part from the section.protected voidsetOrigin(JROrigin origin)-
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseSection
clone, getEventSupport
-
-
-
-
Field Detail
-
PROPERTY_BANDS
public static final String PROPERTY_BANDS
- See Also:
- Constant Field Values
-
PROPERTY_PARTS
public static final String PROPERTY_PARTS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JRDesignSection
public JRDesignSection(JROrigin origin)
-
-
Method Detail
-
getOrigin
public JROrigin getOrigin()
Returns the section origin, i.e. its location/role within the report (e.g. detail/title/group header/etc). The location is automatically set when the section is inserted into the report (via one of theJasperDesign.setPageHeader(JRBand)/ methods).- Returns:
- the section origin
-
setOrigin
protected void setOrigin(JROrigin origin)
-
getBands
public JRBand[] getBands()
Description copied from interface:JRSectionReturns the bands within the current section.- Specified by:
getBandsin interfaceJRSection- Overrides:
getBandsin classJRBaseSection
-
getBandsList
public List<JRBand> getBandsList()
Gets a list of all bands within the current section.
-
addBand
public void addBand(JRBand band)
Adds a band to the section.- Parameters:
band- the band to be added
-
addBand
public void addBand(int index, JRBand band)Adds a band to the section.- Parameters:
index- the zero based index of the band to be addedband- the band to be added
-
removeBand
public JRBand removeBand(JRBand band)
Removes a band from the section.- Parameters:
band- the band to be removed- Returns:
- the band to be removed
-
removeBand
public JRBand removeBand(int index)
Removes a band from the section.- Parameters:
index- the index of the band to be removed- Returns:
- the band to be removed
-
getParts
public JRPart[] getParts()
Description copied from interface:JRSectionReturns the parts within the current section.- Specified by:
getPartsin interfaceJRSection- Overrides:
getPartsin classJRBaseSection
-
getPartsList
public List<JRPart> getPartsList()
Gets a list of all parts within the current section.
-
addPart
public void addPart(JRPart part)
Adds a part to the section.- Parameters:
part- the part to be added
-
addPart
public void addPart(int index, JRPart part)Adds a part to the section.- Parameters:
index- the zero based index of the part to be addedpart- the part to be added
-
removePart
public JRPart removePart(JRPart part)
Removes a part from the section.- Parameters:
part- the part to be removed- Returns:
- the part to be removed
-
removePart
public JRPart removePart(int index)
Removes a part from the section.- Parameters:
index- the index of the part to be removed- Returns:
- the part to be removed
-
-