Changeset 267
- Timestamp:
- 11/14/08 08:31:08 (2 months ago)
- Files:
-
- client/systemTrayClient/project/build (added)
- client/systemTrayClient/project/build/classes (added)
- client/systemTrayClient/project/build/classes/connections (added)
- client/systemTrayClient/project/build/classes/connections/ftp (added)
- client/systemTrayClient/project/build/classes/connections/ftp/manageFtpConnections.class (added)
- client/systemTrayClient/project/build/classes/connections/ftp/SunFtpWrapper.class (added)
- client/systemTrayClient/project/build/classes/connections/http (added)
- client/systemTrayClient/project/build/classes/connections/http/manageHttpConnections.class (added)
- client/systemTrayClient/project/build/classes/interfaces (added)
- client/systemTrayClient/project/build/classes/interfaces/dataStorage (added)
- client/systemTrayClient/project/build/classes/interfaces/dataStorage/configSettings.class (added)
- client/systemTrayClient/project/build/classes/interfaces/debugSupport (added)
- client/systemTrayClient/project/build/classes/interfaces/debugSupport/debugStdIO.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/CheckTreeCellRenderer.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/CheckTreeManager.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/CheckTreeSelectionModel.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$1.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$2.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$3.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$4.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$5.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$6.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$7.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$8.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI$9.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configSettingsUI.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configUserInterface$1.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/configUserInterface.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/TristateCheckBox$1.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/TristateCheckBox$2.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/TristateCheckBox$State.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/TristateCheckBox$TristateDecorator.class (added)
- client/systemTrayClient/project/build/classes/interfaces/graphicalInterface/TristateCheckBox.class (added)
- client/systemTrayClient/project/build/classes/protocols (added)
- client/systemTrayClient/project/build/classes/protocols/audio (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3 (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/BinaryFrame.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ByteBuilder.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/Frame.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/FrameDamagedException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3Exception.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3IllegalFormatException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2DecompressionException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2Exception.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2ExtendedHeader.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2Frame.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2Header.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2IllegalVersionException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2NoSuchFrameException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ID3v2WrongCRCException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/MP3File.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/MP3Properties.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/NoID3TagException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/NoID3v2HeaderException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/NoID3v2TagException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/NoMP3FrameException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/ParseException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/Parser.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/TagContent.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/TagFormatException.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/TextFrame.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/TextFrameEncoding.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/mp3/TextFrameNoEncoding.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/utils (added)
- client/systemTrayClient/project/build/classes/protocols/audio/utils/Bytes.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/utils/CRC.class (added)
- client/systemTrayClient/project/build/classes/protocols/audio/utils/File.class (added)
- client/systemTrayClient/project/build/classes/protocols/images (added)
- client/systemTrayClient/project/build/classes/systemTray (added)
- client/systemTrayClient/project/build/classes/systemTray/systemTrayClient$1.class (added)
- client/systemTrayClient/project/build/classes/systemTray/systemTrayClient$2.class (added)
- client/systemTrayClient/project/build/classes/systemTray/systemTrayClient$3.class (added)
- client/systemTrayClient/project/build/classes/systemTray/systemTrayClient$4.class (added)
- client/systemTrayClient/project/build/classes/systemTray/systemTrayClient.class (added)
- client/systemTrayClient/project/dist (added)
- client/systemTrayClient/project/dist/lib (added)
- client/systemTrayClient/project/dist/lib/jdom.jar (added)
- client/systemTrayClient/project/dist/README.TXT (added)
- client/systemTrayClient/project/dist/systemTrayClient.jar (added)
- client/systemTrayClient/source/interfaces/graphicalInterface/configSettingsUI.form (modified) (1 diff)
- client/systemTrayClient/source/interfaces/graphicalInterface/configSettingsUI.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
client/systemTrayClient/source/interfaces/graphicalInterface/configSettingsUI.form
r266 r267 199 199 </Events> 200 200 <AuxValues> 201 <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTree(add Nodes(null,null))"/>201 <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTree(addTopNodes())"/> 202 202 <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> 203 203 </AuxValues> client/systemTrayClient/source/interfaces/graphicalInterface/configSettingsUI.java
r266 r267 27 27 private boolean bPassWordChanged = false; 28 28 CheckTreeManager checkTreeManager; 29 DefaultMutableTreeNode top = new DefaultMutableTreeNode(); 29 30 30 31 … … 64 65 uIPassWord = new javax.swing.JPasswordField(); 65 66 jScrollPane2 = new javax.swing.JScrollPane(); 66 fileSystemTree = new javax.swing.JTree(add Nodes(null,null));67 fileSystemTree = new javax.swing.JTree(addTopNodes()); 67 68 68 69 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); … … 268 269 private void fileSystemTreeTreeExpanded(javax.swing.event.TreeExpansionEvent evt) {//GEN-FIRST:event_fileSystemTreeTreeExpanded 269 270 // TODO add your handling code here: 271 DefaultMutableTreeNode node; 272 javax.swing.tree.TreePath expandTreePath = evt.getPath(); 273 node = (DefaultMutableTreeNode) expandTreePath.getLastPathComponent(); 274 String curPath = (String) node.getUserObject(); 275 int numberOfChildren = node.getChildCount(); 276 277 for (int i = 0; i < numberOfChildren; i++) { 278 DefaultMutableTreeNode childLeaf = (DefaultMutableTreeNode) node.getChildAt(i); 279 File dir = new File((String) childLeaf.getUserObject()); 280 childLeaf = addNextLevel(childLeaf, dir); 281 node.remove(i); 282 node.insert(childLeaf, i); 283 284 } 285 //node. 286 287 //expandTreePath. 288 289 270 290 }//GEN-LAST:event_fileSystemTreeTreeExpanded 271 291 292 293 DefaultMutableTreeNode addTopNodes() { 294 295 File[] roots = File.listRoots(); 296 297 for (int k=0; k<roots.length; k++) { 298 File dir = roots[k]; 299 String curPath = dir.getPath(); 300 DefaultMutableTreeNode node = new DefaultMutableTreeNode(curPath); 301 302 Vector ol = new Vector(); 303 String[] tmp = dir.list(); 304 305 if (tmp != null) { 306 for (int i = 0; i < tmp.length; i++) { 307 ol.addElement(tmp[i]); 308 } 309 Collections.sort(ol, String.CASE_INSENSITIVE_ORDER); 310 File f; 311 Vector files = new Vector(); 312 313 for (int i = 0; i < ol.size(); i++) { 314 String thisObject = (String) ol.elementAt(i); 315 String newPath; 316 if (curPath.equals(".")) { 317 newPath = thisObject; 318 } 319 else { 320 newPath = curPath + File.separator + thisObject; 321 } 322 if ((f = new File(newPath)).isDirectory()) { 323 files.addElement(newPath); 324 } 325 } 326 for (int fnum = 0; fnum < files.size(); fnum++) { 327 node.add(new DefaultMutableTreeNode(files.elementAt(fnum))); 328 } 329 } 330 top.add(node); 331 } 332 333 return top; 334 } 335 336 DefaultMutableTreeNode addNextLevel(DefaultMutableTreeNode curTop, File dir) { 337 338 String curPath = dir.getPath(); 339 DefaultMutableTreeNode curDir = new DefaultMutableTreeNode(curPath); 340 341 Vector ol = new Vector(); 342 String[] tmp = dir.list(); 343 344 if (tmp != null) { 345 for (int i = 0; i < tmp.length; i++) 346 ol.addElement(tmp[i]); 347 Collections.sort(ol, String.CASE_INSENSITIVE_ORDER); 348 File f; 349 Vector files = new Vector(); 350 // Make two passes, one for Dirs and one for Files. This is #1. 351 for (int i = 0; i < ol.size(); i++) { 352 String thisObject = (String) ol.elementAt(i); 353 String newPath; 354 if (curPath.equals(".")) 355 newPath = thisObject; 356 else 357 newPath = curPath + File.separator + thisObject; 358 if ((f = new File(newPath)).isDirectory()) 359 files.addElement(thisObject); 360 } 361 // Pass two: for files. 362 for (int fnum = 0; fnum < files.size(); fnum++) 363 curDir.add(new DefaultMutableTreeNode(files.elementAt(fnum))); 364 } 365 return curDir; 366 } 367 272 368 DefaultMutableTreeNode addNodes(DefaultMutableTreeNode curTop, File dir) { 273 369 … … 310 406 if ((f = new File(newPath)).isDirectory()) 311 407 addNodes(curDir, f); 312 else313 files.addElement(thisObject);408 //else 409 //files.addElement(thisObject); 314 410 } 315 411 // Pass two: for files. 316 for (int fnum = 0; fnum < files.size(); fnum++)317 curDir.add(new DefaultMutableTreeNode(files.elementAt(fnum)));412 //for (int fnum = 0; fnum < files.size(); fnum++) 413 // curDir.add(new DefaultMutableTreeNode(files.elementAt(fnum))); 318 414 return curDir; 319 415 }
