public class TooltipManagerImpl extends java.lang.Object implements TooltipManager
AbstractLabel
is moved/resized to
display a tooltip text for an "active" GUI element.Constructor and Description |
---|
TooltipManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
reset()
Removes the tooltip.
|
void |
setElement(@NotNull AbstractGUIElement guiElement)
Displays the tooltip for a GUI element.
|
void |
setScreenSize(int windowWidth,
int windowHeight)
Updates the current window size.
|
void |
setTooltip(@Nullable AbstractLabel tooltip)
Sets the tooltip label.
|
void |
tooltipTextChanged(@NotNull GUIElement element)
Reports a possibly changed tooltip text.
|
void |
unsetElement(@NotNull AbstractGUIElement guiElement)
Removes the tooltip of a GUI element.
|
public void setScreenSize(int windowWidth, int windowHeight)
windowWidth
- the window widthwindowHeight
- the window heightpublic void setTooltip(@Nullable @Nullable AbstractLabel tooltip)
tooltip
- the tooltip label, or null
public void reset()
public void setElement(@NotNull @NotNull AbstractGUIElement guiElement)
TooltipManager
setElement
in interface TooltipManager
guiElement
- the GUI element to show the tooltip ofpublic void unsetElement(@NotNull @NotNull AbstractGUIElement guiElement)
TooltipManager
unsetElement
in interface TooltipManager
guiElement
- the gui element to remove the tooltip ofpublic void tooltipTextChanged(@NotNull @NotNull GUIElement element)
TooltipManager
tooltipTextChanged
in interface TooltipManager
element
- the GUI element that may have changed