Class TextButtonFactory

java.lang.Object
com.realtime.crossfire.jxclient.skin.factory.TextButtonFactory

public class TextButtonFactory extends Object
A factory class to create "textbutton" instances.
  • Constructor Details

    • TextButtonFactory

      public TextButtonFactory(@NotNull @NotNull ButtonImages up, @NotNull @NotNull ButtonImages down, @NotNull @NotNull Font font, @NotNull @NotNull Color color, @NotNull @NotNull Color colorSelected, @NotNull @NotNull Color colorDisabled, @NotNull @NotNull GuiFactory guiFactory, @NotNull @NotNull NewCharModel newCharModel, @NotNull @NotNull KeybindingsManager keybindingsManager)
      Creates a new instance.
      Parameters:
      up - the images comprising the "up" button state
      down - the images comprising the "down" button state
      font - the font to use
      color - the text color
      colorSelected - the text color when selected
      colorDisabled - the text color when disabled
      guiFactory - the global GUI factory instance
      newCharModel - the global new char model instance
      keybindingsManager - the global key bindings manager instance
  • Method Details

    • newTextButton

      @NotNull public @NotNull AbstractGUIElement newTextButton(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, @NotNull @NotNull String text, boolean autoRepeat, @NotNull @NotNull CommandList commandList)
      Creates a new text button.
      Parameters:
      tooltipManager - the tooltip manager to update
      elementListener - the element listener to notify
      name - the name of this element
      text - the button text
      autoRepeat - whether the button should auto-repeat while being pressed
      commandList - the commands to execute when the button is elected
      Returns:
      the new text button