Ignore:
Timestamp:
Dec 31, 2012, 2:48:32 PM (12 years ago)
Author:
alloc
Message:
 
Location:
AE/installer2/src/net/oni2/aeinstaller/gui/settings
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • AE/installer2/src/net/oni2/aeinstaller/gui/settings/SettingsDialog.java

    r592 r593  
    99import javax.swing.JComboBox;
    1010import javax.swing.JComponent;
    11 import javax.swing.JFrame;
     11import javax.swing.JDialog;
    1212import javax.swing.JOptionPane;
    1313import javax.swing.KeyStroke;
    14 import javax.swing.SwingUtilities;
    1514import javax.swing.UIManager;
    1615
     
    2322 * @author Christian Illy
    2423 */
    25 public class SettingsDialog extends JFrame {
     24public class SettingsDialog extends JDialog {
    2625        private static final long serialVersionUID = -5719515325671846620L;
    2726
     
    3130        private BuildResult result = SwingJavaBuilder.build(this, bundle);
    3231
    33         private static SettingsDialog openWindow = null;
    34 
    3532        private JComboBox cmbLaF;
    3633        private LaFComboModel laFModel;
    3734
    3835        /**
    39          * Open the Settings dialog if not currently opened or brings the existing
    40          * one to front
     36         * Open the settings
    4137         */
    42         public static void openWindow() {
    43                 if (openWindow != null) {
    44                         SwingUtilities.invokeLater(new Runnable() {
    45 
    46                                 @Override
    47                                 public void run() {
    48                                         openWindow.toFront();
    49                                         openWindow.repaint();
    50                                 }
    51                         });
    52                 } else {
    53                         new SettingsDialog().setVisible(true);
    54                 }
    55         }
    56 
    57         private SettingsDialog() {
    58                 openWindow = this;
     38        public SettingsDialog() {
    5939                setMinimumSize(new Dimension(500, (int) getSize().getHeight() + 0));
    6040
     
    8565
    8666        @SuppressWarnings("unused")
    87         private void close() {
    88                 openWindow = null;
    89         }
    90 
    91         @SuppressWarnings("unused")
    9267        private boolean save() {
    9368                Settings set = Settings.getInstance();
  • AE/installer2/src/net/oni2/aeinstaller/gui/settings/SettingsDialog.yml

    r591 r593  
    1 JFrame:
     1JDialog:
    22  name: frame
    33  title: frame.title
     
    55  locationRelativeTo: null
    66  defaultCloseOperation: disposeOnClose
    7   onWindowClosed: [close]
    8   iconImage: img.kdt
     7  iconImage: img.ae
     8  modalityType: applicationModal
    99  content:
    1010    - JButton(name=btnOk, text=btnOk, onAction=[save,dispose])
Note: See TracChangeset for help on using the changeset viewer.