|
@@ -36,21 +36,14 @@ import com.google.gson.JsonElement;
|
|
import com.google.gson.JsonIOException;
|
|
import com.google.gson.JsonIOException;
|
|
import com.google.gson.JsonParser;
|
|
import com.google.gson.JsonParser;
|
|
import com.google.gson.JsonSyntaxException;
|
|
import com.google.gson.JsonSyntaxException;
|
|
-import com.google.gson.annotations.Expose;
|
|
|
|
-import com.google.gson.annotations.SerializedName;
|
|
|
|
|
|
|
|
import addOns.JSON.HolonElementSketch;
|
|
import addOns.JSON.HolonElementSketch;
|
|
import api.AddOn;
|
|
import api.AddOn;
|
|
import classes.AbstractCanvasObject;
|
|
import classes.AbstractCanvasObject;
|
|
-import classes.Constrain;
|
|
|
|
import classes.GroupNode;
|
|
import classes.GroupNode;
|
|
-import classes.Flexibility;
|
|
|
|
import classes.HolonElement;
|
|
import classes.HolonElement;
|
|
-import classes.HolonElement.Priority;
|
|
|
|
import classes.HolonObject;
|
|
import classes.HolonObject;
|
|
-import classes.HolonSwitch;
|
|
|
|
import ui.controller.Control;
|
|
import ui.controller.Control;
|
|
-import ui.model.Model;
|
|
|
|
import ui.view.RandomPriotity;
|
|
import ui.view.RandomPriotity;
|
|
import utility.Random;
|
|
import utility.Random;
|
|
import utility.Util;
|
|
import utility.Util;
|
|
@@ -119,9 +112,18 @@ public class Randomizer implements AddOn {
|
|
checkboxList.clear();
|
|
checkboxList.clear();
|
|
|
|
|
|
|
|
|
|
|
|
+ int lineSpace = 20;
|
|
JPanel headPanel = new JPanel();
|
|
JPanel headPanel = new JPanel();
|
|
headPanel.setLayout(new BoxLayout(headPanel, BoxLayout.LINE_AXIS));
|
|
headPanel.setLayout(new BoxLayout(headPanel, BoxLayout.LINE_AXIS));
|
|
headPanel.add(new JLabel("FILTER"));
|
|
headPanel.add(new JLabel("FILTER"));
|
|
|
|
+ JButton updateButton = new JButton();
|
|
|
|
+ updateButton.setIcon(new ImageIcon(Util.loadImage("Images/replace.png", 15, 15)));
|
|
|
|
+ updateButton.addActionListener(action -> {
|
|
|
|
+ this.updateFilterList();
|
|
|
|
+ content.updateUI();
|
|
|
|
+ });
|
|
|
|
+ updateButton.setToolTipText("Manuel updates the filter list with all canvas objects.");
|
|
|
|
+ headPanel.add(updateButton);
|
|
headPanel.add(Box.createHorizontalGlue());
|
|
headPanel.add(Box.createHorizontalGlue());
|
|
headPanel.add(new JLabel("SelectAll"));
|
|
headPanel.add(new JLabel("SelectAll"));
|
|
JCheckBox selectAllCheckbox = new JCheckBox();
|
|
JCheckBox selectAllCheckbox = new JCheckBox();
|
|
@@ -132,7 +134,6 @@ public class Randomizer implements AddOn {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- int lineSpace = 20;
|
|
|
|
for(HolonObject hObject: objectMap.keySet().stream().sorted(Comparator.comparing(ob -> ob.getName())).collect(Collectors.toList())) {
|
|
for(HolonObject hObject: objectMap.keySet().stream().sorted(Comparator.comparing(ob -> ob.getName())).collect(Collectors.toList())) {
|
|
|
|
|
|
JPanel entryPanel = new JPanel();
|
|
JPanel entryPanel = new JPanel();
|
|
@@ -261,7 +262,8 @@ public class Randomizer implements AddOn {
|
|
|
|
|
|
public void updateFilterList() {
|
|
public void updateFilterList() {
|
|
objectMap.clear();
|
|
objectMap.clear();
|
|
- fillObjectMap(control.getModel().getObjectsOnCanvas());
|
|
+ if(control != null)
|
|
|
|
+ fillObjectMap(control.getModel().getObjectsOnCanvas());
|
|
|
|
|
|
this.fillTablePanel();
|
|
this.fillTablePanel();
|
|
}
|
|
}
|