Crossfire JXClient, Trunk
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.misc.GUICheckBox Class Reference
Inheritance diagram for com.realtime.crossfire.jxclient.gui.misc.GUICheckBox:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.misc.GUICheckBox:
Collaboration graph

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
 

Detailed Description

A check box gui element.

Author
Andreas Kirschbaum

Definition at line 49 of file GUICheckBox.java.

Constructor & Destructor Documentation

◆ GUICheckBox()

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 
)

Member Function Documentation

◆ activeChanged()

void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.activeChanged ( )
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.

◆ dispose()

void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.dispose ( )

◆ execute()

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.

◆ getMinimumSize()

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().

Here is the call graph for this function:

◆ getMinimumSizeInt()

Dimension com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getMinimumSizeInt ( )
private

◆ 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().

Here is the call graph for this function:

◆ getTooltip()

TooltipText com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.getTooltip ( )

Returns the current tooltip text.

Returns
the tooltip text or
null
to not show a tooltip

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.

Here is the call graph for this function:

◆ mouseClicked()

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).

Parameters
ethe 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().

Here is the call graph for this function:

◆ notifyOpen()

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.

◆ paintComponent()

void com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.paintComponent ( @NotNull final Graphics  g)

Member Data Documentation

◆ checkedImage

final BufferedImage com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.checkedImage
private

◆ color

final Color com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.color
private

◆ font

final Font com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.font
private

◆ option

final CheckBoxOption com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.option
private

◆ optionListener

final OptionListener com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.optionListener = this::setChanged
private

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 54 of file GUICheckBox.java.

◆ text

final String com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.text
private

◆ uncheckedImage

final Image com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.uncheckedImage
private

The documentation for this class was generated from the following file: