Package mallemuck.model.command

Examples of mallemuck.model.command.CommandData.addItem()


    public void actionPerformed(ActionEvent event) {
        // Get directory name.
        Collection<File> sources = getSourceFiles();
        File destanation = getDestanationPath();
        CommandData data = new CommandData();
        data.addItem(Keys.SOURCE_FILES, sources);
        data.addItem(Keys.DEST_DIR, destanation);
        // Create command.
        Move move = new Move();
        try {
            move.perform(data);
View Full Code Here


        // Get directory name.
        Collection<File> sources = getSourceFiles();
        File destanation = getDestanationPath();
        CommandData data = new CommandData();
        data.addItem(Keys.SOURCE_FILES, sources);
        data.addItem(Keys.DEST_DIR, destanation);
        // Create command.
        Move move = new Move();
        try {
            move.perform(data);
        } catch (Exception exception) {
View Full Code Here

        } catch (Exception exception) {
            exception.printStackTrace();
        }
        // Refresh panels.
        CommandData refreshData = new CommandData();
        refreshData.addItem(Keys.PANELS, panels);
        Refresh refresh = new Refresh();
        try {
            refresh.perform(refreshData);
        } catch (Exception exception) {
            exception.printStackTrace();
View Full Code Here

        public void actionPerformed(ActionEvent event) {
                // Get directory name.
                Collection<File> sources = getSourceFiles();
                File destination = getDestinationPath();
                CommandData data = new CommandData();
                data.addItem(Keys.SOURCE_FILES, sources);
                data.addItem(Keys.DEST_DIR, destination);
                JDialog dialog = new JDialog();
                ZipUnzipPanel panel = new ZipUnzipPanel();                   
                panel.setSource(sources);
                panel.setDestination(destination);
View Full Code Here

                // Get directory name.
                Collection<File> sources = getSourceFiles();
                File destination = getDestinationPath();
                CommandData data = new CommandData();
                data.addItem(Keys.SOURCE_FILES, sources);
                data.addItem(Keys.DEST_DIR, destination);
                JDialog dialog = new JDialog();
                ZipUnzipPanel panel = new ZipUnzipPanel();                   
                panel.setSource(sources);
                panel.setDestination(destination);
                dialog.add(panel);
View Full Code Here

                } catch (Exception exception) {
                        exception.printStackTrace();
                }
                // Refresh panels.
                CommandData refreshData = new CommandData();
                refreshData.addItem(Keys.PANELS, panels);
                Refresh refresh = new Refresh();
                try {
                        refresh.perform(refreshData);
                } catch (Exception exception) {
                        exception.printStackTrace();
View Full Code Here

        @Override
        public void actionPerformed(ActionEvent event) {
                // Get new name.
                String newName = JOptionPane.showInputDialog("Enter new name:");
                CommandData data = new CommandData();
                data.addItem(Keys.NEW_NAME, newName);
                // Get file to be renamed.
                File file = getSelectedFile();
                data.addItem(Keys.FILE, file);
                // Create command.
                Rename rename = new Rename();
View Full Code Here

                String newName = JOptionPane.showInputDialog("Enter new name:");
                CommandData data = new CommandData();
                data.addItem(Keys.NEW_NAME, newName);
                // Get file to be renamed.
                File file = getSelectedFile();
                data.addItem(Keys.FILE, file);
                // Create command.
                Rename rename = new Rename();
                try {
                        rename.perform(data);
                } catch (Exception exception) {
View Full Code Here

                } catch (Exception exception) {
                        exception.printStackTrace();
                }
                // Refresh panels.
                CommandData refreshData = new CommandData();
                refreshData.addItem(Keys.PANELS, panels);
                Refresh refresh = new Refresh();
                try {
                        refresh.perform(refreshData);
                } catch (Exception exception) {
                        exception.printStackTrace();
View Full Code Here

        public void actionPerformed(ActionEvent event) {
                // Get directory name.
                String name = JOptionPane.showInputDialog("Enter directory name:");
                CommandData data = new CommandData();
                String path = getAbsolutePath() + "/" + name;
                data.addItem(Keys.DIR_NAME, path);
                // Create directory.
                MakeDirectory makeDirectory = new MakeDirectory();
                try {
                        makeDirectory.perform(data);
                } catch (Exception exception) {
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.