net.sf.jasperreports.engine.fill

## Class JRTemplatePrintFrame

- java.lang.Object
- - net.sf.jasperreports.engine.fill.JRTemplatePrintElement
  - - net.sf.jasperreports.engine.fill.JRTemplatePrintFrame

- All Implemented Interfaces:
    java.io.Serializable, JRBoxContainer, JRCommonElement, JRIdentifiable, JRPrintElement, JRPrintElementContainer, JRPrintFrame, JRPropertiesHolder, JRStyleContainer, VirtualizationSerializable

      public class JRTemplatePrintFrame
      extends JRTemplatePrintElement
      implements JRPrintFrame, JRPrintElementContainer

  Implementation of `JRPrintFrame` that uses `template frames` to store common attributes.
  Version:
    $Id: JRTemplatePrintFrame.java 6770 2013-11-22 14:48:55Z lucianc $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement

      `template`

    - ### Fields inherited from interface net.sf.jasperreports.engine.JRPrintElement

      `UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRTemplatePrintFrame()`
    `JRTemplatePrintFrame(JRTemplateFrame templateFrame)` Deprecated. provide a source Id via `JRTemplatePrintFrame(JRTemplateFrame, int)`
    `JRTemplatePrintFrame(JRTemplateFrame templateFrame, int sourceElementId)` Deprecated. replaced by `JRTemplatePrintFrame(JRTemplateFrame, PrintElementOriginator)`
    `JRTemplatePrintFrame(JRTemplateFrame templateFrame, PrintElementOriginator originator)` Creates a print frame element.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> void` | `accept(PrintElementVisitor<T> visitor, T arg)` Accepts a print element visitor.
    `void` | `addElement(JRPrintElement element)` Adds an element to the container.
    `void` | `addElements(java.util.Collection<? extends JRPrintElement> elements)`
    `java.awt.Color` | `getDefaultLineColor()`
    `java.util.List<JRPrintElement>` | `getElements()` Returns the list of print elements contained in the frame.
    `JRLineBox` | `getLineBox()`
    `void` | `readVirtualized(VirtualizationInput in)`
    `void` | `writeVirtualized(VirtualizationOutput out)`

    - ### Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement

      `getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getModeValue, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getTemplate, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setMode, setSourceElementId, setStyle, setTemplate, setUUID, setWidth, setX, setY, updateElementTemplate`

    - ### 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.JRPrintElement

      `getHeight, getKey, getOrigin, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, setWidth, setX, setY`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement

      `getBackcolor, getForecolor, getModeValue, getOwnBackcolor, getOwnForecolor, getOwnModeValue, setBackcolor, setForecolor, setMode`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer

      `getDefaultStyleProvider, getStyle, getStyleNameReference`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder

      `getParentProperties, getPropertiesMap, hasProperties`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable

      `getUUID`

    - ### Methods inherited from interface net.sf.jasperreports.engine.JRPrintElementContainer

      `getHeight, setHeight`

- - ### Constructor Detail

    - #### JRTemplatePrintFrame

          public JRTemplatePrintFrame()

    - #### JRTemplatePrintFrame

          public JRTemplatePrintFrame(JRTemplateFrame templateFrame)

      Deprecated. provide a source Id via `JRTemplatePrintFrame(JRTemplateFrame, int)`
      Creates a print frame element.
      Parameters:
        `templateFrame` - the template frame that the element will use

    - #### JRTemplatePrintFrame

          public JRTemplatePrintFrame(JRTemplateFrame templateFrame,
                              int sourceElementId)

      Deprecated. replaced by `JRTemplatePrintFrame(JRTemplateFrame, PrintElementOriginator)`
      Creates a print frame element.
      Parameters:
        `templateFrame` - the template frame that the element will use
        `sourceElementId` - the Id of the source element

    - #### JRTemplatePrintFrame

          public JRTemplatePrintFrame(JRTemplateFrame templateFrame,
                              PrintElementOriginator originator)

      Creates a print frame element.
      Parameters:
        `templateFrame` - the template frame that the element will use
        `originator` -

  - ### Method Detail

    - #### getElements

          public java.util.List<JRPrintElement> getElements()

      Description copied from interface: `JRPrintFrame`
      Returns the list of print elements contained in the frame.
      Specified by:
        `getElements` in interface `JRPrintElementContainer`
      Specified by:
        `getElements` in interface `JRPrintFrame`
      Returns:
        the list of sub print elements

    - #### addElement

          public void addElement(JRPrintElement element)

      Description copied from interface: `JRPrintElementContainer`
      Adds an element to the container.
      Specified by:
        `addElement` in interface `JRPrintElementContainer`
      Parameters:
        `element` - the element to add

    - #### addElements

          public void addElements(java.util.Collection<? extends JRPrintElement> elements)

    - #### getLineBox

          public JRLineBox getLineBox()

      Specified by:
        `getLineBox` in interface `JRBoxContainer`

    - #### getDefaultLineColor

          public java.awt.Color getDefaultLineColor()

      Specified by:
        `getDefaultLineColor` in interface `JRBoxContainer`
      Overrides:
        `getDefaultLineColor` in class `JRTemplatePrintElement`

    - #### accept

          public <T> void accept(PrintElementVisitor<T> visitor,
                        T arg)

      Description copied from interface: `JRPrintElement`
      Accepts a print element visitor.

      The element calls the method that corresponds to the element type on the visitor.

      Specified by:
        `accept` in interface `JRPrintElement`
      Overrides:
        `accept` in class `JRTemplatePrintElement`
      Type Parameters:
        `T` - the type of the argument passed to the visit operation
      Parameters:
        `visitor` - the visitor objects
        `arg` - the argument passed to the visit operation

    - #### writeVirtualized

          public void writeVirtualized(VirtualizationOutput out)
                                throws java.io.IOException

      Specified by:
        `writeVirtualized` in interface `VirtualizationSerializable`
      Overrides:
        `writeVirtualized` in class `JRTemplatePrintElement`
      Throws:
        `java.io.IOException`

    - #### readVirtualized

          public void readVirtualized(VirtualizationInput in)
                               throws java.io.IOException

      Specified by:
        `readVirtualized` in interface `VirtualizationSerializable`
      Overrides:
        `readVirtualized` in class `JRTemplatePrintElement`
      Throws:
        `java.io.IOException`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com