Package org.jwildfire.base

Examples of org.jwildfire.base.WindowPrefs


      }
    });

    frame.setTitle(DFLT_TITLE);
    frame.setBounds(100, 100, 450, 300);
    WindowPrefs wPrefs = Prefs.getPrefs().getWindowPrefs(WindowPrefs.WINDOW_TINA_PREVIEW);
    frame.setLocation(wPrefs.getLeft(), wPrefs.getTop());
    frame.setSize(wPrefs.getWidth(450), wPrefs.getHeight(300));

    frame.setAlwaysOnTop(true);
    frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
    frame.addComponentListener(new java.awt.event.ComponentAdapter() {
      public void componentResized(java.awt.event.ComponentEvent e) {
View Full Code Here


  protected void onClose(boolean doNotify) {
    try {
      Dimension size = frame.getSize();
      Point pos = frame.getLocation();
      WindowPrefs wPrefs = Prefs.getPrefs().getWindowPrefs(WindowPrefs.WINDOW_TINA_PREVIEW);
      wPrefs.setLeft(pos.x);
      wPrefs.setTop(pos.y);
      wPrefs.setWidth(size.width);
      wPrefs.setHeight(size.height);
      if (doNotify)
        getController().notifyWindowIsClosing();
    }
    catch (Exception ex) {
      ex.printStackTrace();
View Full Code Here

   * @return javax.swing.JInternalFrame 
   */
  private JInternalFrame getTinaInternalFrame() {
    if (tinaInternalFrame == null) {
      tinaInternalFrame = new TinaInternalFrame();
      WindowPrefs wPrefs = prefs.getWindowPrefs(WindowPrefs.WINDOW_TINA);
      tinaInternalFrame.setLocation(wPrefs.getLeft(), wPrefs.getTop());
      tinaInternalFrame.setSize(wPrefs.getWidth(1188), wPrefs.getHeight(740));
      tinaInternalFrame
          .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() {
            public void internalFrameDeactivated(
                javax.swing.event.InternalFrameEvent e) {
              tinaInternalFrame_internalFrameDeactivated(e);
            }

            public void internalFrameClosed(
                javax.swing.event.InternalFrameEvent e) {
              tinaInternalFrame_internalFrameClosed(e);
            }
          });
      tinaInternalFrame.addComponentListener(new java.awt.event.ComponentAdapter() {
        public void componentResized(java.awt.event.ComponentEvent e) {
          tinaController.refreshFlameImage(false);
        }
      });
      try {
        tinaInternalFrame.setSelected(true);
        tinaInternalFrame.setMaximum(wPrefs.isMaximized());
      }
      catch (Exception e) {
        // e.printStackTrace();
      }
    }
View Full Code Here

    if (jFrame == null) {
      prefs = Prefs.getPrefs();
      jFrame = new JFrame();
      jFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
      jFrame.setJMenuBar(getMainJMenuBar());
      WindowPrefs wPrefs = prefs.getWindowPrefs(WindowPrefs.WINDOW_DESKTOP);
      jFrame.setLocation(wPrefs.getLeft(), wPrefs.getTop());
      jFrame.setSize(wPrefs.getWidth(1240), wPrefs.getHeight(800));
      jFrame.setContentPane(getJContentPane());
      jFrame.setTitle(Tools.APP_TITLE + " " + Tools.APP_VERSION + (prefs.isTinaUseExperimentalOpenClCode() ? " (with OpenCL)" : ""));

      jFrame.addWindowListener(new WindowAdapter() {
View Full Code Here

    }

    {
      Dimension size = jFrame.getSize();
      Point pos = jFrame.getLocation();
      WindowPrefs wPrefs = prefs.getWindowPrefs(WindowPrefs.WINDOW_DESKTOP);
      wPrefs.setLeft(pos.x);
      wPrefs.setTop(pos.y);
      wPrefs.setWidth(size.width);
      wPrefs.setHeight(size.height);
    }
    if (tinaInternalFrame != null && tinaInternalFrame.isVisible()) {
      Dimension size = tinaInternalFrame.getSize();
      Point pos = tinaInternalFrame.getLocation();
      WindowPrefs wPrefs = prefs.getWindowPrefs(WindowPrefs.WINDOW_TINA);
      wPrefs.setLeft(pos.x);
      wPrefs.setTop(pos.y);
      wPrefs.setWidth(size.width);
      wPrefs.setHeight(size.height);
      wPrefs.setMaximized(tinaInternalFrame.isMaximum());
    }
    try {
      prefs.saveToFromFile();
    }
    catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.jwildfire.base.WindowPrefs

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.