Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.settings.options.Option Class Referenceabstract

The base class for all options. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.settings.options.Option:
+ Collaboration diagram for com.realtime.crossfire.jxclient.settings.options.Option:

Public Member Functions

void addOptionListener (@NotNull final OptionListener listener)
 Adds a listener for state changes. More...
 
boolean inhibitSave ()
 Returns whether the option should not be saved. More...
 
void removeOptionListener (@NotNull final OptionListener listener)
 Removes a listener for state changes. More...
 

Protected Member Functions

void fireStateChangedEvent ()
 Notifies all listeners that the state has changed. More...
 

Private Attributes

final EventListenerList2< OptionListenerlisteners = new EventListenerList2<>()
 The listeners to be notified. More...
 

Detailed Description

The base class for all options.

It manages a set of OptionListeners.

Author
Andreas Kirschbaum

Definition at line 32 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 53 of file Option.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.add().

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

+ Here is the call graph for this function:
+ 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.

Definition at line 43 of file Option.java.

◆ 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

Definition at line 71 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 61 of file Option.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.remove().

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

+ Here is the call graph for this function:
+ 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 listeners to be notified.

Definition at line 38 of file Option.java.


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