@Override public Void run() throws Exception { removable.remove(); return null; } });
@Override public void onConfirm() { try { media.as(Removable).remove(); final double freeSpace = masterFileSystem.get().getExternalFileSystem().getFreeSpace() / MEGA; view.notifyCompletion(notification().withText(_, "deletionCompleted", freeSpace)); } catch (Exception e) { log.warn("Can't delete sound", e); view.notifyError(notification().withText(_, "deletionFailed")); } // Needed because at this point the PropertyChangeListener has been detached. // Maybe it would be better to keep the listener attached, implement a dispose() method that // detaches it at the end. controller.notifyStatusChanged(); } }));