private void GvaliderEntreeActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_GvaliderEntreeActionPerformed SwingUtils.emptyList(GlisteEntree); GquantiteEntree.setText("1"); String nomEntree = GnomEntree.getText(); menu.validerEntree(nomEntree); GnomEntree.setText(""); } // GEN-LAST:event_GvaliderEntreeActionPerformed
private void BdelIngEntreeActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_BdelIngEntreeActionPerformed try { String nom = GlisteEntree.getSelectedValue().toString(); SwingUtils.removeToList(GlisteEntree, nom); String nomEntree = GnomEntree.getText(); menu.delIngredientEntree(nomEntree, nom); } catch (Exception ex) { return; } } // GEN-LAST:event_BdelIngEntreeActionPerformed
private void BaddIngEntreeActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_BaddIngEntreeActionPerformed String nom = GingrédientsEntree.getSelectedItem().toString(); SwingUtils.addToList(GlisteEntree, nom); int quantite = Integer.parseInt(GquantiteEntree.getText()); String nomEntree = GnomEntree.getText(); boolean exist = menu.addIngredientEntree(nomEntree, nom, quantite); if (!exist) { boolean chaud = true; if (GfroidEntree.isSelected()) { chaud = false; } menu.addEntree(nomEntree, chaud); menu.addIngredientEntree(nomEntree, nom, quantite); } } // GEN-LAST:event_BaddIngEntreeActionPerformed