Package breitband.GUI.ui
Class CableSelector
- java.lang.Object
-
- breitband.GUI.ui.CableSelector
-
-
Constructor Summary
Constructors Constructor Description CableSelector(sag.SAGPanel panel, CableConfig[] cableTypes)
Creates a new CableSelector
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
hide()
Hide the selector by pushing it offscreenCableSelector
onSelect(java.util.function.Predicate<CableConfig> selectAction)
This event is triggered when the user selects a cableCableSelector
onSkip(java.lang.Runnable skipAction)
This event is triggered when the user skips, instead of choosing a cablevoid
show()
Show the selector by pushing it onscreen
-
-
-
Constructor Detail
-
CableSelector
public CableSelector(sag.SAGPanel panel, CableConfig[] cableTypes)
Creates a new CableSelector- Parameters:
panel
- The panel that the CableSelector will be attached tocableTypes
- All available cable types
-
-
Method Detail
-
onSelect
public CableSelector onSelect(java.util.function.Predicate<CableConfig> selectAction)
This event is triggered when the user selects a cableThe provided function must return a boolean value to indicate whether the selected cable should be highlighted visually.
- Parameters:
selectAction
- The action to be taken when a cable is selected- Returns:
- The selector (for chaining methods)
-
onSkip
public CableSelector onSkip(java.lang.Runnable skipAction)
This event is triggered when the user skips, instead of choosing a cable- Parameters:
skipAction
- The action to be taken when the user skips- Returns:
- The selector (for chaining methods)
-
show
public void show()
Show the selector by pushing it onscreen
-
hide
public void hide()
Hide the selector by pushing it offscreen
-
-