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

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


    private boolean selectDevice() throws IOException {
        boolean deviceSelected = false;

        List<Device> devices = UserFacade.getInstance().getDevices();
        if ((devices != null) && !devices.isEmpty()) {
            Options devicesOpt = new Options(context);
            Device choice =
                    devicesOpt.show("Select a device", devices, DeviceLabelizer.INSTANCE);

            String device = choice.getName();
            UserFacade.getInstance().selectDevice(device);
            println("device=" + device);
            deviceSelected = true;
View Full Code Here


        }

        if (selectedPartition == null) {
            partitions = UserFacade.getInstance().getPartitions();

            Options partitionsOpt = new Options(context);
            selectedPartition =
                    partitionsOpt.show("Select a partition", partitions,
                            PartitionLabelizer.INSTANCE);
        }

        if (selectedPartition != null) {
            if (install) {
View Full Code Here

        if (partition.isUsed()) {
            choices = new Operation[] {Operation.FORMAT_PARTITION, Operation.REMOVE_PARTITION};
        } else {
            choices = new Operation[] {Operation.ADD_PARTITION};
        }
        Options partitionsOpt = new Options(context);
        Operation choice = partitionsOpt.show("Select an operation", choices);
        choice.execute(this, partition);
    }
View Full Code Here

        }
    }

    private void formatPartition(Partition partition) throws Exception {
        String[] formatters = UserFacade.getInstance().getFormatters();
        Options partitionsOpt = new Options(context);
        String formatter = partitionsOpt.show("Select a filesystem", formatters);

        UserFacade.getInstance().selectFormatter(formatter);

        UserFacade.getInstance().formatPartition(partition.getStart() + 1);
    }
View Full Code Here

TOP

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

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.