Object[] selectedItems = getSelectedDownloadItems(); if (selectedItems != null && selectedItems.length == 1) { if (selectedItems[0].getClass() == DownloadMainNode.class && ( (DownloadMainNode) selectedItems[0]).getType() == DownloadMainNode.ROOT_NODE) { downloadPartListWatcher.setDownloadNode(selectedItems[0]); } else if (selectedItems[0].getClass() == DownloadSourceDO.class) { downloadPartListWatcher.setDownloadNode(selectedItems[0]); } }
ApplejuiceFassade.getInstance().cleanDownloadList();
            public void actionPerformed(ActionEvent ae) {                Object[] selectedItems = getSelectedDownloadItems();                if (selectedItems != null && selectedItems.length == 1) {                    if (selectedItems[0].getClass() == DownloadMainNode.class                        &&                        ( (DownloadMainNode) selectedItems[0]).getType() ==                        DownloadMainNode.ROOT_NODE) {                        downloadPartListWatcher.setDownloadNode(selectedItems[0]);                    }                    else if (selectedItems[0].getClass() == DownloadSourceDO.class) {                        downloadPartListWatcher.setDownloadNode(selectedItems[0]);                    }                }            }