Revision 8711 trunk/libraries/libJCRS/src/org/gvsig/crs/gui/panels/TreePanel.java

View differences:

TreePanel.java
159 159
			}
160 160
		}
161 161
	}
162
	
163
	public void setRoot(String name){
164
		DefaultTreeModel model =(DefaultTreeModel)tree.getModel();
165
		//for (int index = 0; index<model.getChildCount(model.getRoot());index++)
166
		//	model.removeNodeFromParent((DefaultMutableTreeNode)model.getChild(raiz, index));
167
		rootName=name;
168
		raiz =  new DefaultMutableTreeNode(rootName);
169
		model.setRoot(raiz);
170
		map.clear();
171
		
172
	}
162 173
}

Also available in: Unified diff