From: Erik V. <ev...@us...> - 2008-12-01 22:16:44
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21590/rails/ui/swing Modified Files: ORWindow.java Log Message: Window now remembers position and height between rounds. Index: ORWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORWindow.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ORWindow.java 21 Nov 2008 20:41:47 -0000 1.17 --- ORWindow.java 1 Dec 2008 21:31:55 -0000 1.18 *************** *** 31,34 **** --- 31,36 ---- private UpgradesPanel upgradePanel; private MessagePanel messagePanel; + + private Rectangle lastBounds; protected PossibleActions possibleActions = PossibleActions.getInstance(); *************** *** 163,166 **** --- 165,173 ---- orPanel.recreate(or); pack(); + if (lastBounds != null) { + Rectangle newBounds = getBounds(); + lastBounds.x = newBounds.x; + setBounds (lastBounds); + } setVisible(true); requestFocus(); *************** *** 177,180 **** --- 184,188 ---- */ public void finish() { + lastBounds = getBounds(); orPanel.finish(); upgradePanel.finish(); |