Crossfire JXClient, Trunk
|
Public Member Functions | |
void | dispose () |
void | execute () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
TooltipText | getTooltip () |
GUICheckBox (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final BufferedImage checkedImage, @NotNull final BufferedImage uncheckedImage, @NotNull final Font font, @NotNull final Color color, @NotNull final CheckBoxOption option, @NotNull final String text, @NotNull final GuiFactory guiFactory) | |
void | mouseClicked (@NotNull final MouseEvent e) |
void | notifyOpen () |
void | paintComponent (@NotNull final Graphics g) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement | |
void | activateNextElement () |
void | activatePrevElement () |
boolean | isActive () |
void | mousePressed (@NotNull final MouseEvent e) |
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 | mouseExited (@NotNull final MouseEvent e) |
void | mouseMoved (@NotNull final MouseEvent e) |
void | mouseReleased (@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 () |
Protected Member Functions | |
void | activeChanged () |
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) | |
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 Member Functions | |
Dimension | getMinimumSizeInt () |
Private Attributes | |
final BufferedImage | checkedImage |
final Color | color |
final Font | font |
final CheckBoxOption | option |
final OptionListener | optionListener = this::setChanged |
final String | text |
final Image | uncheckedImage |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
A check box gui element.
Definition at line 49 of file GUICheckBox.java.
com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox | ( | @NotNull final TooltipManager | tooltipManager, |
@NotNull final GUIElementListener | elementListener, | ||
@NotNull final String | name, | ||
@NotNull final BufferedImage | checkedImage, | ||
@NotNull final BufferedImage | uncheckedImage, | ||
@NotNull final Font | font, | ||
@NotNull final Color | color, | ||
@NotNull final CheckBoxOption | option, | ||
@NotNull final String | text, | ||
@NotNull final GuiFactory | guiFactory | ||
) |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
checkedImage | the image for the checked state |
uncheckedImage | the image for the unchecked state |
font | the font to use |
color | the text color |
option | the option to display |
text | the text to display |
guiFactory | the global GUI factory instance |
Definition at line 111 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.settings.options.Option.addOptionListener(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.checkedImage, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.color, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.font, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.option, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.optionListener, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.text, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.uncheckedImage.
|
protected |
Will be called whenever the active state has changed.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.
Definition at line 171 of file GUICheckBox.java.
void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.dispose | ( | ) |
Releases all allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 127 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.option, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.optionListener, and com.realtime.crossfire.jxclient.settings.options.Option.removeOptionListener().
void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.execute | ( | ) |
Executes the actions associated with this GUI element. Does nothing if this element has no associated actions.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.
Definition at line 201 of file GUICheckBox.java.
Dimension com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSize | ( | ) |
Definition at line 154 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSizeInt().
|
private |
Returns the minimal size needed to display both icon and text.
Definition at line 163 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.checkedImage, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.font, com.realtime.crossfire.jxclient.gui.gui.GuiUtils.getTextDimension(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.text.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getPreferredSize | ( | ) |
Definition at line 147 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSizeInt().
TooltipText com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 207 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.settings.options.CheckBoxOption.getTooltipText(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.newTooltipText(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.option.
void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.mouseClicked | ( | @NotNull final MouseEvent | e | ) |
Will be called when the user has clicked (pressed+released) this element. This event will be delivered after mouseReleased(MouseEvent).
e | the mouse event relative to this element |
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 175 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.option, and com.realtime.crossfire.jxclient.settings.options.CheckBoxOption.toggleChecked().
void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 197 of file GUICheckBox.java.
void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent | ( | @NotNull final Graphics | g | ) |
Definition at line 133 of file GUICheckBox.java.
References com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.checkedImage, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.color, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.font, com.realtime.crossfire.jxclient.settings.options.CheckBoxOption.isChecked(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.option, com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.text, and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.uncheckedImage.
|
private |
The image for the checked [x] state.
Definition at line 60 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSizeInt(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent().
|
private |
The text color.
Definition at line 84 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent().
|
private |
The font to use.
Definition at line 78 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSizeInt(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent().
|
private |
The option to display.
Definition at line 90 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.dispose(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getTooltip(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.mouseClicked(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent().
|
private |
The OptionListener attached to option.
Definition at line 96 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.dispose(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox().
|
staticprivate |
The serial version UID.
Definition at line 54 of file GUICheckBox.java.
|
private |
The text.
Definition at line 72 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSizeInt(), com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent().
|
private |
The image for the unchecked [ ] state.
Definition at line 66 of file GUICheckBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox(), and com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent().