|
|
@@ -20,6 +20,7 @@ import org.leumasjaffe.recipe.model.Element;
|
|
|
import org.leumasjaffe.recipe.model.RecipeCard;
|
|
|
import org.leumasjaffe.recipe.view.CollatedDurationPanel;
|
|
|
import org.leumasjaffe.recipe.view.ImagePanel;
|
|
|
+import org.leumasjaffe.recipe.view.TagInputPanel;
|
|
|
|
|
|
import lombok.AccessLevel;
|
|
|
import lombok.experimental.FieldDefaults;
|
|
|
@@ -49,9 +50,9 @@ public class SummaryPanel extends JPanel {
|
|
|
|
|
|
GridBagLayout gridBagLayout = new GridBagLayout();
|
|
|
gridBagLayout.columnWidths = new int[]{0, 0, 0};
|
|
|
- gridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0};
|
|
|
+ gridBagLayout.rowHeights = new int[]{0, 0, 0, 0};
|
|
|
gridBagLayout.columnWeights = new double[]{1.0, 0.0, Double.MIN_VALUE};
|
|
|
- gridBagLayout.rowWeights = new double[]{0.0, 1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gridBagLayout.rowWeights = new double[]{0.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
setLayout(gridBagLayout);
|
|
|
|
|
|
JPanel panelHeader = new JPanel();
|
|
|
@@ -115,7 +116,7 @@ public class SummaryPanel extends JPanel {
|
|
|
|
|
|
JPanel panelIngredients = new JPanel();
|
|
|
GridBagConstraints gbc_panelIngredients = new GridBagConstraints();
|
|
|
- gbc_panelIngredients.insets = new Insets(0, 0, 5, 5);
|
|
|
+ gbc_panelIngredients.insets = new Insets(0, 0, 0, 5);
|
|
|
gbc_panelIngredients.fill = GridBagConstraints.BOTH;
|
|
|
gbc_panelIngredients.gridx = 0;
|
|
|
gbc_panelIngredients.gridy = 2;
|
|
|
@@ -125,16 +126,15 @@ public class SummaryPanel extends JPanel {
|
|
|
JPanel panel = new JPanel();
|
|
|
GridBagConstraints gbc_panel = new GridBagConstraints();
|
|
|
gbc_panel.gridheight = 2;
|
|
|
- gbc_panel.insets = new Insets(0, 0, 5, 0);
|
|
|
gbc_panel.fill = GridBagConstraints.BOTH;
|
|
|
gbc_panel.gridx = 1;
|
|
|
gbc_panel.gridy = 1;
|
|
|
add(panel, gbc_panel);
|
|
|
GridBagLayout gbl_panel = new GridBagLayout();
|
|
|
gbl_panel.columnWidths = new int[]{0, 0};
|
|
|
- gbl_panel.rowHeights = new int[]{0, 0, 0};
|
|
|
+ gbl_panel.rowHeights = new int[]{0, 0, 0, 0};
|
|
|
gbl_panel.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
- gbl_panel.rowWeights = new double[]{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);
|
|
|
|
|
|
JPanel panelPhoto = new ImagePanel();
|
|
|
@@ -145,14 +145,21 @@ public class SummaryPanel extends JPanel {
|
|
|
gbc_panelPhoto.gridy = 0;
|
|
|
panel.add(panelPhoto, gbc_panelPhoto);
|
|
|
|
|
|
+ JPanel panelTags = new TagInputPanel();
|
|
|
+ GridBagConstraints gbc_panelTags = new GridBagConstraints();
|
|
|
+ gbc_panelTags.insets = new Insets(0, 0, 5, 0);
|
|
|
+ gbc_panelTags.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panelTags.gridx = 0;
|
|
|
+ gbc_panelTags.gridy = 1;
|
|
|
+ panel.add(panelTags, gbc_panelTags);
|
|
|
+
|
|
|
txaDescription = new JTextArea(5, 20);
|
|
|
txaDescription.setWrapStyleWord(true);
|
|
|
txaDescription.setLineWrap(true);
|
|
|
GridBagConstraints gbc_txaDescription = new GridBagConstraints();
|
|
|
- gbc_txaDescription.insets = new Insets(0, 0, 5, 0);
|
|
|
gbc_txaDescription.fill = GridBagConstraints.BOTH;
|
|
|
gbc_txaDescription.gridx = 0;
|
|
|
- gbc_txaDescription.gridy = 1;
|
|
|
+ gbc_txaDescription.gridy = 2;
|
|
|
panel.add(txaDescription, gbc_txaDescription);
|
|
|
|
|
|
titleBinding = new TextBinding<>(txtTitle,
|