Examples of ApplicationAction


Examples of org.jitterbit.application.ui.action.ApplicationAction

                if (newWizardButton != null) {
                    // We want the wizard button before the project button.
                    addOptionButton(newWizardButton, bin);
                    wizardButtonAdded = true;
                }
                ApplicationAction action = new NewProjectAction(view.getWindow(), view.getProjectManager());
                bin.add(KongaButton.forToolbar(action).setUseMediumActionIcon(true));
            } else {
                InterchangeActionFactory f = InterchangeActionFactory.getNewEntityFactory(type);
                ApplicationAction a = f.get(view);
                if (a != null) {
                    KongaButton button = KongaButton.forToolbar(a);
                    Icon icon = InterchangeActionDictionary.DICTIONARY.getMediumIcon(a.getID());
                    button.setIcon(icon);
                    bin.add(button);
                }
            }
            if (newWizardButton != null && !wizardButtonAdded) {
View Full Code Here

Examples of org.jitterbit.application.ui.action.ApplicationAction

        actions = Lists.newArrayList();
        defaultAction = createActions(types, defaultType);
    }

    private ApplicationAction createActions(Iterable<EntityType> types, EntityType defaultType) {
        ApplicationAction defaultAction = null;
        List<EntityType> typesInOrder = sort(types);
        for (EntityType type : typesInOrder) {
            if (type == null) {
                actions.add(null);
            } else if (type == EntityType.Project) {
                ApplicationAction action = new NewProjectAction(view.getWindow(), view.getProjectManager());
                actions.add(action);
            } else {
                InterchangeActionFactory f = InterchangeActionFactory.getNewEntityFactory(type);
                ApplicationAction a = f.get(view);
                if (a != null) {
                    actions.add(a);
                    if (type == defaultType) {
                        defaultAction = a;
                    }
View Full Code Here

Examples of org.jitterbit.application.ui.action.ApplicationAction

     *            the <code>InterchangeView</code> for which to retrieve the action created by this
     *            factory.
     */
    public final ApplicationAction get(InterchangeView view) {
        checkNotNull(view, "view");
        ApplicationAction a = lookupActionForWindow(view.getWindow());
        if (a == null) {
            a = create(view);
            put(view.getWindow(), a);
        }
        return a;
View Full Code Here

Examples of org.swingBean.actions.ApplicationAction

  }
 
  private void inicializarTabela(){
    table = new JBeanTable(model);
   
    table.addDoubleClickAction(new ApplicationAction() {
           public void execute() {
             iefInfoTelaAtual= model.getBeanAt(table.getSelectedRow());
             panelFormulario.setBean(iefInfoTelaAtual);
             botaoLimpa.setEnabled(true);
             botaoInsereLinha.setEnabled(false);
View Full Code Here

Examples of org.swingBean.actions.ApplicationAction

    }
  }
 
  private void adicionarBotoes() {
    botaoLimpa = new JActButton("Limpar Formul�rio",
           new ApplicationAction() {
              public void execute() {
                panelFormulario.cleanForm();
                try {
              model.setBeanList(iefInfoTelaDAO.getList());
            } catch (ApplicationException e) {
              JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
            }
                botaoLimpa.setEnabled(true);
                botaoInsereLinha.setEnabled(true);
              botaoAtualizaLinha.setEnabled(false);
              botaoExcluiLinha.setEnabled(false);
              botaoQuery.setEnabled(true);
              }
           });

    botaoInsereLinha = new JActButton("Inserir Linha",
           new ApplicationAction() {
              public void execute() {
                iefInfoTelaAtual=new IefInfoTela();
                panelFormulario.populateBean(iefInfoTelaAtual);
                try {                 
                  iefInfoTelaDAO.insert(iefInfoTelaAtual);
                  model.setBeanList(iefInfoTelaDAO.getList());
                  panelFormulario.cleanForm();
                } catch (ApplicationException e) {
                  JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
                }
                botaoLimpa.setEnabled(true);
              botaoInsereLinha.setEnabled(true);
              botaoAtualizaLinha.setEnabled(false);
              botaoExcluiLinha.setEnabled(false);
              botaoQuery.setEnabled(true);
              }
           });
   
    botaoExcluiLinha = new JActButton("Excluir Linha",
           new ApplicationAction() {
              public void execute() {
                iefInfoTelaAtual= model.getBeanAt(table.getSelectedRow());
                panelFormulario.populateBean(iefInfoTelaAtual);
                try {
              iefInfoTelaDAO.delete(iefInfoTelaAtual);
              model.setBeanList(iefInfoTelaDAO.getList());
              panelFormulario.cleanForm();
            } catch (ApplicationException e) {
              JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
            }
            botaoLimpa.setEnabled(true);
            botaoInsereLinha.setEnabled(true);
              botaoAtualizaLinha.setEnabled(false);
              botaoExcluiLinha.setEnabled(false);
              botaoQuery.setEnabled(true);
              }
           });
   
    botaoAtualizaLinha = new JActButton("Atualizar Linha",
           new ApplicationAction() {
              public void execute() {
              //Popula um objeto com as informa��es do form
                iefInfoTelaAtual=model.getBeanAt(table.getSelectedRow());
                panelFormulario.populateBean(iefInfoTelaAtual);
                //System.out.println(iefInfoTelaAtual.getNome()+iefInfoTelaAtual.getSigla()+iefInfoTelaAtual.getCidade()+iefInfoTelaAtual.getEstado());
                if(iefInfoTelaAtual.isValid()){
                  try {
                    iefInfoTelaDAO.update(iefInfoTelaAtual);
                    model.setBeanList(iefInfoTelaDAO.getList());
                    panelFormulario.cleanForm();
                  } catch (ApplicationException e) {
                    JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
                  }
                  botaoLimpa.setEnabled(true);
                  botaoInsereLinha.setEnabled(true);
                  botaoAtualizaLinha.setEnabled(false);
                botaoExcluiLinha.setEnabled(false);
                botaoQuery.setEnabled(true);
                }
                else {
                  System.out.println("Algum campo ainda eh nulo\n");
                }
              }
           });
   
    botaoQuery = new JActButton("I'm Feeling Lucky",
        new ApplicationAction() {
            public void execute() {
              iefInfoTelaAtual=new IefInfoTela();
              panelFormulario.populateBean(iefInfoTelaAtual);
              iefInfoTelaAtual.setInsertWildcards(true);
              try {
View Full Code Here

Examples of org.swingBean.actions.ApplicationAction

  }
 
  private void inicializarTabela(){
    table = new JBeanTable(model);
   
    table.addDoubleClickAction(new ApplicationAction() {
           public void execute() {
             professorTelaAtual= model.getBeanAt(table.getSelectedRow());
             panelFormulario.setBean(professorTelaAtual);
             botaoLimpa.setEnabled(true);
             botaoInsereLinha.setEnabled(false);
View Full Code Here

Examples of org.swingBean.actions.ApplicationAction

    }
  }
 
  private void adicionarBotoes() {
    botaoLimpa = new JActButton("Limpar Formul�rio",
           new ApplicationAction() {
              public void execute() {
                panelFormulario.cleanForm();
                try {
              model.setBeanList(ProfessorTelaDAO.getList());
            } catch (ApplicationException e) {
              JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
            }
                botaoLimpa.setEnabled(true);
                botaoInsereLinha.setEnabled(true);
              botaoAtualizaLinha.setEnabled(false);
              botaoExcluiLinha.setEnabled(false);
              botaoQuery.setEnabled(true);
              }
           });

    botaoInsereLinha = new JActButton("Inserir Linha",
           new ApplicationAction() {
              public void execute() {
                professorTelaAtual=new ProfessorTela();
                panelFormulario.populateBean(professorTelaAtual);
                try {                 
                  ProfessorTelaDAO.insert(professorTelaAtual);
                  model.setBeanList(ProfessorTelaDAO.getList());
                  panelFormulario.cleanForm();
                } catch (ApplicationException e) {
                  JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
                }
                botaoLimpa.setEnabled(true);
              botaoInsereLinha.setEnabled(true);
              botaoAtualizaLinha.setEnabled(false);
              botaoExcluiLinha.setEnabled(false);
              botaoQuery.setEnabled(true);
              }
           });
   
    botaoExcluiLinha = new JActButton("Excluir Linha",
           new ApplicationAction() {
              public void execute() {
                professorTelaAtual= model.getBeanAt(table.getSelectedRow());
                panelFormulario.populateBean(professorTelaAtual);
                if(professorTelaAtual==null) System.out.println("Fudeu");
                else System.out.println("bizu");
                try {
              ProfessorTelaDAO.delete(professorTelaAtual);
              model.setBeanList(ProfessorTelaDAO.getList());
              panelFormulario.cleanForm();
            } catch (ApplicationException e) {
              JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
            }
            botaoLimpa.setEnabled(true);
            botaoInsereLinha.setEnabled(true);
              botaoAtualizaLinha.setEnabled(false);
              botaoExcluiLinha.setEnabled(false);
              botaoQuery.setEnabled(true);
              }
           });
   
    botaoAtualizaLinha = new JActButton("Atualizar Linha",
           new ApplicationAction() {
              public void execute() {
              //Popula um objeto com as informa��es do form
                professorTelaAtual=model.getBeanAt(table.getSelectedRow());
                panelFormulario.populateBean(professorTelaAtual);
                //System.out.println(ProfessorTelaAtual.getNome()+ProfessorTelaAtual.getSigla()+ProfessorTelaAtual.getCidade()+ProfessorTelaAtual.getEstado());
                if(professorTelaAtual.isValid()){
                  try {
                    ProfessorTelaDAO.update(professorTelaAtual);
                    model.setBeanList(ProfessorTelaDAO.getList());
                    panelFormulario.cleanForm();
                  } catch (ApplicationException e) {
                    JOptionPane.showMessageDialog(panelFormulario, e.getMessage());
                  }
                  botaoLimpa.setEnabled(true);
                  botaoInsereLinha.setEnabled(true);
                  botaoAtualizaLinha.setEnabled(false);
                botaoExcluiLinha.setEnabled(false);
                botaoQuery.setEnabled(true);
                }
                else {
                  System.out.println("Algum campo ainda eh nulo\n");
                }
              }
           });
   
    botaoQuery = new JActButton("I'm Feeling Lucky",
        new ApplicationAction() {
            public void execute() {
              professorTelaAtual=new ProfessorTela();
              panelFormulario.populateBean(professorTelaAtual);
              try {
                model.setBeanList(ProfessorTelaDAO.query(professorTelaAtual));
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.