Package org.jnode.apps.jpartition.consoleview.components

Examples of org.jnode.apps.jpartition.consoleview.components.YesNo


        selectPartition();

        List<Command> pendingCommands = UserFacade.getInstance().getPendingCommands();
        if (!pendingCommands.isEmpty()) {
            YesNo yesNo = new YesNo(context);
            println();
            println("The following modifications are pending :");
            for (Command cmd : pendingCommands) {
                println("\t" + cmd);
            }

            boolean apply = yesNo.show("Would you like to apply them ?");
            if (apply) {
                UserFacade.getInstance().applyChanges();
            }
        }
    }
View Full Code Here


    }

    private void selectPartition() throws Exception {
        List<Partition> partitions = UserFacade.getInstance().getPartitions();
        if ((partitions.size() == 1) && !partitions.get(0).isUsed()) {
            YesNo yesNo = new YesNo(context);
            boolean create = yesNo.show("There is no partition. Would you like to create one ?");
            if (create) {
                selectedPartition = createPartition(partitions.get(0));
            }
        }
View Full Code Here

        Operation choice = partitionsOpt.show("Select an operation", choices);
        choice.execute(this, partition);
    }

    private void removePartition(Partition partition) throws Exception {
        YesNo yesNo = new YesNo(context);
        boolean remove = yesNo.show("Would like you to remove the partition ?");

        if (remove) {
            UserFacade.getInstance().removePartition(partition.getStart() + 1);
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.apps.jpartition.consoleview.components.YesNo

Copyright © 2018 www.massapicom. 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.