Class ExternalMarkImpl

  • All Implemented Interfaces:
    ExternalMark

    public class ExternalMarkImpl
    extends Object
    implements ExternalMark
    Default implementation of ExternalMark.
    • Constructor Detail

      • ExternalMarkImpl

        public ExternalMarkImpl()
      • ExternalMarkImpl

        public ExternalMarkImpl​(Icon icon)
      • ExternalMarkImpl

        public ExternalMarkImpl​(OnLineResource resource,
                                String format,
                                int markIndex)
    • Method Detail

      • getFormat

        public String getFormat()
        Description copied from interface: ExternalMark
        Mime type of the onlineResource/InlineContent

        Common examples:

        • image/svg
        • image/png
        • image/gif
        This information is used by a renderer to determine if it can support the image format being supplied.
        Specified by:
        getFormat in interface ExternalMark
        Returns:
        mime type
      • getInlineContent

        public Icon getInlineContent()
        Description copied from interface: ExternalMark
        Inline content.

        Only one of OnlineResource or InlineContent can be supplied.

        Specified by:
        getInlineContent in interface ExternalMark
        Returns:
        InlineContent or null
      • getMarkIndex

        public int getMarkIndex()
        Description copied from interface: ExternalMark
        Returns an integer value that can used for accessing a particular Font character in a TTF file or a catalog for example.
        Specified by:
        getMarkIndex in interface ExternalMark
        Returns:
        integer
      • getOnlineResource

        public OnLineResource getOnlineResource()
        Description copied from interface: ExternalMark
        Online resource defined by an URI.

        Only one of OnlineResource or InlineContent can be supplied.

        Specified by:
        getOnlineResource in interface ExternalMark
        Returns:
        OnlineResource or null
      • setInlineContent

        public void setInlineContent​(Icon inline)
        Description copied from interface: ExternalMark
        Icon to use for inline content.

        This is often a SwingImageIcon with a format defined by getFormat()

        Specified by:
        setInlineContent in interface ExternalMark
      • setFormat

        public void setFormat​(String mimeType)
        Specified by:
        setFormat in interface ExternalMark
        Parameters:
        mimeType - Mime type of external (or internal) resource
      • setMarkIndex

        public void setMarkIndex​(int markIndex)
        Description copied from interface: ExternalMark
        Mark index used to specify true type font character; or frame of an animated gif.
        Specified by:
        setMarkIndex in interface ExternalMark