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
ConstructorsConstructorDescriptionLocoTableController(org.bidib.wizard.api.model.NodeInterface node, com.vlsolutions.swing.docking.DockingDesktop desktop, JFrame parent, MainModel mainModel, org.springframework.context.ApplicationContext applicationContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLoco()Add new loco.voiddeleteLoco(org.bidib.wizard.model.locolist.LocoListModel locoModel) Delete the loco from the dcc refresh and from the stored locos.voideditLoco(org.bidib.wizard.model.locolist.LocoListModel locoModel) Edit the provided loco.voidopenLocoDialog(org.bidib.wizard.model.locolist.LocoListModel locoModel) Open the loco dialog for the provided loco model.voidopenPomDialog(org.bidib.wizard.model.locolist.LocoListModel locoModel) Open the pom dialog for the provided loco model.voidvoidpushLocoToMouse(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.voidvoidsetLocoLibraryModel(LocoLibraryModel locoLibrary) Set the loco library model.voidstart(MainControllerInterface mainController) Start the locoTableController.
-
Constructor Details
-
LocoTableController
-
-
Method Details
-
start
Start the locoTableController. Register the view.- Parameters:
mainController- the mainController instance
-
queryLocoList
public void queryLocoList() -
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
-
pushLocoToMouse
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
-
setLocoLibraryModel
Description copied from interface:LocoTableControllerListenerSet the loco library model.- Specified by:
setLocoLibraryModelin interfaceLocoTableControllerListener- Parameters:
locoLibrary- the loco library model
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
openLocoDialog
public void openLocoDialog(org.bidib.wizard.model.locolist.LocoListModel 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(org.bidib.wizard.model.locolist.LocoListModel locoModel) Description copied from interface:LocoTableControllerListenerOpen the pom dialog for the provided loco model.- Specified by:
openPomDialogin interfaceLocoTableControllerListener- Parameters:
locoModel- the loco model
-
deleteLoco
public void deleteLoco(org.bidib.wizard.model.locolist.LocoListModel locoModel) Description copied from interface:LocoTableControllerListenerDelete the loco from the dcc refresh and from the stored locos.- Specified by:
deleteLocoin interfaceLocoTableControllerListener- Parameters:
locoModel- the loco model
-
editLoco
public void editLoco(org.bidib.wizard.model.locolist.LocoListModel locoModel) Description copied from interface:LocoTableControllerListenerEdit the provided loco.- Specified by:
editLocoin interfaceLocoTableControllerListener- Parameters:
locoModel- the loco model
-
addLoco
public void addLoco()Description copied from interface:LocoTableControllerListenerAdd new loco.- Specified by:
addLocoin interfaceLocoTableControllerListener
-