Class PickupOptionNewMode
java.lang.Object
com.realtime.crossfire.jxclient.settings.options.Option
com.realtime.crossfire.jxclient.settings.options.CheckBoxOption
com.realtime.crossfire.jxclient.settings.options.PickupOption
com.realtime.crossfire.jxclient.settings.options.PickupOptionNewMode
A
CheckBoxOption that toggles a pickup setting in
Pickup.PU_NEW_MODE.-
Constructor Summary
ConstructorsConstructorDescriptionPickupOptionNewMode(@NotNull Pickup pickup, long option, @NotNull String tooltipText) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(boolean checked) Executes the action associated with this check box option.booleanReturns whether the option should not be saved.booleanReturns the default value ofCheckBoxOption.isChecked().voidsetPickupMode(long pickupMode) Notifies this instance that the pickup mode has changed.Methods inherited from class com.realtime.crossfire.jxclient.settings.options.CheckBoxOption
fireStateChangedEvent, getTooltipText, isChecked, setChecked, toggleCheckedMethods inherited from class com.realtime.crossfire.jxclient.settings.options.Option
addOptionListener, removeOptionListener
-
Constructor Details
-
PickupOptionNewMode
public PickupOptionNewMode(@NotNull @NotNull Pickup pickup, long option, @NotNull @NotNull String tooltipText) Creates a new instance.- Parameters:
pickup- the pickup instance for modifying the pickup modeoption- the affected pickup modetooltipText- the tooltip text to explain this option
-
-
Method Details
-
execute
protected void execute(boolean checked) Description copied from class:CheckBoxOptionExecutes the action associated with this check box option. Must be implemented in subclasses.- Specified by:
executein classCheckBoxOption- Parameters:
checked- whether the checkbox option is checked
-
isDefaultChecked
public boolean isDefaultChecked()Description copied from class:CheckBoxOptionReturns the default value ofCheckBoxOption.isChecked().- Specified by:
isDefaultCheckedin classCheckBoxOption- Returns:
- the default value
-
inhibitSave
public boolean inhibitSave()Description copied from class:OptionReturns 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.- Overrides:
inhibitSavein classOption- Returns:
- whether the option value should not be saved
-
setPickupMode
public void setPickupMode(long pickupMode) Description copied from class:PickupOptionNotifies this instance that the pickup mode has changed.- Specified by:
setPickupModein classPickupOption- Parameters:
pickupMode- the new pickup mode
-