@Override public void ioResult(IOServiceEvent e) { if (e.getState() == IOServiceEvent.MOUNT_SUCCESS || e.getState() == IOServiceEvent.MOUNT_FAILURE) { lumberjack.setFullModel(buildModel(e.getResolverBundle().getResolvers())); toggleAction.setEnabled(cpos != null); toggleAction.putValue( Action.SELECTED_KEY, (Boolean) toggleAction.getValue(Action.SELECTED_KEY) && cpos != null); } }
public Action getNewFolderAction() { if (newFolderAction == null) { newFolderAction = new NewFolderAction(); // Note: Don't return null for readOnly, it might // break older apps. if (readOnly) { newFolderAction.setEnabled(false); } } return newFolderAction; }