Class LocoTableController
- java.lang.Object
-
- org.bidib.wizard.mvc.locolist.controller.LocoTableController
-
- All Implemented Interfaces:
PropertyChangeListener,EventListener,LocoTableControllerListener
public class LocoTableController extends Object implements LocoTableControllerListener, PropertyChangeListener
-
-
Constructor Summary
Constructors Constructor Description LocoTableController(org.bidib.wizard.api.model.NodeInterface node, JFrame parent, MainModel mainModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bidib.jbidibc.core.schema.decoder.userdevices.UserDevicesListgetUserDevicesList()Get the current user devices list based on the current loco list.voidopenLocoDialog(LocoModel locoModel)Open the loco dialog for the provided loco model.voidopenPomDialog(LocoModel locoModel)Open the pom dialog for the provided loco model.voidpropertyChange(PropertyChangeEvent evt)voidpushLocoToMouse(int entryId, int speedSteps, int address, String locoName)Push the loco data to the loco database in the mousevoidqueryCommandStationList(org.bidib.jbidibc.messages.enums.CsQueryTypeEnum csQueryType, Integer locoAddress)Query the loco list from the command station.voidsaveUserDevicesList(org.bidib.jbidibc.core.schema.decoder.userdevices.UserDevicesList userDevicesList)Save the user devices list.voidsetLocoLibraryModel(LocoLibraryModel locoLibrary)Set the loco library model.voidsetSelectedNode(org.bidib.wizard.api.model.NodeInterface node)voidstart(com.vlsolutions.swing.docking.DockingDesktop desktop, MainControllerInterface mainController)
-
-
-
Method Detail
-
start
public void start(com.vlsolutions.swing.docking.DockingDesktop desktop, MainControllerInterface mainController)
-
setSelectedNode
public void setSelectedNode(org.bidib.wizard.api.model.NodeInterface node)
-
queryCommandStationList
public void queryCommandStationList(org.bidib.jbidibc.messages.enums.CsQueryTypeEnum csQueryType, Integer locoAddress)Description copied from interface:LocoTableControllerListenerQuery the loco list from the command station.- Specified by:
queryCommandStationListin interfaceLocoTableControllerListener- Parameters:
csQueryType- the query typelocoAddress- the loco address to search
-
saveUserDevicesList
public void saveUserDevicesList(org.bidib.jbidibc.core.schema.decoder.userdevices.UserDevicesList userDevicesList)
Description copied from interface:LocoTableControllerListenerSave the user devices list.- Specified by:
saveUserDevicesListin interfaceLocoTableControllerListener- Parameters:
userDevicesList- the user devices list
-
pushLocoToMouse
public void pushLocoToMouse(int entryId, int speedSteps, int address, String locoName)Push the loco data to the loco database in the mouse- Specified by:
pushLocoToMousein interfaceLocoTableControllerListener- Parameters:
entryId- the entry id, allowed values1..8speedSteps- the speed stepsaddress- the address of the locolocoName- the name of the loco
-
getUserDevicesList
public org.bidib.jbidibc.core.schema.decoder.userdevices.UserDevicesList getUserDevicesList()
Get the current user devices list based on the current loco list.- Returns:
- the current user devices list
-
setLocoLibraryModel
public void setLocoLibraryModel(LocoLibraryModel locoLibrary)
Description copied from interface:LocoTableControllerListenerSet the loco library model.- Specified by:
setLocoLibraryModelin interfaceLocoTableControllerListener- Parameters:
locoLibrary- the loco library model
-
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Specified by:
propertyChangein interfacePropertyChangeListener
-
openLocoDialog
public void openLocoDialog(LocoModel locoModel)
Description copied from interface:LocoTableControllerListenerOpen the loco dialog for the provided loco model.- Specified by:
openLocoDialogin interfaceLocoTableControllerListener- Parameters:
locoModel- the loco model
-
openPomDialog
public void openPomDialog(LocoModel locoModel)
Description copied from interface:LocoTableControllerListenerOpen the pom dialog for the provided loco model.- Specified by:
openPomDialogin interfaceLocoTableControllerListener- Parameters:
locoModel- the loco model
-
-