Class JRTemplateImage

    • Field Detail

      • isLazy

        protected boolean isLazy
    • Constructor Detail

      • JRTemplateImage

        public JRTemplateImage​(JROrigin origin,
                               JRDefaultStyleProvider defaultStyleProvider)
        Creates a template image.
        Parameters:
        origin - the origin of the elements that will use this template
        defaultStyleProvider - the default style provider to use for this template
    • Method Detail

      • setImage

        protected void setImage​(JRImage image)
      • copyLineBox

        public void copyLineBox​(JRLineBox box)
        Copies box attributes.
        Parameters:
        box - the object to copy attributes from
      • getMode

        public ModeEnum getMode()
        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:
        getMode in interface JRCommonElement
        Overrides:
        getMode in class JRTemplateElement
      • isUsingCache

        public boolean isUsingCache()
      • setUsingCache

        public void setUsingCache​(boolean isUsingCache)
      • setUsingCache

        public void setUsingCache​(Boolean isUsingCache)
      • isLazy

        public boolean isLazy()
      • setLazy

        public void setLazy​(boolean isLazy)
      • setOnErrorType

        public void setOnErrorType​(OnErrorTypeEnum onErrorType)
      • getHyperlinkType

        public HyperlinkTypeEnum getHyperlinkType()
        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.

        Returns:
        one of the hyperlink type constants
        See Also:
        getLinkType()
      • setHyperlinkType

        protected void setHyperlinkType​(HyperlinkTypeEnum hyperlinkType)
        Sets the link type as a built-in hyperlink type.
        Parameters:
        hyperlinkType - the built-in hyperlink type
        See Also:
        getLinkType()
      • setHyperlinkTarget

        protected void setHyperlinkTarget​(HyperlinkTargetEnum hyperlinkTarget)
      • getLinkTarget

        public String getLinkTarget()
        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.

        Returns:
        the hyperlink type
      • setLinkTarget

        public void setLinkTarget​(String linkTarget)
        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.

        Parameters:
        linkTarget - the hyperlink target name
      • getLinkType

        public String getLinkType()
        Returns the hyperlink type.

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

        Returns:
        the hyperlink type
      • setLinkType

        public void setLinkType​(String linkType)
        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.

        Parameters:
        linkType - the hyperlink type
      • getHashCode

        public int getHashCode()
        Description copied from interface: Deduplicable
        Returns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwh Deduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.
        Specified by:
        getHashCode in interface Deduplicable
        Returns:
        deduplication hash code
      • isIdentical

        public boolean isIdentical​(Object object)
        Description copied from interface: Deduplicable
        Determines if this instance is identical to another object.
        Specified by:
        isIdentical in interface Deduplicable
        Parameters:
        object - the object to compare with this instance
        Returns:
        true if the two objects are identical and can be deduplicated