Class TooltipInformation


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public class TooltipInformation
    extends java.lang.Object
    Information about the tooltip.
    Since:
    18
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ORIGIN_CALLOUTS
      The tooltip describes information when hovering callouts.
      static java.lang.String ORIGIN_CHANGE_MARKERS
      Hovering over comment change tracking.
      static java.lang.String ORIGIN_ERROR_NODE
      Tooltip computed when hovering over an error node.
      static java.lang.String ORIGIN_FORM_CONTROLS
      Tooltip computed when hovering form controls.
      static java.lang.String ORIGIN_IMAGE
      Tooltip computed when hovering over an image.
      static java.lang.String ORIGIN_LINK
      Tooltip computed when hovering a link.
      static java.lang.String ORIGIN_PROFILING_CONDITIONS
      Tooltip computed when an element with profiling attributes is hovered.
      static java.lang.String ORIGIN_SCHEMA_DESCRIPTION
      Tooltip computed by looking in the associated schema for annotations on that particular element.
      static java.lang.String ORIGIN_VALIDATION_ERROR
      Validation error.
    • Constructor Summary

      Constructors 
      Constructor Description
      TooltipInformation​(java.lang.String description, AuthorNode hoveredNode, java.lang.String tooltipOriginInformation, int mouseX, int mouseY)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Get the current description which will be used for the tooltip.
      java.lang.String getHoveredErrorOriginInformation()
      Get information about the originator for the tooltip (for example if it is given by hovering an error message or by hovering an image or so on).
      AuthorNode getHoveredNode()
      Get the hovered node, can be null.
      int getMouseX()
      Get mouse X coordinates
      int getMouseY()
      Get mouse Y coordinates
      void setDescription​(java.lang.String description)
      Set a description to be used on the tooltip.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ORIGIN_CALLOUTS

        public static final java.lang.String ORIGIN_CALLOUTS
        The tooltip describes information when hovering callouts.
        See Also:
        Constant Field Values
      • ORIGIN_FORM_CONTROLS

        public static final java.lang.String ORIGIN_FORM_CONTROLS
        Tooltip computed when hovering form controls.
        See Also:
        Constant Field Values
      • ORIGIN_LINK

        public static final java.lang.String ORIGIN_LINK
        Tooltip computed when hovering a link.
        See Also:
        Constant Field Values
      • ORIGIN_PROFILING_CONDITIONS

        public static final java.lang.String ORIGIN_PROFILING_CONDITIONS
        Tooltip computed when an element with profiling attributes is hovered.
        See Also:
        Constant Field Values
      • ORIGIN_SCHEMA_DESCRIPTION

        public static final java.lang.String ORIGIN_SCHEMA_DESCRIPTION
        Tooltip computed by looking in the associated schema for annotations on that particular element.
        See Also:
        Constant Field Values
      • ORIGIN_IMAGE

        public static final java.lang.String ORIGIN_IMAGE
        Tooltip computed when hovering over an image.
        See Also:
        Constant Field Values
      • ORIGIN_ERROR_NODE

        public static final java.lang.String ORIGIN_ERROR_NODE
        Tooltip computed when hovering over an error node.
        See Also:
        Constant Field Values
      • ORIGIN_VALIDATION_ERROR

        public static final java.lang.String ORIGIN_VALIDATION_ERROR
        Validation error.
        See Also:
        Constant Field Values
      • ORIGIN_CHANGE_MARKERS

        public static final java.lang.String ORIGIN_CHANGE_MARKERS
        Hovering over comment change tracking.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TooltipInformation

        public TooltipInformation​(java.lang.String description,
                                  AuthorNode hoveredNode,
                                  java.lang.String tooltipOriginInformation,
                                  int mouseX,
                                  int mouseY)
        Constructor.
        Parameters:
        description - Original tooltip description. Can be null
        hoveredNode - The hovered node. Can be null
        tooltipOriginInformation - Details about where the hovered error came from. Can be null
        mouseX - Mouse X coordinate.
        mouseY - Mouse Y coordinate.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Get the current description which will be used for the tooltip.
        Returns:
        Returns the description which will be displayed for the tooltip.
      • setDescription

        public void setDescription​(java.lang.String description)
        Set a description to be used on the tooltip. The description can also be in HTML format.
        Parameters:
        description - The description.
      • getMouseX

        public int getMouseX()
        Get mouse X coordinates
        Returns:
        Returns the mouse X coordinates.
      • getMouseY

        public int getMouseY()
        Get mouse Y coordinates
        Returns:
        Returns the mouse Y coordinates.
      • getHoveredNode

        public AuthorNode getHoveredNode()
        Get the hovered node, can be null.
        Returns:
        Returns the hovered node, can be null.
      • getHoveredErrorOriginInformation

        public java.lang.String getHoveredErrorOriginInformation()
        Get information about the originator for the tooltip (for example if it is given by hovering an error message or by hovering an image or so on). Can be null.
        Returns:
        Returns information about the originator for the tooltip.