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:
  • Field Details

  • Constructor Details

    • JRDesignSection

      public JRDesignSection()
    • JRDesignSection

      public JRDesignSection(JROrigin origin)
  • Method Details

    • 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 the JasperDesign.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 interface JRSection
      Overrides:
      getBands in class JRBaseSection
    • 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 added
      band - 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 interface JRSection
      Overrides:
      getParts in class JRBaseSection
    • 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 added
      part - 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