/** The class name of the look and feel. */
private String lookAndFeel;
+ /** X coordinate of the main window. */
+ private int mainWindowX = -1;
+
+ /** Y coordinate of the main window. */
+ private int mainWindowY = -1;
+
+ /** Width of the main window. */
+ private int mainWindowWidth = -1;
+
+ /** Height of the main window. */
+ private int mainWindowHeight = -1;
+
/**
* Creates a new swing interface.
*
initDialogs();
mainWindow = new MainWindow(this);
mainWindow.setAdvancedMode(advancedMode);
+ if ((mainWindowX != -1) && (mainWindowY != -1) && (mainWindowWidth != -1) && (mainWindowHeight != -1)) {
+ mainWindow.setLocation(mainWindowX, mainWindowY);
+ mainWindow.setSize(mainWindowWidth, mainWindowHeight);
+ }
logWindow = new LogWindow();
}
if (configProperties.containsKey("language")) {
I18n.setLocale(new Locale(configProperties.getProperty("language")));
}
+ if (configProperties.containsKey("mainWindowX")) {
+ mainWindowX = Integer.valueOf(configProperties.getProperty("mainWindowX"));
+ }
+ if (configProperties.containsKey("mainWindowY")) {
+ mainWindowY = Integer.valueOf(configProperties.getProperty("mainWindowY"));
+ }
+ if (configProperties.containsKey("mainWindowWidth")) {
+ mainWindowWidth = Integer.valueOf(configProperties.getProperty("mainWindowWidth"));
+ }
+ if (configProperties.containsKey("mainWindowHeight")) {
+ mainWindowHeight = Integer.valueOf(configProperties.getProperty("mainWindowHeight"));
+ }
}
/**
configProperties.setProperty("lookAndFeel", lookAndFeel);
}
configProperties.setProperty("language", I18n.getLocale().getLanguage());
+ configProperties.setProperty("mainWindowX", String.valueOf(mainWindowX));
+ configProperties.setProperty("mainWindowY", String.valueOf(mainWindowY));
+ configProperties.setProperty("mainWindowWidth", String.valueOf(mainWindowWidth));
+ configProperties.setProperty("mainWindowHeight", String.valueOf(mainWindowHeight));
FileOutputStream configOutputStream = null;
try {
configOutputStream = new FileOutputStream(configFile);
private void quit() {
/* TODO - ask */
core.stop();
+ mainWindowX = mainWindow.getX();
+ mainWindowY = mainWindow.getY();
+ mainWindowWidth = mainWindow.getWidth();
+ mainWindowHeight = mainWindow.getHeight();
saveConfig();
System.exit(0);
}
nodeDisconnect(node);
}
};
-// nodeDisconnectActions.add(nodeDisconnectAction);
+ // nodeDisconnectActions.add(nodeDisconnectAction);
nodeDisconnectActionNodes.put(nodeDisconnectAction, node);
nodeNodeDisconnectActions.put(node, nodeDisconnectAction);
}