Package br.com.procempa.modus.entity

Examples of br.com.procempa.modus.entity.Equipamento


//      List<Equipamento> l = EquipamentoDataServices.getLivres(t);
//      EquipamentoDataServices.closeStation(l.get(0));
    }   
   
    public void testTemVisita() throws Exception {
        Equipamento eq = EquipamentoDataServices.getList().get(0);
      assertTrue(EquipamentoDataServices.temVisita(eq));
    }
View Full Code Here


        Equipamento eq = EquipamentoDataServices.getList().get(0);
      assertTrue(EquipamentoDataServices.temVisita(eq));
    }
 
  public void testGetRotulo() throws Exception {
    Equipamento eq = EquipamentoDataServices.getRotulo("m1");
    assertNotNull(eq);
  }
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        int[] rows = getTable().getSelectedRows();

        for (int i = 0; i < rows.length; i++) {
          Equipamento eq = (Equipamento) getTable().getValueAt(rows[i],
              -1);
          // Atualiza equipamento
          eq = EquipamentoDataServices.getEquipamento(eq.getId());
          if (eq.isClosed()) {
            EquipamentoDataServices.openStation(eq);
            refresh();
          }
        }
        openButton.setEnabled(false);
        downMonitorButton.setEnabled(false);
      }
    };

    openButton.setAction(actionOpen);
    openButton.setToolTipText("Libera equipamento");
    addToolBarButton(openButton);
    openButton.setEnabled(false);

    Action actionClose = new AbstractAction("", IconFactory
        .createEquipamentoBlock16()) {
      private static final long serialVersionUID = 4680946165447301273L;

      public void actionPerformed(ActionEvent e) {
        int[] rows = getTable().getSelectedRows();

        for (int i = 0; i < rows.length; i++) {
          Equipamento eq = (Equipamento) getTable().getValueAt(rows[i],
              -1);
          // Atualiza equipamento
          eq = EquipamentoDataServices.getEquipamento(eq.getId());
          if (eq.isOpened()) {
            EquipamentoDataServices.closeStation(eq);
            refresh();
          }
        }
        openButton.setEnabled(false);
        closeButton.setEnabled(false);
        downMonitorButton.setEnabled(false);
      }
    };

    closeButton.setAction(actionClose);
    closeButton.setToolTipText("Bloqueia equipamento");
    addToolBarButton(closeButton);
    closeButton.setEnabled(false);

    Action actionMonitorDown = new AbstractAction("", IconFactory
        .createDown16()) {

      private static final long serialVersionUID = -489877560767758884L;

      public void actionPerformed(ActionEvent e) {
        int[] rows = getTable().getSelectedRows();

        for (int i = 0; i < rows.length; i++) {
          Equipamento eq = (Equipamento) getTable().getValueAt(rows[i],-1);
          // Atualiza equipamento
          eq = EquipamentoDataServices.getEquipamento(eq.getId());
          if (eq.isOpened()) {
            EquipamentoDataServices.downMonitor(eq);
            refresh();
          }
        }
        openButton.setEnabled(false);
View Full Code Here

  }

  public void actionPerformed(ActionEvent e) {
    JPanel appPanel = Main.getInstance().getAppPanel();
    appPanel.removeAll();
    Equipamento eq = (Equipamento) EquipamentoSearch.getInstance().getSelectedData();
    eq = EquipamentoDataServices.getEquipamento(eq.getId());
    JComponent form = EquipamentoForm.getInstance(eq);
    appPanel.add(form);
    appPanel.validate();
    appPanel.repaint();
  }
View Full Code Here

    switch (action) {
    case ConfirmViewAction.YES:
      JXTable table = EquipamentoSearch.getInstance().getTable();

      for (int row : table.getSelectedRows()) {
        Equipamento eq = ((Equipamento) table.getValueAt(row, -1));
        try {
          EquipamentoDataServices.remove(eq.getId());

        } catch (BusinessException ex) {
          MessageView.showWarning(ex.getMessage(),
              "Falha ao remover equipamento.");
        } catch (Exception e1) {
View Full Code Here

  private EquipamentoNewAction() {
    super("Equipamento", IconFactory.createEquipamento24());
  }

  public void actionPerformed(ActionEvent e) {
    Equipamento equipamento = new Equipamento();
    Main.getInstance().buildPanel(EquipamentoForm.getInstance(equipamento));
  }
View Full Code Here

//      List<Equipamento> l = EquipamentoDataServices.getLivres(t);
//      EquipamentoDataServices.closeStation(l.get(0));
    }   
   
    public void testTemVisita() throws Exception {
        Equipamento eq = EquipamentoDataServices.getList().get(0);
      assertTrue(EquipamentoDataServices.temVisita(eq));
    }
View Full Code Here

        Equipamento eq = EquipamentoDataServices.getList().get(0);
      assertTrue(EquipamentoDataServices.temVisita(eq));
    }
 
  public void testGetRotulo() throws Exception {
    Equipamento eq = EquipamentoDataServices.getRotulo("m1");
    assertNotNull(eq);
  }
View Full Code Here

          visita.setTelecentro(UserContext.getInstance()
              .getTelecentro());

          // Se n�o for lista de espera, seta o equipamento,
          // sen�o, seta null no equipamento
          Equipamento eq = (Equipamento) equipamentoCombo
              .getSelectedItem();
          if (eq != null) {
            if (eq.getId() != -1) {
              visita.setEquipamento(eq);
            } else {
              visita.setEquipamento(null);
            }
          }
View Full Code Here

          items = EquipamentoDataServices.getLivres(telecentro);
        } else {
          items = EquipamentoDataServices.getList(telecentro);
        }
       
        Equipamento e = new Equipamento();
        e.setRotulo("Lista de Espera");
        e.setId(new Long(-1));
        items.add(e);       
      } else {
        items = EquipamentoDataServices.getList(telecentro);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of br.com.procempa.modus.entity.Equipamento

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.