Class TextButtonFactory
java.lang.Object
com.realtime.crossfire.jxclient.skin.factory.TextButtonFactory
A factory class to create "textbutton" instances.
-
Constructor Summary
ConstructorsConstructorDescriptionTextButtonFactory(@NotNull ButtonImages up, @NotNull ButtonImages down, @NotNull Font font, @NotNull Color color, @NotNull Color colorSelected, @NotNull Color colorDisabled, @NotNull GuiFactory guiFactory, @NotNull NewCharModel newCharModel, @NotNull KeybindingsManager keybindingsManager) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription@NotNull AbstractGUIElementnewTextButton(@NotNull TooltipManager tooltipManager, @NotNull GUIElementListener elementListener, @NotNull String name, @NotNull String text, boolean autoRepeat, @NotNull CommandList commandList) Creates a new text button.
-
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 statedown- the images comprising the "down" button statefont- the font to usecolor- the text colorcolorSelected- the text color when selectedcolorDisabled- the text color when disabledguiFactory- the global GUI factory instancenewCharModel- the global new char model instancekeybindingsManager- 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 updateelementListener- the element listener to notifyname- the name of this elementtext- the button textautoRepeat- whether the button should auto-repeat while being pressedcommandList- the commands to execute when the button is elected- Returns:
- the new text button
-