- Timestamp:
- 19/08/10 12:43:30 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/applications/NXconvertpy/src/org/nexusformat/nxvalidate/TreeUtils.java
r1504 r1507 1 /* 2 * To change this template, choose Tools | Templates 3 * and open the template in the editor. 1 /* NeXus - Neutron & X-ray Common Data Format 2 * 3 * NeXus file validation GUI tool. 4 * 5 * Copyright (C) 2010 Stephen Rankin 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * 21 * For further information, see <http://www.neutron.anl.gov/NeXus/> 22 * 23 * TextPaneStyle.java 24 * 4 25 */ 5 26 package org.nexusformat.nxvalidate; … … 16 37 public class TreeUtils { 17 38 39 public void hideGoodNodes(JTree tree){ 40 41 if (tree.isSelectionEmpty()) { 42 return; 43 } 44 45 NXNodeMapper baseNode = getBaseNode(tree); 46 NXNodeMapper node = null; 47 48 int rows = tree.getRowCount(); 49 50 for (int i = 0; i < rows; ++i) { 51 node = (NXNodeMapper) tree.getPathForRow(i).getLastPathComponent(); 52 System.out.println("Node Name: " + node.toString() + ": " + node.getBadNode()); 53 } 54 55 } 56 57 public void showGoodNodes(JTree tree){ 58 59 if (tree.isSelectionEmpty()) { 60 return; 61 } 62 63 NXNodeMapper baseNode = getBaseNode(tree); 64 NXNodeMapper node = null; 65 66 int rows = tree.getRowCount(); 67 68 for (int i = 0; i < rows; ++i) { 69 node = (NXNodeMapper) tree.getPathForRow(i).getLastPathComponent(); 70 System.out.println("Node Name: " + node.toString()); 71 } 72 73 } 74 18 75 public String getTreePath(JTree tree) { 19 76 … … 49 106 } 50 107 51 public File getNXD CFile(JTree tree) {108 public File getNXDLFile(JTree tree) { 52 109 if (getNode(tree) != null) { 53 110 return getNode(tree).getSchematronFile(); … … 89 146 } 90 147 91 public void setNXD CFile(JTree tree, File file) {148 public void setNXDLFile(JTree tree, File file) { 92 149 if (getNode(tree) != null) { 93 150 getNode(tree).setSchematronFile(file); … … 142 199 return tmpNode; 143 200 } 201 144 202 }
Note: See TracChangeset
for help on using the changeset viewer.
