Class TooltipManagerImpl
- java.lang.Object
-
- com.realtime.crossfire.jxclient.gui.label.TooltipManagerImpl
-
- All Implemented Interfaces:
TooltipManager
public class TooltipManagerImpl extends java.lang.Object implements TooltipManager
Manages the tooltip display. AnAbstractLabelis moved/resized to display a tooltip text for an "active" GUI element.
-
-
Constructor Summary
Constructors Constructor Description TooltipManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreset()Removes the tooltip.voidsetElement(@NotNull AbstractGUIElement guiElement)Displays the tooltip for a GUI element.voidsetScreenSize(int windowWidth, int windowHeight)Updates the current window size.voidsetTooltip(@Nullable AbstractLabel tooltip)Sets the tooltip label.voidtooltipTextChanged(@NotNull GUIElement element)Reports a possibly changed tooltip text.voidunsetElement(@NotNull AbstractGUIElement guiElement)Removes the tooltip of a GUI element.
-
-
-
Method Detail
-
setScreenSize
public void setScreenSize(int windowWidth, int windowHeight)Updates the current window size.- Parameters:
windowWidth- the window widthwindowHeight- the window height
-
setTooltip
public void setTooltip(@Nullable @Nullable AbstractLabel tooltip)Sets the tooltip label.- Parameters:
tooltip- the tooltip label, ornull
-
reset
public void reset()
Removes the tooltip. Does nothing if no tooltip is active.
-
setElement
public void setElement(@NotNull @NotNull AbstractGUIElement guiElement)Description copied from interface:TooltipManagerDisplays the tooltip for a GUI element.- Specified by:
setElementin interfaceTooltipManager- Parameters:
guiElement- the GUI element to show the tooltip of
-
unsetElement
public void unsetElement(@NotNull @NotNull AbstractGUIElement guiElement)Description copied from interface:TooltipManagerRemoves the tooltip of a GUI element. Does nothing if the given GUI element is not active.- Specified by:
unsetElementin interfaceTooltipManager- Parameters:
guiElement- the gui element to remove the tooltip of
-
tooltipTextChanged
public void tooltipTextChanged(@NotNull @NotNull GUIElement element)Description copied from interface:TooltipManagerReports a possibly changed tooltip text.- Specified by:
tooltipTextChangedin interfaceTooltipManager- Parameters:
element- the GUI element that may have changed
-
-