net.sf.jasperreports.engine.design

## Class JRDesignSection

- java.lang.Object
- - net.sf.jasperreports.engine.base.JRBaseSection
  - - net.sf.jasperreports.engine.design.JRDesignSection

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, JRChangeEventsSupport, JRCloneable, JRSection

      public class JRDesignSection
      extends JRBaseSection

  Version:
    $Id: JRDesignSection.java 5878 2013-01-07 20:23:13Z teodord $
  Author:
    Teodor Danciu (teodord@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.List<JRBand>` | `bandsList`
    `static java.lang.String` | `PROPERTY_BANDS`

    - ### Fields inherited from class net.sf.jasperreports.engine.base.JRBaseSection

      `bands`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRDesignSection(JROrigin origin)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBand(int index, JRBand band)` Adds a band to the section.
    `void` | `addBand(JRBand band)` Adds a band to the section.
    `JRBand[]` | `getBands()` Returns the bands within the current section.
    `java.util.List<JRBand>` | `getBandsList()` Gets a list of all bands within the current section.
    `JROrigin` | `getOrigin()` Returns the section origin, i.e. its location/role within the report (e.g. detail/title/group header/etc).
    `JRBand` | `removeBand(int index)` Removes a band from the section.
    `JRBand` | `removeBand(JRBand band)` Removes a band from the section.
    `protected void` | `setOrigin(JROrigin origin)`

    - ### Methods inherited from class net.sf.jasperreports.engine.base.JRBaseSection

      `clone, getEventSupport`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PROPERTY_BANDS

          public static final java.lang.String PROPERTY_BANDS

      See Also:
        Constant Field Values

    - #### bandsList

          protected java.util.List<JRBand> bandsList

  - ### 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 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 java.util.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

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com