|
@@ -43,6 +43,7 @@ public class SummaryPanel extends JPanel {
|
|
|
ObservableListener<CollatedDurationPanel, RecipeCard> durationListener;
|
|
ObservableListener<CollatedDurationPanel, RecipeCard> durationListener;
|
|
|
ObservableListener<JPanel, RecipeCard> childListener;
|
|
ObservableListener<JPanel, RecipeCard> childListener;
|
|
|
|
|
|
|
|
|
|
+ ImagePanel panelPhoto;
|
|
|
JTextField txtTitle;
|
|
JTextField txtTitle;
|
|
|
JTextArea txaDescription;
|
|
JTextArea txaDescription;
|
|
|
TagInputPanel panelTags;
|
|
TagInputPanel panelTags;
|
|
@@ -151,7 +152,7 @@ public class SummaryPanel extends JPanel {
|
|
|
gbl_panel.rowWeights = new double[]{0.0, 0.0, 1.0, Double.MIN_VALUE};
|
|
gbl_panel.rowWeights = new double[]{0.0, 0.0, 1.0, Double.MIN_VALUE};
|
|
|
panel.setLayout(gbl_panel);
|
|
panel.setLayout(gbl_panel);
|
|
|
|
|
|
|
|
- JPanel panelPhoto = new ImagePanel();
|
|
|
|
|
|
|
+ panelPhoto = new ImagePanel();
|
|
|
GridBagConstraints gbc_panelPhoto = new GridBagConstraints();
|
|
GridBagConstraints gbc_panelPhoto = new GridBagConstraints();
|
|
|
gbc_panelPhoto.fill = GridBagConstraints.BOTH;
|
|
gbc_panelPhoto.fill = GridBagConstraints.BOTH;
|
|
|
gbc_panelPhoto.insets = new Insets(0, 0, 5, 0);
|
|
gbc_panelPhoto.insets = new Insets(0, 0, 5, 0);
|
|
@@ -209,6 +210,8 @@ public class SummaryPanel extends JPanel {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void setModel(final RecipeCard card) {
|
|
public void setModel(final RecipeCard card) {
|
|
|
|
|
+ // We need to always update the image
|
|
|
|
|
+ panelPhoto.setImage(card.getPhoto().orElse(null));
|
|
|
panelTags.setModel(card.getTags());
|
|
panelTags.setModel(card.getTags());
|
|
|
titleBinding.setModel(card);
|
|
titleBinding.setModel(card);
|
|
|
servingsBinding.setModel(card);
|
|
servingsBinding.setModel(card);
|