Package org.aavso.tools.vstar.util.property

Examples of org.aavso.tools.vstar.util.property.ApplicationProperties


   * Create and display the main window.
   */
  private static void createAndShowGUI() {
    try {
      MainFrame frame = new MainFrame();
      final ApplicationProperties appProps = new ApplicationProperties(
          frame);

      frame.setSize(appProps.getMainWdwWidth(), appProps
          .getMainWdwHeight());
      frame.setLocation(appProps.getMainWdwUpperLeftX(), appProps
          .getMainWdwUpperLeftY());

      frame.setVisible(true);

      // We create a shutdown task rather than a window listener
      // to store application properties, otherwise on the Mac, we
      // would also have to trap the VStar (vs File) menu Quit item.
      // This shutdown task should work uniformly across operating
      // systems. The frame stored within appProps cannot be GC'd
      // until appProps is, so its state will still be valid at the
      // time run() is invoked.
      Runnable shutdownTask = new Runnable() {
        public void run() {
          appProps.update();
        }
      };

      Runtime.getRuntime().addShutdownHook(
          new Thread(shutdownTask, "Application shutdown task"));
View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.util.property.ApplicationProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.