Package breitband.GUI.ui
Class ContractStore
- java.lang.Object
-
- breitband.GUI.ui.ContractStore
-
-
Constructor Summary
Constructors Constructor Description ContractStore(sag.SAGPanel panel)
Creates a new ContractStore
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
hide()
Shows contract store by pushing it offscreenContractStore
onEnter(java.util.function.Consumer<Contract> action)
This event is triggered when a user's cursor enters a contractContractStore
onExit(java.util.function.Consumer<Contract> action)
This event is triggered when a user's cursor leaves a contractContractStore
onSelect(java.util.function.Consumer<Contract> action)
This event is triggered when a contract is selectedContractStore
onSkip(java.lang.Runnable action)
This event is triggered when a user skips and doesn't select a contractvoid
setContracts(Contract[] contracts)
Sets the available contracts by replacing the old list with a new onevoid
show()
Shows contract store by pushing it onscreen
-
-
-
Method Detail
-
onSelect
public ContractStore onSelect(java.util.function.Consumer<Contract> action)
This event is triggered when a contract is selected- Parameters:
action
- The action that will be taken when the user selects a contract- Returns:
- The ContractStore (for chaining methods)
-
onEnter
public ContractStore onEnter(java.util.function.Consumer<Contract> action)
This event is triggered when a user's cursor enters a contract- Parameters:
action
- The action that will be taken when the mouse enters- Returns:
- The ContractStore (for chaining methods)
-
onExit
public ContractStore onExit(java.util.function.Consumer<Contract> action)
This event is triggered when a user's cursor leaves a contract- Parameters:
action
- The action that will be taken when the mouse leaves- Returns:
- The ContractStore (for chaining methods)
-
onSkip
public ContractStore onSkip(java.lang.Runnable action)
This event is triggered when a user skips and doesn't select a contract- Parameters:
action
- The action that will be taken when the user skips- Returns:
- The ContractStore (for chaining methods)
-
show
public void show()
Shows contract store by pushing it onscreen
-
hide
public void hide()
Shows contract store by pushing it offscreen
-
setContracts
public void setContracts(Contract[] contracts)
Sets the available contracts by replacing the old list with a new oneThis should only be called when the list of contracts changes on the board.
- Parameters:
contracts
- New contract selection
-
-