Class TooltipManagerImpl
java.lang.Object
com.realtime.crossfire.jxclient.gui.label.TooltipManagerImpl
- All Implemented Interfaces:
TooltipManager
Manages the tooltip display. An
AbstractLabel is moved/resized to
display a tooltip text for an "active" GUI element.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreset()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.
-
Constructor Details
-
TooltipManagerImpl
public TooltipManagerImpl()
-
-
Method Details
-
setScreenSize
public void setScreenSize(int windowWidth, int windowHeight) Updates the current window size.- Parameters:
windowWidth- the window widthwindowHeight- the window height
-
setTooltip
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
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
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
Description copied from interface:TooltipManagerReports a possibly changed tooltip text.- Specified by:
tooltipTextChangedin interfaceTooltipManager- Parameters:
element- the GUI element that may have changed
-