Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   *  Copyright (c) 2011 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany.
   *  All rights reserved. This program and the accompanying materials
   *  are made available under the terms of the GNU Lesser Public License v2.1
   *  which accompanies this distribution, and is available at
   *  http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
   *
   *  Contributors:
   *      Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany - initial API and implementation
  */
 package de.ipk_gatersleben.bit.bi.edal.rmi.client.gui;
 
 import java.util.List;
 import java.util.Map;
 
 
A class which implements TreeWillExpandListener interface, The listener that's notified when a tree expands or collapses a node.

Author(s):
Jinbo Chen
Version:
1.0
 
 
 	private JTree tree;
Constructs a TreeWillExpandListenerAction that is initialized with tree as the jtree component, and rootDirectory as the EDAL Directory. If any of the parameters are null this method will not initialize.

Parameters:
tree the jtree component
rootDirectory the EDAL Directory
 
 			ClientPrimaryDataDirectory rootDirectory) {
 		this. = tree;
 		this. = rootDirectory;
 	}
 
 			throws ExpandVetoException {
 	}
 
 		EdalNode mynodeobj = (EdalNodenode.getUserObject();
 
 		try {
 					.getEntity(mynodeobj.getPath(), );
 
 			if (curdir.isDirectory()) {
 				List<ClientPrimaryDataEntitydirlist = curdir
 				List<Stringdirnamelist = new ArrayList<String>();
 
 				if (dirlist != null) {
 					for (ClientPrimaryDataEntity dir : dirlist) {
 						if (dir.isDirectory()
 								&& !(dir.getCurrentVersion().isDeleted())) {
 							dirnamelist.add(dir.getName());
 							dirnamemap.put(dir.getName(), dir);
 						}
 					}
 				}
 				Collections.sort(dirnamelist.);
 
 				for (final String dirname : dirnamelist) {
							new EdalNode(dirname,
											.get(dirname)).getPath()));
					node.add(child);
				}
			}
catch (RemoteException e1) {
			JOptionPane.showMessageDialog(
					null,
					"Call remote Edal server function exception:"
			JOptionPane.showMessageDialog(null,
					"Call Edal server function exception:" + e1.getMessage(),
catch (NotBoundException e1) {
			JOptionPane.showMessageDialog(null,
					"Call Edal server function exception:" + e1.getMessage(),
		}
	}
New to GrepCode? Check out our FAQ X