private void jBFecharActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jBFecharActionPerformed // TODO add your handling code here: this.setVisible(false); timerPCP.start(); timer.stop(); } // GEN-LAST:event_jBFecharActionPerformed
private void jBFecharActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jBFecharActionPerformed timerTelaExclusao.stop(); timer.start(); this.setVisible(false); atualizar.doClick(); } // GEN-LAST:event_jBFecharActionPerformed
/* * executado ao clicar no botao excluir */ private void jBExcluirLoteActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jBExcluirLoteActionPerformed timerTelaExclusao.stop(); this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); excluir(); this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); timerTelaExclusao.start(); jBAtualizar.doClick(); } // GEN-LAST:event_jBExcluirLoteActionPerformed
private void tabelaMouseClicked( java.awt.event.MouseEvent evt) { // GEN-FIRST:event_tabelaMouseClicked if (evt.getClickCount() == 2) { timer.stop(); JobLote job = modelo.getJob(tabela.convertRowIndexToModel(tabela.getSelectedRow())); ViewDGQPCP tela = new ViewDGQPCP(null, true, job, timer); tela.setVisible(true); } } // GEN-LAST:event_tabelaMouseClicked
private void jBFecharKeyTyped(java.awt.event.KeyEvent evt) { // GEN-FIRST:event_jBFecharKeyTyped if (evt.getKeyChar() == KeyEvent.VK_ENTER) { if (evt.getSource() == jBFechar) { this.setVisible(false); timerPCP.start(); timer.stop(); } } } // GEN-LAST:event_jBFecharKeyTyped
private void jBFecharKeyTyped(java.awt.event.KeyEvent evt) { // GEN-FIRST:event_jBFecharKeyTyped if (evt.getKeyChar() == KeyEvent.VK_ENTER) { if (evt.getSource() == jBFechar) { timerTelaExclusao.stop(); timer.start(); this.setVisible(false); atualizar.doClick(); } } } // GEN-LAST:event_jBFecharKeyTyped
private void tabelaKeyTyped(java.awt.event.KeyEvent evt) { // GEN-FIRST:event_tabelaKeyTyped if (evt.getKeyChar() == KeyEvent.VK_ENTER) { if (evt.getSource() == tabela) { timer.stop(); JobLote job = modelo.getJob(tabela.convertRowIndexToModel(tabela.getSelectedRow())); ViewDGQPCP tela = new ViewDGQPCP(null, true, job, timer); tela.setVisible(true); } } } // GEN-LAST:event_tabelaKeyTyped
private void tabelaKeyTyped(java.awt.event.KeyEvent evt) { // GEN-FIRST:event_tabelaKeyTyped if (evt.getKeyChar() == KeyEvent.VK_ENTER) { if (evt.getSource() == tabela) { int indice = tabela.getSelectedRow(); if (indice != -1) { JobLote dados = modelo.getJob(tabela.convertRowIndexToModel(tabela.getSelectedRow())); timerTelaExclusao.stop(); ExclusaoLoteView tela = new ExclusaoLoteView(null, true, dados, timerTelaExclusao, jBAtualizar); tela.setVisible(true); } } } } // GEN-LAST:event_tabelaKeyTyped
private void tabelaMouseClicked( java.awt.event.MouseEvent evt) { // GEN-FIRST:event_tabelaMouseClicked ajustaTabelaParaMobile(); if (evt.getClickCount() == 2 && tabela.getSelectedRow() != -1) { int indice = tabela.getSelectedRow(); if (indice != -1) { JobLote dados = modelo.getJob(tabela.convertRowIndexToModel(tabela.getSelectedRow())); timerTelaExclusao.stop(); ExclusaoLoteView tela = new ExclusaoLoteView(null, true, dados, timerTelaExclusao, jBAtualizar); tela.setVisible(true); } } } // GEN-LAST:event_tabelaMouseClicked
private void jButtonRetrabalhoActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButtonRetrabalhoActionPerformed this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); int contador = 0; listaJobLoteSelecionadoRetrabado = new ArrayList<JobLote>(); for (int i = 0; i <= modelo.getRowCount() - 1; i++) { JobLote linha = modelo.getJob(i); if (linha.getStatus() == true) { // se estiver selecionado adiciona na lista listaJobLoteSelecionadoRetrabado.add(linha); contador++; } } /*Se houver mais de um joblote selecionado avisa que só é possivel selecionar um para lançar retrabalho*/ if (contador < 1) { this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); JOptionPane.showMessageDialog(null, "Selecione um lote!"); } else if (contador > 1) { this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); JOptionPane.showMessageDialog(null, "Só é permitido selecionar um Lote!"); // desmarca tudo for (int i = 0; i <= modelo.getRowCount() - 1; i++) { modelo.setValueAt(false, tabela.convertRowIndexToModel(i), 0); } } else { timerTelaExclusao.stop(); JobLote lote = listaJobLoteSelecionadoRetrabado.get(0); SistemaDao2 dao = new SistemaDao2(); JobProtheus job = dao.retornaJob(lote); if (job == null) { JOptionPane.showMessageDialog(null, "Job não encontrado no sistema!"); } else { boolean noturno = Principal.retornaTurnoSetorJobSelecionado(lote.getSetor().trim()); boolean temTempoPadrao = Principal.getPossuiTempoPadrao(lote.getSetor().trim()); LoteRejeitadoView tela = new LoteRejeitadoView( null, true, job, lote, job.getQuantidadeCompleta(), modelo, tabela, usuario, timer, setor, noturno, temTempoPadrao, "retrabalho", jBAtualizar); this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); tela.setVisible(true); } } } // GEN-LAST:event_jButtonRetrabalhoActionPerformed