Class DocumentLink


  • public class DocumentLink
    extends java.lang.Object
    A document link is a range in a text document that links to an internal or external resource, like another text document or a web site.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.Object getData()
      A data entry field that is preserved on a document link between a DocumentLinkRequest and a DocumentLinkResolveRequest.
      Range getRange()
      The range this link applies to.
      java.lang.String getTarget()
      The uri this link points to.
      java.lang.String getTooltip()
      The tooltip text when you hover over this link.
      int hashCode()  
      void setData​(java.lang.Object data)
      A data entry field that is preserved on a document link between a DocumentLinkRequest and a DocumentLinkResolveRequest.
      void setRange​(Range range)
      The range this link applies to.
      void setTarget​(java.lang.String target)
      The uri this link points to.
      void setTooltip​(java.lang.String tooltip)
      The tooltip text when you hover over this link.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DocumentLink

        public DocumentLink()
      • DocumentLink

        public DocumentLink​(Range range)
      • DocumentLink

        public DocumentLink​(Range range,
                            java.lang.String target)
      • DocumentLink

        public DocumentLink​(Range range,
                            java.lang.String target,
                            java.lang.Object data)
      • DocumentLink

        public DocumentLink​(Range range,
                            java.lang.String target,
                            java.lang.Object data,
                            java.lang.String tooltip)
    • Method Detail

      • getRange

        public Range getRange()
        The range this link applies to.
      • setRange

        public void setRange​(Range range)
        The range this link applies to.
      • getTarget

        public java.lang.String getTarget()
        The uri this link points to. If missing a resolve request is sent later.
      • setTarget

        public void setTarget​(java.lang.String target)
        The uri this link points to. If missing a resolve request is sent later.
      • getTooltip

        public java.lang.String getTooltip()
        The tooltip text when you hover over this link.

        If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, user settings, and localization.

        Since 3.15.0

      • setTooltip

        public void setTooltip​(java.lang.String tooltip)
        The tooltip text when you hover over this link.

        If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS, user settings, and localization.

        Since 3.15.0

      • getData

        public java.lang.Object getData()
        A data entry field that is preserved on a document link between a DocumentLinkRequest and a DocumentLinkResolveRequest.

        Since 3.8.0

      • setData

        public void setData​(java.lang.Object data)
        A data entry field that is preserved on a document link between a DocumentLinkRequest and a DocumentLinkResolveRequest.

        Since 3.8.0

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object