|
|
@ -58,7 +58,10 @@ public class FrmMain extends JFrame { |
|
|
|
private JButton btnLoadImg; |
|
|
|
public static JLabel lblRecipeTitle; |
|
|
|
private static DefaultListModel recipesListModel; |
|
|
|
|
|
|
|
private JLabel imgRecipe; |
|
|
|
private JFileChooser fcImg; |
|
|
|
private ImageIcon imgDefaultRecipe; |
|
|
|
private JList recipesList; |
|
|
|
|
|
|
|
void DeactivateAddMenu() { |
|
|
|
btnCancel.setVisible(false); |
|
|
@ -71,6 +74,7 @@ public class FrmMain extends JFrame { |
|
|
|
txtIngredients.setEditable(false); |
|
|
|
txtTags.setEditable(false); |
|
|
|
lblRecipeTitle.setVisible(true); |
|
|
|
recipesList.setEnabled(true); |
|
|
|
} |
|
|
|
|
|
|
|
void ActivateAddMenu() { |
|
|
@ -84,6 +88,8 @@ public class FrmMain extends JFrame { |
|
|
|
txtIngredients.setEditable(true); |
|
|
|
txtTags.setEditable(true); |
|
|
|
lblRecipeTitle.setVisible(false); |
|
|
|
recipesList.setEnabled(false); |
|
|
|
|
|
|
|
|
|
|
|
//czyszczenie pól formularza |
|
|
|
txtDescription.setText(""); |
|
|
@ -145,7 +151,7 @@ public class FrmMain extends JFrame { |
|
|
|
panel.add(btnSearch, gbc_btnSearch); |
|
|
|
|
|
|
|
recipesListModel = new DefaultListModel(); |
|
|
|
final JList recipesList = new JList(recipesListModel); |
|
|
|
recipesList = new JList(recipesListModel); |
|
|
|
recipesList.addListSelectionListener(new ListSelectionListener() { |
|
|
|
public void valueChanged(ListSelectionEvent e){ |
|
|
|
if(recipesList.getSelectedIndex() != -1) |
|
|
|