public void treeChanged(TreeChangeEvent e) { Object source = e.getSource(); if (source == this.localA) { if (!this.listeningToLocalA) { throw new IllegalStateException(ISE_MESSAGE); } } else if (source == this.localB) { this.localA.removeTreeChangeListener(this); this.listeningToLocalA = false; } else { throw new IllegalStateException("bogus event source: " + source); } }
void treeChangedSingleArgument(TreeChangeEvent e) { this.treeChangedSingleArgumentFlag = true; assertSame(this.testModel, e.getSource()); assertEquals(this.treeName, e.getTreeName()); assertTrue(Arrays.equals(this.path, e.getPath())); }