Examples of canEmpty()


Examples of com.mucommander.desktop.AbstractTrash.canEmpty()

    public EmptyTrashAction(MainFrame mainFrame, Map<String,Object> properties) {
        super(mainFrame, properties);

        AbstractTrash trash = DesktopManager.getTrash();
        setEnabled(trash!=null && trash.canEmpty());
    }

    @Override
    public void performAction() {
        DesktopManager.getTrash().empty();
View Full Code Here

Examples of com.mucommander.desktop.AbstractTrash.canEmpty()

        AbstractTrash trash = DesktopManager.getTrash();
        if(trash!=null) {
            if(trash.canOpen())
                popupMenu.add(ActionManager.getActionInstance(OpenTrashAction.Descriptor.ACTION_ID, mainFrame));

            if(trash.canEmpty()) {
                JMenuItem emptyTrashItem = new JMenuItem(ActionManager.getActionInstance(EmptyTrashAction.Descriptor.ACTION_ID, mainFrame));

                // Retrieve the number of items that the trash contains, -1 if this information is not available.
                int itemCount = trash.getItemCount();
                if(itemCount==0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.