@Test public void testTreeStructureChangedNullPath() { support.fireTreeStructureChanged( null ); assertEquals( 1, report.getEventCount() ); assertEquals( 1, report.getStructureEventCount() ); final TreeModelEvent structureEvent = report.getLastStructureEvent(); assertNull( structureEvent.getChildren() ); assertNull( structureEvent.getTreePath() ); assertNull( structureEvent.getPath() ); }
public void fireTreeStructureChanged(TreePath subTreePath) { if (subTreePath != null) { Contract.asNotNull(subTreePath.getPath(), "path must not contain null elements"); } Object[] pairs = listeners.getListenerList(); TreeModelEvent e = null; for (int i = pairs.length - 2; i >= 0; i -= 2) { if (pairs[i] == TreeModelListener.class) { if (e == null) e = createStructureChangedEvent(subTreePath); ((TreeModelListener) pairs[i + 1]).treeStructureChanged(e); } } }
TreeModelSupport { public void fireTreeStructureChanged(TreePath subTreePath) { if (subTreePath != null) { Contract.asNotNull(subTreePath.getPath(), "path must not contain null elements"); } Object[] pairs = listeners.getListenerList(); TreeModelEvent e = null; for (int i = pairs.length - 2; i >= 0; i -= 2) { if (pairs[i] == TreeModelListener.class) { if (e == null) e = createStructureChangedEvent(subTreePath); ((TreeModelListener) pairs[i + 1]).treeStructureChanged(e); } } } }
TreeModelSupport { public void fireTreeStructureChanged(TreePath subTreePath) { if (subTreePath != null) { Contract.asNotNull(subTreePath.getPath(), "path must not contain null elements"); } Object[] pairs = listeners.getListenerList(); TreeModelEvent e = null; for (int i = pairs.length - 2; i >= 0; i -= 2) { if (pairs[i] == TreeModelListener.class) { if (e == null) e = createStructureChangedEvent(subTreePath); ((TreeModelListener) pairs[i + 1]).treeStructureChanged(e); } } } TreeModelSupport(TreeModel model); }
TreeModelSupport { public void fireTreeStructureChanged(TreePath subTreePath) { if (subTreePath != null) { Contract.asNotNull(subTreePath.getPath(), "path must not contain null elements"); } Object[] pairs = listeners.getListenerList(); TreeModelEvent e = null; for (int i = pairs.length - 2; i >= 0; i -= 2) { if (pairs[i] == TreeModelListener.class) { if (e == null) e = createStructureChangedEvent(subTreePath); ((TreeModelListener) pairs[i + 1]).treeStructureChanged(e); } } } TreeModelSupport(TreeModel model); void fireNewRoot(); void firePathLeafStateChanged(TreePath path); void fireTreeStructureChanged(TreePath subTreePath); void firePathChanged(TreePath path); void fireChildChanged(TreePath parentPath, int index, Object child); void fireChildrenChanged(TreePath parentPath, int[] indices,
            Object[] children); void fireChildAdded(TreePath parentPath, int index, Object child); void fireChildRemoved(TreePath parentPath, int index, Object child); void fireChildrenAdded(TreePath parentPath, int[] indices,
            Object[] children); void fireChildrenRemoved(TreePath parentPath, int[] indices,
            Object[] children); void addTreeModelListener(TreeModelListener l); TreeModelListener[] getTreeModelListeners(); void removeTreeModelListener(TreeModelListener l); }
TreeModelSupport { public void fireTreeStructureChanged(TreePath subTreePath) { if (subTreePath != null) { Contract.asNotNull(subTreePath.getPath(), "path must not contain null elements"); } Object[] pairs = listeners.getListenerList(); TreeModelEvent e = null; for (int i = pairs.length - 2; i >= 0; i -= 2) { if (pairs[i] == TreeModelListener.class) { if (e == null) e = createStructureChangedEvent(subTreePath); ((TreeModelListener) pairs[i + 1]).treeStructureChanged(e); } } } TreeModelSupport(TreeModel model); void fireNewRoot(); void firePathLeafStateChanged(TreePath path); void fireTreeStructureChanged(TreePath subTreePath); void firePathChanged(TreePath path); void fireChildChanged(TreePath parentPath, int index, Object child); void fireChildrenChanged(TreePath parentPath, int[] indices,
            Object[] children); void fireChildAdded(TreePath parentPath, int index, Object child); void fireChildRemoved(TreePath parentPath, int index, Object child); void fireChildrenAdded(TreePath parentPath, int[] indices,
            Object[] children); void fireChildrenRemoved(TreePath parentPath, int[] indices,
            Object[] children); void addTreeModelListener(TreeModelListener l); TreeModelListener[] getTreeModelListeners(); void removeTreeModelListener(TreeModelListener l);  }