Class TooltipInformation

java.lang.Object
ro.sync.exml.workspace.api.editor.page.author.tooltip.TooltipInformation

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

    • ORIGIN_CALLOUTS

      public static final String ORIGIN_CALLOUTS
      The tooltip describes information when hovering callouts.
      See Also:
    • ORIGIN_FORM_CONTROLS

      public static final String ORIGIN_FORM_CONTROLS
      Tooltip computed when hovering form controls.
      See Also:
    • ORIGIN_PROFILING_CONDITIONS

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

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

      public static final String ORIGIN_IMAGE
      Tooltip computed when hovering over an image.
      See Also:
    • ORIGIN_ERROR_NODE

      public static final String ORIGIN_ERROR_NODE
      Tooltip computed when hovering over an error node.
      See Also:
    • ORIGIN_VALIDATION_ERROR

      public static final String ORIGIN_VALIDATION_ERROR
      Validation error.
      See Also:
    • ORIGIN_CHANGE_MARKERS

      public static final String ORIGIN_CHANGE_MARKERS
      Hovering over comment change tracking.
      See Also:
  • Constructor Details

    • TooltipInformation

      public TooltipInformation(String description, AuthorNode hoveredNode, 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 Details

    • getDescription

      public 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(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 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.