Package presenter.command

Examples of presenter.command.Command.execute()


            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    view.getViewState().salvaDados();
                    Command salvarCommand = new SalvarArvoresCommand(pView, "Salvando o projeto...");
                    salvarCommand.execute();
                } catch (Exception ex) {
                    ErrorInfo info = new ErrorInfo("Erro", ex.getMessage(), null, "category", ex, Level.SEVERE, null);
                    JXErrorPane.showDialog(view, info);
                }
            }
View Full Code Here


            @Override
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                try {
                    Command importarArvores = new ImportarArvoresCommand(pView, "Gravando dados importados...");
                    importarArvores.execute();
                } catch (Exception ex) {
                    ErrorInfo info = new ErrorInfo("Erro", ex.getMessage(), null, "category", ex, Level.SEVERE, null);
                    JXErrorPane.showDialog(view, info);
                }
            }
View Full Code Here

        if (JOptionPane.showConfirmDialog(null, "Deseja realmente remover "
                + "a(s) árvore(s): " + Arrays.toString(view.getArvoresSelecionadas().toArray())
                + " ?", "Remover árvore(s)", JOptionPane.OK_CANCEL_OPTION) == 0) {
            try {
                Command removerArvores = new RemoverArvoresCommand(view, "Removendo árvores...");
                removerArvores.execute();
            } catch (Exception e) {
                System.err.println("Erro ao atualizar " + e.getMessage());
            }
        }
    }
View Full Code Here

            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    Command adicionaColuna = new AdicionarColunaCommand(view, "Adicionando coluna...");
                    adicionaColuna.execute();
                } catch (Exception ex) {
                    ErrorInfo info = new ErrorInfo("Erro", ex.getMessage(), null, "category", ex, Level.SEVERE, null);
                    JXErrorPane.showDialog(view, info);
                }
            }
View Full Code Here

            @Override
            public void actionPerformed(ActionEvent e) {
                if (JOptionPane.showConfirmDialog(null, "Deseja realmente remover a coluna?", "Remover coluna", JOptionPane.OK_CANCEL_OPTION) == 0) {
                    try {
                        Command removerColuna = new RemoverColunaArvoreCommand(view, "Removendo coluna...");
                        removerColuna.execute();
                    } catch (Exception ex) {
                        ErrorInfo info = new ErrorInfo("Erro", ex.getMessage(), null, "category", ex, Level.SEVERE, null);
                        JXErrorPane.showDialog(view, info);
                    }
                }
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.