1 package org.netbeans.modules.tasklist.timerwin; 2 3 import java.awt.Point ; 4 import java.awt.Toolkit ; 5 import java.util.prefs.Preferences ; 6 import org.openide.modules.ModuleInstall; 7 8 13 public class TimerWindowModuleInstall extends ModuleInstall { 14 15 public static Point WINDOW_POSITION = new Point (); 16 17 20 public TimerWindowModuleInstall() { 21 } 22 23 public void restored() { 24 java.util.prefs.Preferences p = 25 Preferences.userNodeForPackage(TimerWindowModuleInstall.class); 26 WINDOW_POSITION.x = p.getInt( 27 "x", Toolkit.getDefaultToolkit().getScreenSize().width - 300); 28 WINDOW_POSITION.y = p.getInt("y", 0); 29 } 30 31 34 public static void writeSettings() { 35 java.util.prefs.Preferences p = 36 Preferences.userNodeForPackage(TimerWindowModuleInstall.class); 37 p.putInt("x", WINDOW_POSITION.x); 38 p.putInt("y", WINDOW_POSITION.y); 39 } 40 } 41 | Popular Tags |