ShareEntry entry = new ShareEntry(path, ShareEntry.SUBDIRECTORY); shares.add(entry); ApplejuiceFassade.getInstance().setShare(shares); DirectoryNode.setShareDirs(shares); folderTree.updateUI();
Iterator it = shares.iterator(); ShareEntry toRemove = null; while (it.hasNext()) { toRemove = (ShareEntry) it.next(); if (toRemove.getDir().compareToIgnoreCase(path) == 0) { break; } toRemove = null; } if (toRemove != null) { shares.remove(toRemove); ApplejuiceFassade.getInstance().setShare(shares); DirectoryNode.setShareDirs(shares); folderTree.updateUI(); }
            public void actionPerformed(ActionEvent ae) {                HashSet shares = ajSettings.getShareDirs();                DirectoryNode node = (DirectoryNode) folderTree.getLastSelectedPathComponent();                if (node != null)                {                    String path = node.getDO().getPath();                    ShareEntry entry = new ShareEntry(path, ShareEntry.SUBDIRECTORY);                    shares.add(entry);                    ApplejuiceFassade.getInstance().setShare(shares);                    DirectoryNode.setShareDirs(shares);                    folderTree.updateUI();                }            }