net.sf.jasperreports.engine.base

## Class JRBasePrintImage

- java.lang.Object
- - net.sf.jasperreports.engine.base.JRBasePrintElement
  - - net.sf.jasperreports.engine.base.JRBasePrintGraphicElement
    - - net.sf.jasperreports.engine.base.JRBasePrintImage

- All Implemented Interfaces:
    java.io.Serializable, JRAlignment, JRBoxContainer, JRCommonElement, JRCommonGraphicElement, JRCommonImage, JRIdentifiable, JRPenContainer, JRPrintAnchor, JRPrintElement, JRPrintGraphicElement, JRPrintHyperlink, JRPrintImage, JRPropertiesHolder, JRStyleContainer

      public class JRBasePrintImage
      extends JRBasePrintGraphicElement
      implements JRPrintImage

  Version:
    $Id: JRBasePrintImage.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.lang.String` | `anchorName`
    `protected int` | `bookmarkLevel` The bookmark level for the anchor associated with this field.
    `protected HorizontalAlignEnum` | `horizontalAlignmentValue`
    `protected java.lang.String` | `hyperlinkAnchor`
    `protected java.lang.Integer` | `hyperlinkPage`
    `protected JRPrintHyperlinkParameters` | `hyperlinkParameters`
    `protected java.lang.String` | `hyperlinkReference`
    `protected java.lang.String` | `hyperlinkTooltip`
    `protected boolean` | `isLazy`
    `protected java.lang.Boolean` | `isUsingCache`
    `protected JRLineBox` | `lineBox`
    `protected java.lang.String` | `linkTarget`
    `protected java.lang.String` | `linkType`
    `protected OnErrorTypeEnum` | `onErrorTypeValue`
    `protected Renderable` | `renderable`
    `protected ScaleImageEnum` | `scaleImageValue`
    `protected VerticalAlignEnum` | `verticalAlignmentValue`

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

      `fillValue, linePen`

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

      `backcolor, defaultStyleProvider, forecolor, height, key, modeValue, origin, style, uuid, width, x, y`

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

      `UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID`

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

      `PROPERTY_IGNORE_HYPERLINK_SUFFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JRBasePrintImage(JRDefaultStyleProvider defaultStyleProvider)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> void` | `accept(PrintElementVisitor<T> visitor, T arg)` Accepts a print element visitor.
    `void` | `addHyperlinkParameter(JRPrintHyperlinkParameter parameter)` Adds a custom hyperlink parameter.
    `void` | `copyBox(JRLineBox lineBox)`
    `java.lang.String` | `getAnchorName()`
    `int` | `getBookmarkLevel()` Returns the level of the bookmark corresponding to the anchor.
    `java.lang.Float` | `getDefaultLineWidth()`
    `HorizontalAlignEnum` | `getHorizontalAlignmentValue()` Gets the text horizontal alignment.
    `java.lang.String` | `getHyperlinkAnchor()`
    `java.lang.Integer` | `getHyperlinkPage()`
    `JRPrintHyperlinkParameters` | `getHyperlinkParameters()` Returns the set of custom hyperlink parameters.
    `java.lang.String` | `getHyperlinkReference()`
    `HyperlinkTargetEnum` | `getHyperlinkTargetValue()`
    `java.lang.String` | `getHyperlinkTooltip()` Returns the hyperlink tooltip.
    `HyperlinkTypeEnum` | `getHyperlinkTypeValue()` Retrieves the hyperlink type for the element.
    `JRLineBox` | `getLineBox()`
    `java.lang.String` | `getLinkTarget()` Returns the hyperlink target name.
    `java.lang.String` | `getLinkType()` Returns the hyperlink type.
    `ModeEnum` | `getModeValue()` Returns the element transparency mode.
    `OnErrorTypeEnum` | `getOnErrorTypeValue()`
    `HorizontalAlignEnum` | `getOwnHorizontalAlignmentValue()`
    `ScaleImageEnum` | `getOwnScaleImageValue()` Gets the image own scale type.
    `VerticalAlignEnum` | `getOwnVerticalAlignmentValue()`
    `Renderable` | `getRenderable()`
    `JRRenderable` | `getRenderer()` Deprecated. Replaced by `getRenderable()`.
    `ScaleImageEnum` | `getScaleImageValue()` Gets the image scale type.
    `VerticalAlignEnum` | `getVerticalAlignmentValue()` Gets the text vertical alignment.
    `boolean` | `isLazy()`
    `boolean` | `isUsingCache()`
    `void` | `setAnchorName(java.lang.String anchorName)`
    `void` | `setBookmarkLevel(int bookmarkLevel)` Sets the boomark level for the anchor.
    `void` | `setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)` Sets the text horizontal alignment.
    `void` | `setHyperlinkAnchor(java.lang.String hyperlinkAnchor)`
    `void` | `setHyperlinkPage(java.lang.Integer hyperlinkPage)`
    `void` | `setHyperlinkPage(java.lang.String hyperlinkPage)`
    `void` | `setHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)` Sets the custom hyperlink parameters.
    `void` | `setHyperlinkReference(java.lang.String hyperlinkReference)`
    `void` | `setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)`
    `void` | `setHyperlinkTooltip(java.lang.String hyperlinkTooltip)` Sets the tooltip to be used for the hyperlink.
    `void` | `setHyperlinkType(HyperlinkTypeEnum hyperlinkType)` Sets the link type as a built-in hyperlink type.
    `void` | `setLazy(boolean isLazy)`
    `void` | `setLinkTarget(java.lang.String linkTarget)` Sets the hyperlink target name.
    `void` | `setLinkType(java.lang.String linkType)` Sets the hyperlink type.
    `void` | `setOnErrorType(OnErrorTypeEnum onErrorTypeValue)`
    `void` | `setRenderable(Renderable renderable)`
    `void` | `setRenderer(JRRenderable renderer)` Deprecated. Replaced by `setRenderable(Renderable)`.
    `void` | `setScaleImage(ScaleImageEnum scaleImageValue)` Sets the image scale type.
    `void` | `setUsingCache(boolean isUsingCache)`
    `void` | `setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)` Gets the text vertical alignment.

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

      `copyPen, getDefaultLineColor, getFillValue, getLinePen, getOwnFillValue, setFill`

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

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

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

      `setFill`

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

      `getParentProperties, getPropertiesMap, hasProperties`

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

      `getUUID`

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

      `getFillValue, getLinePen, getOwnFillValue`

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

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

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

      `getDefaultLineColor`

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

      `getDefaultStyleProvider, getStyle, getStyleNameReference`

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

      `getDefaultLineColor`

- - ### Field Detail

    - #### renderable

          protected Renderable renderable

    - #### scaleImageValue

          protected ScaleImageEnum scaleImageValue

    - #### isUsingCache

          protected java.lang.Boolean isUsingCache

    - #### horizontalAlignmentValue

          protected HorizontalAlignEnum horizontalAlignmentValue

    - #### verticalAlignmentValue

          protected VerticalAlignEnum verticalAlignmentValue

    - #### isLazy

          protected boolean isLazy

    - #### onErrorTypeValue

          protected OnErrorTypeEnum onErrorTypeValue

    - #### lineBox

          protected JRLineBox lineBox

    - #### anchorName

          protected java.lang.String anchorName

    - #### linkType

          protected java.lang.String linkType

    - #### linkTarget

          protected java.lang.String linkTarget

    - #### hyperlinkReference

          protected java.lang.String hyperlinkReference

    - #### hyperlinkAnchor

          protected java.lang.String hyperlinkAnchor

    - #### hyperlinkPage

          protected java.lang.Integer hyperlinkPage

    - #### hyperlinkTooltip

          protected java.lang.String hyperlinkTooltip

    - #### hyperlinkParameters

          protected JRPrintHyperlinkParameters hyperlinkParameters

    - #### bookmarkLevel

          protected int bookmarkLevel

      The bookmark level for the anchor associated with this field.
      See Also:
        `JRAnchor.getBookmarkLevel()`

  - ### Constructor Detail

    - #### JRBasePrintImage

          public JRBasePrintImage(JRDefaultStyleProvider defaultStyleProvider)

  - ### Method Detail

    - #### 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`
      Overrides:
        `getModeValue` in class `JRBasePrintElement`

    - #### getRenderable

          public Renderable getRenderable()

      Specified by:
        `getRenderable` in interface `JRPrintImage`

    - #### setRenderable

          public void setRenderable(Renderable renderable)

      Specified by:
        `setRenderable` in interface `JRPrintImage`

    - #### getRenderer

          public JRRenderable getRenderer()

      Deprecated. Replaced by `getRenderable()`.
      Specified by:
        `getRenderer` in interface `JRPrintImage`

    - #### setRenderer

          public void setRenderer(JRRenderable renderer)

      Deprecated. Replaced by `setRenderable(Renderable)`.
      Specified by:
        `setRenderer` in interface `JRPrintImage`

    - #### getScaleImageValue

          public ScaleImageEnum getScaleImageValue()

      Description copied from interface: `JRCommonImage`
      Gets the image scale type.
      Specified by:
        `getScaleImageValue` in interface `JRCommonImage`
      Returns:
        a value representing one of the scale type constants in `ScaleImageEnum`

    - #### getOwnScaleImageValue

          public ScaleImageEnum getOwnScaleImageValue()

      Description copied from interface: `JRCommonImage`
      Gets the image own scale type.
      Specified by:
        `getOwnScaleImageValue` in interface `JRCommonImage`
      Returns:
        a value representing one of the scale type constants in `ScaleImageEnum`

    - #### setScaleImage

          public void setScaleImage(ScaleImageEnum scaleImageValue)

      Description copied from interface: `JRCommonImage`
      Sets the image scale type.
      Specified by:
        `setScaleImage` in interface `JRCommonImage`
      Specified by:
        `setScaleImage` in interface `JRPrintImage`
      Parameters:
        `scaleImageValue` - a value representing one of the scale type constants in `ScaleImageEnum`

    - #### isUsingCache

          public boolean isUsingCache()

      Specified by:
        `isUsingCache` in interface `JRPrintImage`

    - #### setUsingCache

          public void setUsingCache(boolean isUsingCache)

      Specified by:
        `setUsingCache` in interface `JRPrintImage`

    - #### getHorizontalAlignmentValue

          public HorizontalAlignEnum getHorizontalAlignmentValue()

      Description copied from interface: `JRAlignment`
      Gets the text horizontal alignment.
      Specified by:
        `getHorizontalAlignmentValue` in interface `JRAlignment`
      Returns:
        a value representing one of the horizontal alignment constants in `HorizontalAlignEnum`

    - #### getOwnHorizontalAlignmentValue

          public HorizontalAlignEnum getOwnHorizontalAlignmentValue()

      Specified by:
        `getOwnHorizontalAlignmentValue` in interface `JRAlignment`

    - #### setHorizontalAlignment

          public void setHorizontalAlignment(HorizontalAlignEnum horizontalAlignmentValue)

      Description copied from interface: `JRAlignment`
      Sets the text horizontal alignment.
      Specified by:
        `setHorizontalAlignment` in interface `JRAlignment`
      Parameters:
        `horizontalAlignmentValue` - a value representing one of the horizontal alignment constants in `HorizontalAlignEnum`

    - #### getVerticalAlignmentValue

          public VerticalAlignEnum getVerticalAlignmentValue()

      Description copied from interface: `JRAlignment`
      Gets the text vertical alignment.
      Specified by:
        `getVerticalAlignmentValue` in interface `JRAlignment`
      Returns:
        a value representing one of the vertical alignment constants in `VerticalAlignEnum`

    - #### getOwnVerticalAlignmentValue

          public VerticalAlignEnum getOwnVerticalAlignmentValue()

      Specified by:
        `getOwnVerticalAlignmentValue` in interface `JRAlignment`

    - #### setVerticalAlignment

          public void setVerticalAlignment(VerticalAlignEnum verticalAlignmentValue)

      Description copied from interface: `JRAlignment`
      Gets the text vertical alignment.
      Specified by:
        `setVerticalAlignment` in interface `JRAlignment`
      Parameters:
        `verticalAlignmentValue` - a value representing one of the vertical alignment constants in `VerticalAlignEnum`

    - #### isLazy

          public boolean isLazy()

      Specified by:
        `isLazy` in interface `JRPrintImage`

    - #### setLazy

          public void setLazy(boolean isLazy)

      Specified by:
        `setLazy` in interface `JRPrintImage`

    - #### getOnErrorTypeValue

          public OnErrorTypeEnum getOnErrorTypeValue()

      Specified by:
        `getOnErrorTypeValue` in interface `JRPrintImage`

    - #### setOnErrorType

          public void setOnErrorType(OnErrorTypeEnum onErrorTypeValue)

      Specified by:
        `setOnErrorType` in interface `JRPrintImage`

    - #### getLineBox

          public JRLineBox getLineBox()

      Specified by:
        `getLineBox` in interface `JRBoxContainer`

    - #### copyBox

          public void copyBox(JRLineBox lineBox)

    - #### getDefaultLineWidth

          public java.lang.Float getDefaultLineWidth()

      Specified by:
        `getDefaultLineWidth` in interface `JRPenContainer`
      Overrides:
        `getDefaultLineWidth` in class `JRBasePrintGraphicElement`

    - #### getAnchorName

          public java.lang.String getAnchorName()

      Specified by:
        `getAnchorName` in interface `JRPrintAnchor`

    - #### setAnchorName

          public void setAnchorName(java.lang.String anchorName)

      Specified by:
        `setAnchorName` in interface `JRPrintAnchor`

    - #### getHyperlinkTypeValue

          public HyperlinkTypeEnum getHyperlinkTypeValue()

      Description copied from interface: `JRPrintHyperlink`
      Retrieves the hyperlink type for the element.

      The actual hyperlink type is determined by `getLinkType()`. This method can is used to determine whether the hyperlink type is one of the built-in types or a custom type. When hyperlink is of custom type, `CUSTOM` is returned.

      Specified by:
        `getHyperlinkTypeValue` in interface `JRPrintHyperlink`
      Returns:
        one of the hyperlink type constants
      See Also:
        `JRPrintHyperlink.getLinkType()`

    - #### setHyperlinkType

          public void setHyperlinkType(HyperlinkTypeEnum hyperlinkType)

      Description copied from interface: `JRPrintHyperlink`
      Sets the link type as a built-in hyperlink type.
      Specified by:
        `setHyperlinkType` in interface `JRPrintHyperlink`
      Parameters:
        `hyperlinkType` - the built-in hyperlink type
      See Also:
        `JRPrintHyperlink.getLinkType()`

    - #### getHyperlinkTargetValue

          public HyperlinkTargetEnum getHyperlinkTargetValue()

      Specified by:
        `getHyperlinkTargetValue` in interface `JRPrintHyperlink`

    - #### setHyperlinkTarget

          public void setHyperlinkTarget(HyperlinkTargetEnum hyperlinkTarget)

      Specified by:
        `setHyperlinkTarget` in interface `JRPrintHyperlink`

    - #### getHyperlinkReference

          public java.lang.String getHyperlinkReference()

      Specified by:
        `getHyperlinkReference` in interface `JRPrintHyperlink`

    - #### setHyperlinkReference

          public void setHyperlinkReference(java.lang.String hyperlinkReference)

      Specified by:
        `setHyperlinkReference` in interface `JRPrintHyperlink`

    - #### getHyperlinkAnchor

          public java.lang.String getHyperlinkAnchor()

      Specified by:
        `getHyperlinkAnchor` in interface `JRPrintHyperlink`

    - #### setHyperlinkAnchor

          public void setHyperlinkAnchor(java.lang.String hyperlinkAnchor)

      Specified by:
        `setHyperlinkAnchor` in interface `JRPrintHyperlink`

    - #### getHyperlinkPage

          public java.lang.Integer getHyperlinkPage()

      Specified by:
        `getHyperlinkPage` in interface `JRPrintHyperlink`

    - #### setHyperlinkPage

          public void setHyperlinkPage(java.lang.Integer hyperlinkPage)

      Specified by:
        `setHyperlinkPage` in interface `JRPrintHyperlink`

    - #### setHyperlinkPage

          public void setHyperlinkPage(java.lang.String hyperlinkPage)

    - #### getBookmarkLevel

          public int getBookmarkLevel()

      Description copied from interface: `JRPrintAnchor`
      Returns the level of the bookmark corresponding to the anchor.
      Specified by:
        `getBookmarkLevel` in interface `JRPrintAnchor`
      Returns:
        the level of the bookmark corresponding to the anchor (starting from 1) or `NO_BOOKMARK` if no bookmark should be created for this anchor

    - #### setBookmarkLevel

          public void setBookmarkLevel(int bookmarkLevel)

      Description copied from interface: `JRPrintAnchor`
      Sets the boomark level for the anchor.
      Specified by:
        `setBookmarkLevel` in interface `JRPrintAnchor`
      Parameters:
        `bookmarkLevel` - the bookmark level (starting from 1) or `NO_BOOKMARK` if no bookmark should be created

    - #### getHyperlinkParameters

          public JRPrintHyperlinkParameters getHyperlinkParameters()

      Description copied from interface: `JRPrintHyperlink`
      Returns the set of custom hyperlink parameters.
      Specified by:
        `getHyperlinkParameters` in interface `JRPrintHyperlink`
      Returns:
        the set of custom hyperlink parameters
      See Also:
        `JRPrintHyperlink.setHyperlinkParameters(JRPrintHyperlinkParameters)`, `JRPrintHyperlinkParameter`

    - #### setHyperlinkParameters

          public void setHyperlinkParameters(JRPrintHyperlinkParameters hyperlinkParameters)

      Description copied from interface: `JRPrintHyperlink`
      Sets the custom hyperlink parameters.

      These parameters will be used to produce the actual hyperlink when the report is exported.

      Specified by:
        `setHyperlinkParameters` in interface `JRPrintHyperlink`
      Parameters:
        `hyperlinkParameters` - the set of custom hyperlink parameters

    - #### addHyperlinkParameter

          public void addHyperlinkParameter(JRPrintHyperlinkParameter parameter)

      Adds a custom hyperlink parameter.
      Parameters:
        `parameter` - the parameter to add
      See Also:
        `getHyperlinkParameters()`, `JRPrintHyperlinkParameters.addParameter(JRPrintHyperlinkParameter)`

    - #### getLinkType

          public java.lang.String getLinkType()

      Description copied from interface: `JRPrintHyperlink`
      Returns the hyperlink type.
      Specified by:
        `getLinkType` in interface `JRPrintHyperlink`
      Returns:
        the hyperlink type

    - #### setLinkType

          public void setLinkType(java.lang.String linkType)

      Description copied from interface: `JRPrintHyperlink`
      Sets the hyperlink type.

      The type can be one of the built-in types (Reference, LocalAnchor, LocalPage, RemoteAnchor, RemotePage), or can be an arbitrary type.

      Specified by:
        `setLinkType` in interface `JRPrintHyperlink`
      Parameters:
        `linkType` - the hyperlink type

    - #### getLinkTarget

          public java.lang.String getLinkTarget()

      Description copied from interface: `JRPrintHyperlink`
      Returns the hyperlink target name.

      The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.

      Specified by:
        `getLinkTarget` in interface `JRPrintHyperlink`
      Returns:
        the hyperlink type

    - #### setLinkTarget

          public void setLinkTarget(java.lang.String linkTarget)

      Description copied from interface: `JRPrintHyperlink`
      Sets the hyperlink target name.

      The target name can be one of the built-in names (Self, Blank, Top, Parent), or can be an arbitrary name.

      Specified by:
        `setLinkTarget` in interface `JRPrintHyperlink`
      Parameters:
        `linkTarget` - the hyperlink target name

    - #### getHyperlinkTooltip

          public java.lang.String getHyperlinkTooltip()

      Description copied from interface: `JRPrintHyperlink`
      Returns the hyperlink tooltip.
      Specified by:
        `getHyperlinkTooltip` in interface `JRPrintHyperlink`
      Returns:
        the hyperlink tooltip

    - #### setHyperlinkTooltip

          public void setHyperlinkTooltip(java.lang.String hyperlinkTooltip)

      Description copied from interface: `JRPrintHyperlink`
      Sets the tooltip to be used for the hyperlink.
      Specified by:
        `setHyperlinkTooltip` in interface `JRPrintHyperlink`
      Parameters:
        `hyperlinkTooltip` - the tooltip

    - #### 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 `JRBasePrintElement`
      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

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com