Package lmnd.model.command

Examples of lmnd.model.command.CommandData


        public void actionPerformed(ActionEvent event) {
                if (Button.CANSEL.equals(event.getActionCommand())) {
                        dialog.dispose();
                        return;
                }
                CommandData data = new CommandData();
                Credentials credentials = dialog.getCredentials();
                data.addItem(Keys.CREDENTIALS, credentials);
                Collection<File> sources = getSourceFiles();
                data.addItem(Keys.SOURCE_FILES, sources);
                MessageData messageData = dialog.getMessageData();
                data.addItem(Keys.MESSAGE_DATA, messageData);
                // Create command.
                SendEmail sendEmail = new SendEmail();
                try {
                        sendEmail.perform(data);
                } catch (Exception exception) {
View Full Code Here


    }

    public void actionPerformed(ActionEvent event) {
        // Get file name.
        String name = JOptionPane.showInputDialog("Enter file name:");
        CommandData data = new CommandData();
        String path = getAbsolutePath() + "/" + name;
        File file = new File(path);
        data.addItem(Keys.FILE, file);
        // Create command.
        CreateFile createFile = new CreateFile();
        try {
            createFile.perform(data);
        } 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

                this.panels = panels;
        }
        public void actionPerformed(ActionEvent event) {
                // Get directory name.
                String path = getSelectedPath();
                CommandData data = new CommandData();
                data.addItem(Keys.DIR_NAME, path);
                // Create command.
                Delete delete = new Delete();
                try {
                        delete.perform(data);
                } 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

                this.panels = panels;
        }
        public void actionPerformed(ActionEvent event) {
                // Get directory name.
                File file = getSelectedFile();
                CommandData data = new CommandData();
                data.addItem(Keys.FILE, file);
                // Create command.
                Edit edit = new Edit();
                try {
                        edit.perform(data);
                } catch (Exception exception) {
View Full Code Here

        }
        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.
                Copy copy = new Copy();
                try {
                        copy.perform(data);
                } 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 directory name.
                File file = getSelectedFile();
                CommandData data = new CommandData();
                data.addItem(Keys.FILE, file);
                // Create command.
                View view = new View();
                try {
                        view.perform(data);
                } catch (Exception exception) {
View Full Code Here

    @Override
    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);
        } 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();
                try {
                        rename.perform(data);
                } 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

                this.panels = panels;
        }
        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) {
                        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

TOP

Related Classes of lmnd.model.command.CommandData

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.