Crossfire JXClient, Trunk
|
Public Member Functions | |
Dimension | getMaximumSize () |
TooltipText | getTooltip () |
void | paintComponent (@NotNull final Graphics g) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.button.AbstractButton | |
void | dispose () |
void | execute () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
boolean | keyPressed (@NotNull final KeyEvent2 e) |
void | mouseClicked (@NotNull final MouseEvent e) |
void | mouseExited (@NotNull final MouseEvent e) |
void | mousePressed (@NotNull final MouseEvent e) |
void | mouseReleased (@NotNull final MouseEvent e) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement | |
void | activateNextElement () |
void | activatePrevElement () |
boolean | isActive () |
void | setActive (final boolean active) |
void | setNextActive (@NotNull final ActivatableGUIElement next) |
void | setPrevActive (@NotNull final ActivatableGUIElement prev) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement | |
int | getDialogBorderBottom () |
int | getDialogBorderLeft () |
int | getDialogBorderRight () |
int | getDialogBorderTop () |
String | getName () |
void | inhibitListeners () |
boolean | isDefault () |
boolean | isIgnore () |
void | mouseDragged (@NotNull final MouseEvent e) |
void | mouseEntered (@NotNull final MouseEvent e) |
void | mouseMoved (@NotNull final MouseEvent e) |
void | mouseWheelMoved (final int wheelRotation) |
void | setChanged () |
void | setChangedListener (@Nullable final GUIElementChangedListener changedListener) |
void | setDefault (final boolean isDefault) |
void | setIgnore () |
String | toString () |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.GUIElement | |
void | notifyOpen () |
Protected Member Functions | |
AbstractButton2 (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final BufferedImage imageUp, @NotNull final BufferedImage imageDown, @Nullable final String text, @Nullable final Font font, @Nullable final Color color, final int textX, final int textY, final boolean autoRepeat, @NotNull final CommandList commandList, @NotNull final GuiFactory guiFactory, @NotNull final NewCharModel newCharModel) | |
Dimension | getMinimumSizeInt () |
abstract boolean | isSelected () |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.button.AbstractButton | |
AbstractButton (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, final boolean autoRepeat, @NotNull final CommandList commandList, @NotNull final GuiFactory guiFactory, @NotNull final NewCharModel newCharModel) | |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement | |
ActivatableGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory) | |
abstract void | activeChanged () |
void | markInactivePending () |
void | setInactiveIfPending () |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement | |
AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory) | |
TooltipText | newTooltipText (@Nullable final String tooltipText) |
void | tooltipChanged () |
Private Attributes | |
final Color | color |
final Font | font |
final Image | imageDown |
final Image | imageUp |
final Dimension | preferredSize |
final String | text |
final int | textX |
final int | textY |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
A GUIElement that implements a button. The button shows an image and optionally overlays a text string.
Definition at line 47 of file AbstractButton2.java.
|
protected |
Creates a new instance. Both
and
must have the same size. The x/y coordinates specify the baseline of the first character of the overlay text.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
imageUp | the image in unselected state |
imageDown | the image in selected state |
text | the overlay text or null
|
font | the font for the overlay text or null
|
color | the color of the overlay text or null
|
textX | the x coordinate of the overlay text |
textY | the y coordinate of the overlay text |
autoRepeat | whether the button should autorepeat while being pressed |
commandList | the commands to execute when the button is elected |
guiFactory | the global GUI factory instance |
newCharModel | the global new char model instance |
Definition at line 126 of file AbstractButton2.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton.autoRepeat, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.color, com.realtime.crossfire.jxclient.gui.button.AbstractButton.commandList, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.font, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.imageDown, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.imageUp, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.button.AbstractButton.newCharModel, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.preferredSize, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.text, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.textX, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.textY, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.
Dimension com.realtime.crossfire.jxclient.gui.button.AbstractButton2.getMaximumSize | ( | ) |
Definition at line 172 of file AbstractButton2.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton2.getMinimumSizeInt().
|
protected |
Returns the minimal size needed to display this component.
Reimplemented from com.realtime.crossfire.jxclient.gui.button.AbstractButton.
Definition at line 165 of file AbstractButton2.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton2.preferredSize.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.getMaximumSize().
TooltipText com.realtime.crossfire.jxclient.gui.button.AbstractButton2.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Reimplemented in com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.
Definition at line 178 of file AbstractButton2.java.
|
abstractprotected |
Returns which image should be shown.
Reimplemented in com.realtime.crossfire.jxclient.gui.button.GUIButton, and com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
void com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent | ( | @NotNull final Graphics | g | ) |
Definition at line 147 of file AbstractButton2.java.
References com.realtime.crossfire.jxclient.gui.button.AbstractButton2.color, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.font, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.imageDown, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.imageUp, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.isSelected(), com.realtime.crossfire.jxclient.gui.button.AbstractButton2.text, com.realtime.crossfire.jxclient.gui.button.AbstractButton2.textX, and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.textY.
|
private |
The Color of the overlay text or
to display only the image.
Definition at line 96 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
|
private |
The Font for the overlay text or
to display only the image.
Definition at line 78 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
|
private |
The image in selected state.
Definition at line 64 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.GUISelectableButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
|
private |
The image in unselected state.
Definition at line 58 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), com.realtime.crossfire.jxclient.gui.button.GUISelectableButton.GUISelectableButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
|
private |
The preferred size of this component.
Definition at line 102 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.getMinimumSizeInt().
|
staticprivate |
The serial version UID.
Definition at line 52 of file AbstractButton2.java.
|
private |
The overlay text or
to display only the image. The text is rendered using font.
Definition at line 71 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
|
private |
The x coordinate of the overlay text.
Definition at line 83 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().
|
private |
The y coordinate of the overlay text. This is the baseline's y coordinate.
Definition at line 89 of file AbstractButton2.java.
Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton2.AbstractButton2(), com.realtime.crossfire.jxclient.gui.button.GUIButton.GUIButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton2.paintComponent().