Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.fill
Class JRTemplateElement

    java.lang.Object
      net.sf.jasperreports.engine.fill.JRTemplateElement

All Implemented Interfaces:
  java.io.Serializable, JRCommonElement, JRPropertiesHolder, JRStyleContainer

Direct Known Subclasses:
  JRTemplateFrame, JRTemplateGenericElement, JRTemplateGraphicElement, JRTemplateText, JRVirtualPrintPage.JRIdHolderTemplateElement

    public abstract class JRTemplateElement

extends java.lang.Object
implements JRCommonElement, java.io.Serializable, JRPropertiesHolder

Base class consisting of print element information shared by multiple print elements.

Version:
  $Id: JRTemplateElement.java 3939 2010-08-20 09:52:00Z teodord $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)
See Also:
  Serialized Form

Field Summary
`protected JRDefaultStyleProvider` | `defaultStyleProvider`
`protected JROrigin` | `origin`
`protected JRStyle` | `parentStyle`

Constructor Summary
`protected` | `JRTemplateElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider)`
`protected` | `JRTemplateElement(JROrigin origin, JRElement element)`
`protected` | `JRTemplateElement(java.lang.String id)`

Method Summary
`java.awt.Color` | `getBackcolor()`
`protected JRStyle` | `getBaseStyle()`
`JRDefaultStyleProvider` | `getDefaultStyleProvider()`
`java.awt.Color` | `getForecolor()`
`int` | `getHeight()`
`java.lang.String` | `getId()`
`java.lang.String` | `getKey()` Returns the string value that uniquely identifies the element.
`byte` | `getMode()` Deprecated. Replaced by `getModeValue()`.
`ModeEnum` | `getModeValue()` Returns the element transparency mode.
`JROrigin` | `getOrigin()`
`java.awt.Color` | `getOwnBackcolor()`
`java.awt.Color` | `getOwnForecolor()`
`java.lang.Byte` | `getOwnMode()` Deprecated. Replaced by `getOwnModeValue()`.
`ModeEnum` | `getOwnModeValue()`
`JRPropertiesHolder` | `getParentProperties()` Returns the parent properties holder, whose properties are used as defaults for this object.
`JRPropertiesMap` | `getPropertiesMap()` Returns this object's properties map.
`JRStyle` | `getStyle()` Returns this object's style.
`java.lang.String` | `getStyleNameReference()` Returns null as external style references are not allowed for print objects.
`int` | `getWidth()`
`boolean` | `hasProperties()` Checks whether the object has any properties.
`void` | `setBackcolor(java.awt.Color backcolor)`
`void` | `setElement(JRElement element)` Copies basic element attributes: the element style, key, mode, forecolor and backcolor.
`void` | `setForecolor(java.awt.Color forecolor)`
`void` | `setKey(java.lang.String key)`
`void` | `setMode(byte mode)` Deprecated. Replaced by `setMode(ModeEnum)`.
`void` | `setMode(java.lang.Byte mode)` Deprecated. Replaced by `setMode(ModeEnum)`.
`void` | `setMode(ModeEnum modeValue)` Sets the element transparency mode.
`void` | `setStyle(JRStyle style)` Sets the template element style.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### origin

    protected JROrigin origin

### defaultStyleProvider

    protected JRDefaultStyleProvider defaultStyleProvider

### parentStyle

    protected JRStyle parentStyle

Constructor Detail

### JRTemplateElement

    protected JRTemplateElement(JROrigin origin,
                                JRDefaultStyleProvider defaultStyleProvider)

### JRTemplateElement

    protected JRTemplateElement(JROrigin origin,
                                JRElement element)

### JRTemplateElement

    protected JRTemplateElement(java.lang.String id)

Method Detail

### setElement

    public void setElement(JRElement element)

  Copies basic element attributes: the element style, key, mode, forecolor and backcolor.

  Parameters:
    `element` - the element to copy attributes from

### getOrigin

    public JROrigin getOrigin()

### getDefaultStyleProvider

    public JRDefaultStyleProvider getDefaultStyleProvider()

  Specified by:
    `getDefaultStyleProvider` in interface `JRStyleContainer`

