com.realtime.crossfire.jxclient.skin.factory
Class TextButtonFactory

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

public class TextButtonFactory
extends java.lang.Object

A factory class to create "textbutton" instances.


Field Summary
private  java.awt.Color color
          The text color.
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 Summary
TextButtonFactory(ButtonImages up, ButtonImages down, java.awt.Font font, java.awt.Color color)
          Create a new instance.
 
Method Summary
 GUIElement newTextButton(TooltipManager tooltipManager, GUIElementListener elementListener, java.lang.String name, Extent extent, java.lang.String text, boolean autoRepeat, CommandList commandList)
          Create a new text button.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

@NotNull
private final java.awt.Color color
The text color.


down

@NotNull
private final ButtonImages down
The images comprising the "down" button state.


font

@NotNull
private final java.awt.Font font
The font to use.


up

@NotNull
private final ButtonImages up
The images comprising the "up" button state.

Constructor Detail

TextButtonFactory

public TextButtonFactory(@NotNull
                         ButtonImages up,
                         @NotNull
                         ButtonImages down,
                         @NotNull
                         java.awt.Font font,
                         @NotNull
                         java.awt.Color color)
Create 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.
Method Detail

newTextButton

@NotNull
public GUIElement newTextButton(@NotNull
                                        TooltipManager tooltipManager,
                                        @NotNull
                                        GUIElementListener elementListener,
                                        @NotNull
                                        java.lang.String name,
                                        @NotNull
                                        Extent extent,
                                        @NotNull
                                        java.lang.String text,
                                        boolean autoRepeat,
                                        @NotNull
                                        CommandList commandList)
Create a new text button.

Parameters:
tooltipManager - the tooltip manager to update
elementListener - the element listener to notify
name - The name of this element.
extent - the extent of this element
text - The button text.
autoRepeat - Whether the button should autorepeat while being pressed.
commandList - The commands to execute when the button is elected.
Returns:
the new text button