All pastes #105392 Raw Edit

Anonymous

public text v1 · immutable
#105392 ·published 2006-07-29 16:39 UTC
rendered paste body
1145,1147c1145,1147
<       return childValue == null || !(childValue instanceof Hashtable
<           || childValue instanceof Vector 
<           || childValue.getClass().isArray());
---
>       return (childValue == null || !(childValue instanceof Hashtable
>           || childValue instanceof Vector || childValue.getClass()
>           .isArray()));
1395c1395
<   private static final Object EXPANDED = Boolean.TRUE;
---
>   private static final Object EXPANDED = new Object();
1397c1397
<   private static final Object COLLAPSED = Boolean.FALSE;
---
>   private static final Object COLLAPSED = new Object();
1481c1481
<     this(getDefaultTreeModel());
---
>     this(createTreeModel(null));
1511a1512,1513
>     // The setModel also calls the updateUI
>     setModel(model);
1516,1523c1518
<     nodeStates = new Hashtable();
< 
<     // Install the UI before installing the model. This way we avoid double
<     // initialization of lots of UI and model stuff inside the UI and related
<     // classes. The necessary UI updates are performed via property change
<     // events to the UI.
<     updateUI();
<     setModel(model);
---
>     nodeStates.put(new TreePath(model.getRoot()), EXPANDED);
1905,1908d1899
<     // Remove listeners from old model.
<     if (treeModel != null && treeModelListener != null)
<       treeModel.removeTreeModelListener(treeModelListener);
< 
1917,1930d1907
<     clearToggledPaths();
< 
<     if (treeModel != null)
<       {
<         if (treeModelListener == null)
<           treeModelListener = createTreeModelListener();
<         if (treeModelListener != null)
<           treeModel.addTreeModelListener(treeModelListener);
<         Object root = treeModel.getRoot();
<         if (root != null && !treeModel.isLeaf(root))
<           {
<             nodeStates.put(new TreePath(root), Boolean.TRUE);
<           }
<       }
1932a1910
>     updateUI();
2341c2319
<         if (oldValue != null)
---
>         if (oldValue!=null)