public void testCreate() {
   CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
   memo.setTrafficController(new TestTrafficController());
   CbusSensorManager m = new CbusSensorManager(memo);
   m.provideSensor(memo.getSystemPrefix() + "SX0A;+N15E6");
   memo.dispose();
 }
 public void testAction() {
   // load dummy TrafficController
   TrafficControllerScaffold tcs = new TrafficControllerScaffold();
   CanSystemConnectionMemo memo = new CanSystemConnectionMemo();
   memo.setTrafficController(tcs);
   // f.initComponents(memo);
   new ConfigToolPane();
   Assert.assertNotNull("exists", tcs);
 }
  public void initComponents(CanSystemConnectionMemo memo) {
    this.memo = memo;

    memo.getTrafficController().addCanListener(this);

    // add GUI components
    setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));

    treePane = new TreePane();

    treePane.initComponents(
        (MimicNodeStore) memo.get(MimicNodeStore.class),
        (Connection) memo.get(Connection.class),
        (NodeID) memo.get(NodeID.class),
        new ActionLoader(
            (MimicNodeStore) memo.get(MimicNodeStore.class),
            (MemoryConfigurationService) memo.get(MemoryConfigurationService.class)));
    add(treePane);

    treePane.addTreeSelectionListener(
        new TreeSelectionListener() {
          public void valueChanged(TreeSelectionEvent e) {
            JTree tree = (JTree) e.getSource();
            DefaultMutableTreeNode node =
                (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

            if (node == null) {
              return;
            }

            if (node.getUserObject() instanceof NodeTreeRep.SelectionKey) {
              ((NodeTreeRep.SelectionKey) node.getUserObject()).select(node);
            }
          }
        });
  }
 public void dispose() {
   memo.getTrafficController().removeCanListener(this);
 }