### getStyle

    public JRStyle getStyle()

  Description copied from interface: `JRStyleContainer`
  Returns this object's style.

  Specified by:
    `getStyle` in interface `JRStyleContainer`
  Returns:
    this object's style

### getBaseStyle

    protected JRStyle getBaseStyle()

### getWidth

    public int getWidth()

  Specified by:
    `getWidth` in interface `JRCommonElement`

### getHeight

    public int getHeight()

  Specified by:
    `getHeight` in interface `JRCommonElement`

### getMode

    public byte getMode()

  Deprecated. Replaced by `getModeValue()`.

  Specified by:
    `getMode` in interface `JRCommonElement`

### getOwnMode

    public java.lang.Byte getOwnMode()

  Deprecated. Replaced by `getOwnModeValue()`.

  Specified by:
    `getOwnMode` in interface `JRCommonElement`

### getModeValue

    public ModeEnum getModeValue()

  Description copied from interface: `JRCommonElement`
  Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.

  Specified by:
    `getModeValue` in interface `JRCommonElement`

### getOwnModeValue

    public ModeEnum getOwnModeValue()

  Specified by:
    `getOwnModeValue` in interface `JRCommonElement`

### setMode

    public void setMode(byte mode)

  Deprecated. Replaced by `setMode(ModeEnum)`.

  Specified by:
    `setMode` in interface `JRCommonElement`

### setMode

    public void setMode(java.lang.Byte mode)

  Deprecated. Replaced by `setMode(ModeEnum)`.

  Specified by:
    `setMode` in interface `JRCommonElement`

### setMode

    public void setMode(ModeEnum modeValue)

  Description copied from interface: `JRCommonElement`
  Sets the element transparency mode.

  Specified by:
    `setMode` in interface `JRCommonElement`

### getForecolor

    public java.awt.Color getForecolor()

  Specified by:
    `getForecolor` in interface `JRCommonElement`

### getOwnForecolor

    public java.awt.Color getOwnForecolor()

  Specified by:
    `getOwnForecolor` in interface `JRCommonElement`

### setForecolor

    public void setForecolor(java.awt.Color forecolor)

  Specified by:
    `setForecolor` in interface `JRCommonElement`

### getBackcolor

    public java.awt.Color getBackcolor()

  Specified by:
    `getBackcolor` in interface `JRCommonElement`

### getOwnBackcolor

    public java.awt.Color getOwnBackcolor()

  Specified by:
    `getOwnBackcolor` in interface `JRCommonElement`

### setBackcolor

    public void setBackcolor(java.awt.Color backcolor)

  Specified by:
    `setBackcolor` in interface `JRCommonElement`

### getId

    public java.lang.String getId()

### getKey

    public java.lang.String getKey()

  Description copied from interface: `JRCommonElement`
  Returns the string value that uniquely identifies the element.

  Specified by:
    `getKey` in interface `JRCommonElement`

### setKey

    public void setKey(java.lang.String key)

### getStyleNameReference

    public java.lang.String getStyleNameReference()

  Returns null as external style references are not allowed for print objects.

  Specified by:
    `getStyleNameReference` in interface `JRStyleContainer`
  Returns:
    the name of an external style

### hasProperties

    public boolean hasProperties()

  Description copied from interface: `JRPropertiesHolder`
  Checks whether the object has any properties.

  Specified by:
    `hasProperties` in interface `JRPropertiesHolder`
  Returns:
    whether the object has any properties

### getPropertiesMap

    public JRPropertiesMap getPropertiesMap()

  Description copied from interface: `JRPropertiesHolder`
  Returns this object's properties map.

  Specified by:
    `getPropertiesMap` in interface `JRPropertiesHolder`
  Returns:
    this object's properties map

### getParentProperties

    public JRPropertiesHolder getParentProperties()

  Description copied from interface: `JRPropertiesHolder`
  Returns the parent properties holder, whose properties are used as defaults for this object.

  Specified by:
    `getParentProperties` in interface `JRPropertiesHolder`
  Returns:
    the parent properties holder, or `null` if no parent

### setStyle

    public void setStyle(JRStyle style)

  Sets the template element style.

  Parameters:
    `style` - the style

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com