protected void init() { // connect to TrafficController tc = SprogTrafficController.instance(); // connect to SlotManager (it is only used in Command Station mode) sm = SprogCommandStation.instance(); tc.addSprogListener(this); }
public void sendButtonActionPerformed(java.awt.event.ActionEvent e) { SprogMessage m = new SprogMessage(cmdTextField.getText()); // Messages sent by us will not be forwarded back so add to display manually nextLine("cmd: \"" + m.toString() + "\"\n", ""); SprogTrafficController.instance().sendSprogMessage(m, this); }
public void dispose() { SprogTrafficController.instance().removeSprogListener(this); super.dispose(); }