Class AddWeaponToShipCheat
- java.lang.Object
-
- ch.sahits.game.openpatrician.display.model.cheat.AddWeaponToShipCheat
-
- All Implemented Interfaces:
ICheatCommand
,IDoubleSelectableCheatCommand
@Component public class AddWeaponToShipCheat extends java.lang.Object implements IDoubleSelectableCheatCommand
Cheat command to add a weapon to a ship using CTRL+W.- Author:
- Andi Hotz, (c) Sahits GmbH, 2018 Created on May 05, 2018
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContext
context
private javafx.scene.input.KeyCode
controlKey
private java.lang.String
descriptionTextKey
private java.util.List<GenericTriple<java.lang.String>>
firstOptions
private javafx.scene.input.KeyCode
key
private Locale
locale
private org.springframework.context.MessageSource
messageSource
private java.util.List<GenericTriple<java.lang.String>>
secondOptions
private GenericTriple<java.lang.String>
selectedFirstOption
private GenericTriple<java.lang.String>
selectedSecondOption
-
Constructor Summary
Constructors Constructor Description AddWeaponToShipCheat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Execute this cheat.private void
init()
void
setupModel()
Hook to update the model at the time it is used to display the options.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.cheat.ICheatCommand
getControlKey, getDescriptionTextKey, getKey
-
Methods inherited from interface ch.sahits.game.openpatrician.model.cheat.IDoubleSelectableCheatCommand
getFirstOptions, getSecondOptions, setSelectedFirstOption, setSelectedSecondOption
-
-
-
-
Field Detail
-
controlKey
private final javafx.scene.input.KeyCode controlKey
-
key
private final javafx.scene.input.KeyCode key
-
descriptionTextKey
private final java.lang.String descriptionTextKey
- See Also:
- Constant Field Values
-
firstOptions
private final java.util.List<GenericTriple<java.lang.String>> firstOptions
-
secondOptions
private final java.util.List<GenericTriple<java.lang.String>> secondOptions
-
selectedFirstOption
private GenericTriple<java.lang.String> selectedFirstOption
-
selectedSecondOption
private GenericTriple<java.lang.String> selectedSecondOption
-
context
@Autowired private org.springframework.context.ApplicationContext context
-
messageSource
@Autowired private org.springframework.context.MessageSource messageSource
-
locale
@Autowired private Locale locale
-
-
Method Detail
-
init
@PostConstruct private void init()
-
setupModel
public void setupModel()
Description copied from interface:IDoubleSelectableCheatCommand
Hook to update the model at the time it is used to display the options.- Specified by:
setupModel
in interfaceIDoubleSelectableCheatCommand
-
execute
public void execute()
Description copied from interface:ICheatCommand
Execute this cheat.- Specified by:
execute
in interfaceICheatCommand
-
-