final fixes for 0082, full merge of simon's code

This commit is contained in:
benfry
2005-04-06 17:23:11 +00:00
parent 42d2a24d8e
commit 8d3cf6258c
7 changed files with 82 additions and 7 deletions

View File

@@ -253,7 +253,7 @@ public class PdeEditor extends JFrame
// figure out window placement
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
boolean windowPositionInvalid = false;
boolean windowPositionValid = true;
if (PdePreferences.get("last.screen.height") != null) {
// if screen size has changed, the window coordinates no longer
@@ -262,13 +262,20 @@ public class PdeEditor extends JFrame
int screenH = PdePreferences.getInteger("last.screen.height");
if ((screen.width != screenW) || (screen.height != screenH)) {
windowPositionInvalid = true;
windowPositionValid = false;
}
int windowX = PdePreferences.getInteger("last.window.x");
int windowY = PdePreferences.getInteger("last.window.y");
if ((windowX < 0) || (windowY < 0) ||
(windowX > screenW) || (windowY > screenH)) {
windowPositionValid = false;
}
} else {
windowPositionInvalid = true;
windowPositionValid = false;
}
if (windowPositionInvalid) {
if (!windowPositionValid) {
//System.out.println("using default size");
int windowH = PdePreferences.getInteger("default.window.height");
int windowW = PdePreferences.getInteger("default.window.width");