Class TooltipPainter

  • All Implemented Interfaces:
    GlimpsePainter

    public class TooltipPainter
    extends SimpleTextPainter
    Displays tool tip text at a specified position.
    Author:
    ulman
    • Constructor Detail

      • TooltipPainter

        public TooltipPainter​(TextureAtlas atlas)
      • TooltipPainter

        public TooltipPainter()
    • Method Detail

      • setIcon

        public TooltipPainter setIcon​(Object iconId)
        Sets the icon to be displayed on the first line of the tool tip.
        Parameters:
        id - the id of the icon in TooltipPainter's TextureAtlas
      • setIcons

        public TooltipPainter setIcons​(List<Object> iconIds)
        Sets the TooltipPainter to display multiple icons, one per line, down the left hand side of the tooltip window.
      • setWrapTextAroundIcon

        public TooltipPainter setWrapTextAroundIcon​(boolean wrap)
      • setLocation

        public TooltipPainter setLocation​(int x,
                                          int y)
        Sets the location of the upper left corner of the tooltip box in screen/pixel coordinates.
      • setLocationAxisCoords

        public TooltipPainter setLocationAxisCoords​(double x,
                                                    double y)
        Sets the location of the upper left corner of the tooltip box in axis coordinates.
      • setFixedWidth

        public TooltipPainter setFixedWidth​(int fixedWidth)
      • setBreakOnEol

        public TooltipPainter setBreakOnEol​(boolean breakOnEol)
      • setLineSpacing

        public TooltipPainter setLineSpacing​(int lineSpacing)
      • setTextIconSpacing

        public TooltipPainter setTextIconSpacing​(int textIconSpacing)
      • setIconSizeFixedToTextHeight

        public TooltipPainter setIconSizeFixedToTextHeight​(boolean iconSizeFixedToText)
        If true, the height of each icon will be set to the height of each line of text.
      • getInsets

        public Insets getInsets()
      • getBorderSize

        public int getBorderSize()
      • setClampToScreenEdges

        public void setClampToScreenEdges​(boolean clamp)
      • getFixedWidth

        public int getFixedWidth()
      • isFixedWidth

        public boolean isFixedWidth()
      • isIconSizeFixedToTextHeight

        public boolean isIconSizeFixedToTextHeight()
      • getTextIconSpacing

        public int getTextIconSpacing()
      • getBreakOnEol

        public boolean getBreakOnEol()
        Whether to force a break on the end of line characters (\r \f \n).
      • getLineSpacing

        public int getLineSpacing()
        The spacing between the bottom (descent) of one line of text to the top (ascent) of the next line.
      • getIconSize

        public float getIconSize()
      • getIconSpacing

        public float getIconSpacing()