private void backButtonActionPerformed(java.awt.event.ActionEvent evt) { AdminRoom adminRoom = new AdminRoom(dataE); // SelectRooms rooms = new SelectRooms(); // rooms.setVisible(true); adminRoom.setVisible(true); this.setVisible(false); model.setArrayOfCards(WorkCard.getWork().getArrOfCards()); searchFrame.setSearchRequest(null); }
private void deleteButtonActionPerfomed(ActionEvent evt) { try { if ((jTable1.getSelectedRow() >= 0) && (jTable1.getSelectedRow() < WorkCard.getWork().getOfCountCards())) { WorkCard.getWork() .deleteCard( WorkCard.getWork().getArrOfCards().get(jTable1.getSelectedRow()).getIcon(), WorkCard.getWork().getArrOfCards().get(jTable1.getSelectedRow()).getColor()); if (searchFrame.getSearchRequest() != null) { Search search = new CardSearch(); model.setArrayOfCards( (ArrayList<Card>) search.regularSearch(searchFrame.getSearchRequest())); } } } catch (NotFoundException e) { log.debug(e.getMessage()); } jTable1.revalidate(); jTable1.repaint(); }
private void addButtonActionPerfomed(ActionEvent evt) { try { WorkCard.getWork().addCard(Integer.parseInt(tficon.getText()), tfcolor.getText()); if (searchFrame.getSearchRequest() != null) { Search search = new CardSearch(); model.setArrayOfCards( (ArrayList<Card>) search.regularSearch(searchFrame.getSearchRequest())); } } catch (NotFoundException ex) { log.debug(ex.getMessage()); } tficon.setText(""); tfcolor.setText(""); jTable1.revalidate(); jTable1.repaint(); }
private void clearButtonActionPerformed(ActionEvent evt) { model.setArrayOfCards(WorkCard.getWork().getArrOfCards()); searchFrame.setSearchRequest(null); jTable1.revalidate(); jTable1.repaint(); }