[Jarspy-commits] CVS: JarSpy/src/com/ociweb/jarspy/preferences DefaultJarSpyPreferences.java,1.5,1.6
Status: Beta
Brought to you by:
brown_j
|
From: Jeff B. <br...@us...> - 2002-10-26 15:33:47
|
Update of /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/preferences
In directory usw-pr-cvs1:/tmp/cvs-serv18003/src/com/ociweb/jarspy/preferences
Modified Files:
DefaultJarSpyPreferences.java J2SEJarSpyPreferences.java
JarSpyPreferences.java
Log Message:
added code to save window size as a preference
Index: DefaultJarSpyPreferences.java
===================================================================
RCS file: /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/preferences/DefaultJarSpyPreferences.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DefaultJarSpyPreferences.java 22 Aug 2002 23:09:08 -0000 1.5
--- DefaultJarSpyPreferences.java 26 Oct 2002 15:33:44 -0000 1.6
***************
*** 50,53 ****
--- 50,60 ----
/**
+ * the size of the main window
+ * @param size
+ */
+ public void saveMainWindowSize(Dimension size) {
+ }
+
+ /**
* @return the location of the divider in the main window
*/
Index: J2SEJarSpyPreferences.java
===================================================================
RCS file: /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/preferences/J2SEJarSpyPreferences.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** J2SEJarSpyPreferences.java 22 Aug 2002 23:09:09 -0000 1.4
--- J2SEJarSpyPreferences.java 26 Oct 2002 15:33:44 -0000 1.5
***************
*** 51,54 ****
--- 51,56 ----
public static final String PREFERRED_LOOK_AND_FEEL = "PreferredLookAndFeel";
public static final String MOST_RECENT_JAR = "MostRecentJar";
+ public static final String MAIN_WINDOW_WIDTH = "MainWindowWidth";
+ public static final String MAIN_WINDOW_HEIGHT = "MainWindowHeight";
/**
***************
*** 80,84 ****
*/
public Dimension getMainWindowSize() {
! return defaultPreferences.getMainWindowSize();
}
--- 82,108 ----
*/
public Dimension getMainWindowSize() {
! Dimension windowSize = defaultPreferences.getMainWindowSize();
!
! try {
! windowSize.width = prefs.getInt(MAIN_WINDOW_WIDTH, windowSize.width);
! windowSize.height = prefs.getInt(MAIN_WINDOW_HEIGHT, windowSize.height);
! } catch (Exception e) {
! }
!
! return windowSize;
! }
!
! /**
! * the size of the main window
! * @param size
! */
! public void saveMainWindowSize(Dimension size) {
! if(size != null) {
! try {
! prefs.putInt(MAIN_WINDOW_WIDTH, size.width);
! prefs.putInt(MAIN_WINDOW_HEIGHT, size.height);
! } catch (Exception e) {
! }
! }
}
Index: JarSpyPreferences.java
===================================================================
RCS file: /cvsroot/jarspy/JarSpy/src/com/ociweb/jarspy/preferences/JarSpyPreferences.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** JarSpyPreferences.java 22 Aug 2002 23:09:09 -0000 1.5
--- JarSpyPreferences.java 26 Oct 2002 15:33:44 -0000 1.6
***************
*** 44,47 ****
--- 44,53 ----
/**
+ * the size of the main window
+ * @param size
+ */
+ public void saveMainWindowSize(Dimension size);
+
+ /**
* @return the location of the divider in the main window
*/
|