Changeset 701


Ignore:
Timestamp:
Mar 18, 2013, 1:44:07 AM (12 years ago)
Author:
alloc
Message:

AEI2 0.99u:

  • Saving window sizes and divider locations
Location:
AE/installer2/src/net/oni2/aeinstaller
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • AE/installer2/src/net/oni2/aeinstaller/AEInstaller.properties

    r699 r701  
    11appname=AE Installer 2
    2 appversion=0.99t
     2appversion=0.99u
  • AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java

    r699 r701  
    138138                scrollMods.setViewportView(tblMods);
    139139
    140                 contents.setDividerLocation(550);
     140                contents.setDividerLocation(Settings.getInstance().get("win_main_divloc", 550));
    141141                contents.setResizeWeight(0.4);
    142142
     
    165165                tblMods.addModSelectionListener(this);
    166166                tblMods.addDownloadSizeListener(this);
     167               
     168                setSize(Settings.getInstance().get("win_main_width", 950), Settings.getInstance().get("win_main_height", 600));
     169                setLocationRelativeTo(null);
    167170        }
    168171
     
    187190
    188191        private void saveLocalData() {
     192                Settings.getInstance().put("win_main_divloc", contents.getDividerLocation());
     193                Settings.getInstance().put("win_main_width", getWidth());
     194                Settings.getInstance().put("win_main_height", getHeight());
    189195                Settings.getInstance().serializeToFile();
    190196        }
  • AE/installer2/src/net/oni2/aeinstaller/gui/corepackages/CorePackagesDialog.java

    r658 r701  
    1212import javax.swing.KeyStroke;
    1313
     14import net.oni2.aeinstaller.backend.Settings;
    1415import net.oni2.aeinstaller.backend.packages.Package;
    1516import net.oni2.aeinstaller.gui.modtable.ModSelectionListener;
     
    5960                getRootPane().getActionMap().put("close", closeAction);
    6061
    61                 contents.setDividerLocation(550);
     62                contents.setDividerLocation(Settings.getInstance().get("win_core_divloc", 550));
    6263                contents.setResizeWeight(0.4);
    6364
     
    6869                tblTools.addModSelectionListener(this);
    6970
     71                setSize(Settings.getInstance().get("win_core_width", 950), Settings.getInstance().get("win_core_height", 600));
    7072                setLocationRelativeTo(null);
    7173        }
     
    7577                pkgInfo.updateInfo(mod);
    7678        }
     79
     80        @SuppressWarnings("unused")
     81        private void closing() {
     82                Settings.getInstance().put("win_core_divloc", contents.getDividerLocation());
     83                Settings.getInstance().put("win_core_width", getWidth());
     84                Settings.getInstance().put("win_core_height", getHeight());
     85        }
    7786}
  • AE/installer2/src/net/oni2/aeinstaller/gui/corepackages/CorePackagesDialog.yml

    r658 r701  
    77  iconImage: img.ae
    88  modalityType: applicationModal
     9  onWindowClosing: [closing]
    910  content:
    1011    - JSplitPane(name=contents, orientation=horizontalSplit, continuousLayout=true):
  • AE/installer2/src/net/oni2/aeinstaller/gui/toolmanager/ToolManager.java

    r699 r701  
    7373                getRootPane().getActionMap().put("close", closeAction);
    7474
    75                 contents.setDividerLocation(550);
     75                contents.setDividerLocation(Settings.getInstance().get("win_tools_divloc", 550));
    7676                contents.setResizeWeight(0.4);
    7777
     
    8787                                SwingJavaBuilder.getConfig().getResource("img.uninstall")));
    8888
     89                setSize(Settings.getInstance().get("win_tools_width", 950), Settings.getInstance().get("win_tools_height", 600));
    8990                setLocationRelativeTo(null);
    9091        }
     
    148149                }
    149150        }
     151       
     152        @SuppressWarnings("unused")
     153        private void closing() {
     154                Settings.getInstance().put("win_tools_divloc", contents.getDividerLocation());
     155                Settings.getInstance().put("win_tools_width", getWidth());
     156                Settings.getInstance().put("win_tools_height", getHeight());
     157        }
    150158}
  • AE/installer2/src/net/oni2/aeinstaller/gui/toolmanager/ToolManager.yml

    r658 r701  
    77  iconImage: img.ae
    88  modalityType: applicationModal
     9  onWindowClosing: [closing]
    910  content:
    1011    - JSplitPane(name=contents, orientation=horizontalSplit, continuousLayout=true):
Note: See TracChangeset for help on using the changeset viewer.