@@ -47,6 +47,18 @@ public class Model {
this.categories = categories;
}
+ public String toStringCat() {
+ String text = "";
+ for (int i = 0; i < categories.size(); i++) {
+ if (text == "") {
+ text = categories.get(i).getName();
+ } else {
+ text = text + ", " + categories.get(i).getName();
+ }
+ return text;
+
/**
* @return the objectsOnCanvas
*/
@@ -255,7 +255,6 @@ public class GUI implements CategoryListener {
panel.add(toolBar);
toolBar.add(comboBox);
comboBox.setModel(new DefaultComboBoxModel(new String[] { "Category", "Object", "Transformer", "Switch" }));
-
// Add Button
btnAdd.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {