|
|
@@ -5,7 +5,7 @@ import javax.swing.JPanel;
|
|
|
import org.jdesktop.swingx.VerticalLayout;
|
|
|
import org.leumasjaffe.observer.ObservableListener;
|
|
|
import org.leumasjaffe.observer.ObserverDispatch;
|
|
|
-import org.leumasjaffe.recipe.controller.ReplaceChildrenController;
|
|
|
+import org.leumasjaffe.recipe.controller.ReplaceChildrenAction;
|
|
|
import org.leumasjaffe.recipe.model.Element;
|
|
|
import org.leumasjaffe.recipe.model.Ingredient;
|
|
|
|
|
|
@@ -22,7 +22,7 @@ import java.awt.GridBagConstraints;
|
|
|
@SuppressWarnings("serial")
|
|
|
@FieldDefaults(level=AccessLevel.PRIVATE, makeFinal=true)
|
|
|
public class ElementPanel extends JPanel {
|
|
|
- ReplaceChildrenController<Element, Ingredient> controller;
|
|
|
+ ReplaceChildrenAction<Element, Ingredient> controller;
|
|
|
ObservableListener<JLabel, Element> nameListener;
|
|
|
ObservableListener<JPanel, Element> childListener;
|
|
|
|
|
|
@@ -30,7 +30,7 @@ public class ElementPanel extends JPanel {
|
|
|
@Getter(AccessLevel.PACKAGE) JPanel panelIngredients;
|
|
|
|
|
|
public ElementPanel(final Element element) {
|
|
|
- controller = new ReplaceChildrenController<>(
|
|
|
+ controller = new ReplaceChildrenAction<>(
|
|
|
Element::getIngredients, IngredientPanel::new);
|
|
|
GridBagLayout gridBagLayout = new GridBagLayout();
|
|
|
gridBagLayout.columnWidths = new int[]{0, 0, 0};
|