Crossfire JXClient, Trunk
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.settings.options.Option Class Referenceabstract
Inheritance diagram for com.realtime.crossfire.jxclient.settings.options.Option:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.settings.options.Option:
Collaboration graph

Public Member Functions

void addOptionListener (@NotNull final OptionListener listener)
 
boolean inhibitSave ()
 
void removeOptionListener (@NotNull final OptionListener listener)
 

Protected Member Functions

void fireStateChangedEvent ()
 

Private Attributes

final EventListenerList2< OptionListenerlisteners = new EventListenerList2<>()
 

Detailed Description

The base class for all options. It manages a set of OptionListeners.

Author
Andreas Kirschbaum

Definition at line 33 of file Option.java.

Member Function Documentation

◆ addOptionListener()

void com.realtime.crossfire.jxclient.settings.options.Option.addOptionListener ( @NotNull final OptionListener  listener)

Adds a listener for state changes.

Parameters
listenerthe listener to add

Definition at line 54 of file Option.java.

References com.realtime.crossfire.jxclient.settings.options.Option.listeners.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.GUICheckBox().

Here is the caller graph for this function:

◆ fireStateChangedEvent()

void com.realtime.crossfire.jxclient.settings.options.Option.fireStateChangedEvent ( )
protected

Notifies all listeners that the state has changed.

Reimplemented in com.realtime.crossfire.jxclient.settings.options.CheckBoxOption.

Definition at line 44 of file Option.java.

References com.realtime.crossfire.jxclient.settings.options.Option.listeners.

◆ inhibitSave()

boolean com.realtime.crossfire.jxclient.settings.options.Option.inhibitSave ( )

Returns whether the option should not be saved. This function can be overridden for options that are otherwise saved, or for options that should not be saved at all.

Returns
whether the option value should not be saved

Reimplemented in com.realtime.crossfire.jxclient.settings.options.PickupOptionOldMode, and com.realtime.crossfire.jxclient.settings.options.PickupOptionNewMode.

Definition at line 72 of file Option.java.

Referenced by com.realtime.crossfire.jxclient.settings.options.OptionManager.saveOptions().

Here is the caller graph for this function:

◆ removeOptionListener()

void com.realtime.crossfire.jxclient.settings.options.Option.removeOptionListener ( @NotNull final OptionListener  listener)

Removes a listener for state changes.

Parameters
listenerthe listener to remove

Definition at line 62 of file Option.java.

References com.realtime.crossfire.jxclient.settings.options.Option.listeners.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUICheckBox.dispose().

Here is the caller graph for this function:

Member Data Documentation

◆ listeners

final EventListenerList2<OptionListener> com.realtime.crossfire.jxclient.settings.options.Option.listeners = new EventListenerList2<>()
private

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