Package presenter

Examples of presenter.SelecionarTipoColunaPresenter


        super(pView, pMessage);
    }

    @Override
    void doCommand() {
        SelecionarTipoColunaPresenter tipoColunaPresenter = new SelecionarTipoColunaPresenter();
        ((IEditorView) view).setState(new Atualizacao(((IEditorView) view)));
        if (tipoColunaPresenter.getColumTypeSelected() == 0) {
            String columnName = tipoColunaPresenter.getColumName();
            ((IEditorView) view).getPresenter().getCenarioTM().addColumn(columnName);
            ((IEditorView) view).getGrid().setModel(((IEditorView) view).getPresenter().getCenarioTM());
            ((IEditorView) view).getPresenter().getContainerArvores().addArvoreData(columnName, null);
            ((IEditorView) view).getViewState().validaGrid();
        } else if (tipoColunaPresenter.getColumTypeSelected() == 1) {
            try {
                //TODO Código do Helder
                String formula = JOptionPane.showInputDialog("Informe a fórmula");
                String columnName = tipoColunaPresenter.getColumName();
                columnName = columnName.toUpperCase();
                ((IEditorView) view).getPresenter().getFacadeR().addColumn(formula, columnName);
                ((IEditorView) view).getPresenter().setProjeto(((IEditorView) view).getPresenter().getFacadeR().getCenario());

                Object[] addedColumnData = ((IEditorView) view).getPresenter().getFacadeR().getColumnasObjects(columnName);

                ((IEditorView) view).getPresenter().getCenarioTM().addColuna(columnName, addedColumnData);
                ((IEditorView) view).setState(new Navegacao(((IEditorView) view)));
            } catch (Exception ex) {
                System.out.println("Erro: " + ex.getMessage());
            }
        } else if (tipoColunaPresenter.getColumTypeSelected() < 0) {
            JOptionPane.showMessageDialog(view, "Cancelado pelo usuário", "Erro", JOptionPane.ERROR_MESSAGE);
        }
        ((IEditorView) view).setState(new Navegacao(((IEditorView) view)));
        ((IEditorView) view).formatCells();
    }
View Full Code Here

TOP

Related Classes of presenter.SelecionarTipoColunaPresenter

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.