public class TextButtonFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.awt.Color |
color
The text color.
|
private java.awt.Color |
colorSelected
The text color when selected.
|
private ButtonImages |
down
The images comprising the "down" button state.
|
private java.awt.Font |
font
The font to use.
|
private ButtonImages |
up
The images comprising the "up" button state.
|
Constructor and Description |
---|
TextButtonFactory(ButtonImages up,
ButtonImages down,
java.awt.Font font,
java.awt.Color color,
java.awt.Color colorSelected)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
AbstractGUIElement |
newTextButton(TooltipManager tooltipManager,
GUIElementListener elementListener,
java.lang.String name,
java.lang.String text,
boolean autoRepeat,
CommandList commandList)
Creates a new text button.
|
@NotNull private final java.awt.Color color
@NotNull private final java.awt.Color colorSelected
@NotNull private final ButtonImages down
@NotNull private final java.awt.Font font
@NotNull private final ButtonImages up
public TextButtonFactory(@NotNull ButtonImages up, @NotNull ButtonImages down, @NotNull java.awt.Font font, @NotNull java.awt.Color color, @NotNull java.awt.Color colorSelected)
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 selected@NotNull public AbstractGUIElement newTextButton(@NotNull TooltipManager tooltipManager, @NotNull GUIElementListener elementListener, @NotNull java.lang.String name, @NotNull java.lang.String text, boolean autoRepeat, @NotNull CommandList commandList)
tooltipManager
- the tooltip manager to updateelementListener
- the element listener to notifyname
- the name of this elementtext
- the button textautoRepeat
- whether the button should autorepeat while being
pressedcommandList
- the commands to execute when the button is elected