assertEquals(1, ui.depthOffset);
}
public void testUpdateCellEditor() {
DefaultTreeCellEditor e1 = new DefaultTreeCellEditor(tree,
new DefaultTreeCellRenderer());
tree.setCellEditor(e1);
assertSame(e1, tree.getCellEditor());
assertNull(ui.cellEditor);
assertSame(e1, ui.getCellEditor());
tree.setEditable(true);
assertSame(e1, ui.cellEditor);
assertSame(e1, ui.getCellEditor());
DefaultTreeCellEditor e2 = new DefaultTreeCellEditor(tree,
new DefaultTreeCellRenderer());
ui.cellEditor = e2;
assertSame(e1, ui.getCellEditor());
assertSame(e2, ui.cellEditor);
ui.updateCellEditor();
assertSame(e1, ui.cellEditor);
assertSame(e1, tree.getCellEditor());
ui.cellEditor = null;
assertFalse(ui.createdCellEditor);
ui.createdCellEditor = true;
assertTrue(ui.createdCellEditor);
ui.updateCellEditor();
assertFalse(ui.createdCellEditor);
assertSame(e1, ui.cellEditor);
assertSame(e1, tree.getCellEditor());
tree.setCellRenderer(new DefaultTreeCellRenderer());
assertFalse(ui.createdCellEditor);
assertSame(e1, ui.cellEditor);
assertSame(e1, tree.getCellEditor());
ui.createdCellEditor = true;
tree.setCellRenderer(new DefaultTreeCellRenderer());
assertTrue(ui.createdCellEditor);
assertNotSame(e1, ui.cellEditor);
assertNotSame(e1, tree.getCellEditor());
}