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>
bandsList
protected List<JRPart>
partsList
static String
PROPERTY_BANDS
static String
PROPERTY_PARTS
-
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseSection
bands, parts
-
-
Constructor Summary
Constructors Constructor Description JRDesignSection()
JRDesignSection(JROrigin origin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBand(int index, JRBand band)
Adds a band to the section.void
addBand(JRBand band)
Adds a band to the section.void
addPart(int index, JRPart part)
Adds a part to the section.void
addPart(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.JROrigin
getOrigin()
Returns the section origin, i.e.JRPart[]
getParts()
Returns the parts within the current section.List<JRPart>
getPartsList()
Gets a list of all parts within the current section.JRBand
removeBand(int index)
Removes a band from the section.JRBand
removeBand(JRBand band)
Removes a band from the section.JRPart
removePart(int index)
Removes a part from the section.JRPart
removePart(JRPart part)
Removes a part from the section.protected void
setOrigin(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()
-
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:JRSection
Returns the bands within the current section.- Specified by:
getBands
in interfaceJRSection
- Overrides:
getBands
in 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:JRSection
Returns the parts within the current section.- Specified by:
getParts
in interfaceJRSection
- Overrides:
getParts
in 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
-
-