예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 public void dispose() {
   SprogTrafficController.instance().removeSprogListener(this);
   super.dispose();
 }