|
@@ -1698,19 +1698,19 @@ public class GUI<E> implements CategoryListener {
|
|
|
if (fileChooser.getFileFilter().equals(holonFilter)) {
|
|
|
if (!file.contains("."))
|
|
|
file += ".holon";
|
|
|
- if (!file.endsWith(".holon")) {
|
|
|
- String suffix = file.substring(file.lastIndexOf("."), file.length());
|
|
|
- String[] options = new String[] { "keep .holon", "use " + suffix };
|
|
|
+ }
|
|
|
+ if (!file.endsWith(".holon")) {
|
|
|
+ String suffix = file.substring(file.lastIndexOf("."), file.length());
|
|
|
+ String[] options = new String[] { "keep .holon", "use " + suffix };
|
|
|
|
|
|
- JLabel message = new JLabel(
|
|
|
- "Are you sure to use the extension \"" + suffix + "\" instead of \".holon\"?");
|
|
|
+ JLabel message = new JLabel(
|
|
|
+ "Are you sure to use the extension \"" + suffix + "\" instead of \".holon\"?");
|
|
|
|
|
|
- int response = JOptionPane.showOptionDialog(null, message, "", JOptionPane.DEFAULT_OPTION,
|
|
|
- JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
|
|
|
+ int response = JOptionPane.showOptionDialog(null, message, "", JOptionPane.DEFAULT_OPTION,
|
|
|
+ JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
|
|
|
|
|
|
- if (response == 0)
|
|
|
- file = file.replace(suffix, ".holon");
|
|
|
- }
|
|
|
+ if (response == 0)
|
|
|
+ file = file.replace(suffix, ".holon");
|
|
|
}
|
|
|
|
|
|
try {
|
|
@@ -1907,7 +1907,7 @@ public class GUI<E> implements CategoryListener {
|
|
|
tableHolonElementScrollPane.setBorder(null);
|
|
|
|
|
|
frmCyberPhysical.getContentPane().add(timePanel, BorderLayout.SOUTH);
|
|
|
-
|
|
|
+
|
|
|
try {
|
|
|
controller.loadAutoSave(System.getProperty("user.home") + "/HolonGUI/Category/Category.json");
|
|
|
} catch (IOException e1) {
|
|
@@ -1932,8 +1932,7 @@ public class GUI<E> implements CategoryListener {
|
|
|
setUpAutoSave(dest);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
canvasSP.addComponentListener(new ComponentAdapter() {
|
|
|
@Override
|
|
|
public void componentResized(ComponentEvent e) {
|