ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
(Generate patch)

Comparing AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java (file contents):
Revision 605 by alloc, Sun Jan 13 19:11:07 2013 UTC vs.
Revision 606 by alloc, Mon Jan 14 12:34:55 2013 UTC

# Line 82 | Line 82 | public class MainWin extends JFrame impl
82  
83          private JLabel lblSubmitterVal;
84          private JLabel lblCreatorVal;
85 +        private JLabel lblTypesVal;
86 +        private JLabel lblPlatformVal;
87          private HTMLLinkLabel lblDescriptionVal;
88  
89          private JButton btnInstall;
# Line 150 | Line 152 | public class MainWin extends JFrame impl
152  
153                  sorter.setRowFilter(new ModTableFilter(null));
154  
153                sorter.setSortable(2, false);
154
155                  List<RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>();
156 <                sortKeys.add(new RowSorter.SortKey(0, SortOrder.ASCENDING));
156 >                sortKeys.add(new RowSorter.SortKey(1, SortOrder.ASCENDING));
157                  sorter.setSortKeys(sortKeys);
158  
159                  for (int i = 0; i < model.getColumnCount(); i++) {
160                          model.setColumnConstraints(i, tblMods.getColumnModel().getColumn(i));
161                  }
162
163                // for (int i = 3; i > 0; i--) {
164                // tblMods.getColumnModel().removeColumn(tblMods.getColumnModel().getColumn(i));
165                // }
162          }
163  
164          private void exit() {
# Line 324 | Line 320 | public class MainWin extends JFrame impl
320                                          });
321                          while (!m.isFinished()) {
322                                  try {
323 <                                        Thread.sleep(50);
323 >                                        Thread.sleep(10);
324                                  } catch (InterruptedException e) {
325                                          // TODO Auto-generated catch block
326                                          e.printStackTrace();
# Line 389 | Line 385 | public class MainWin extends JFrame impl
385                                          evt.setProgressMessage(step);
386                                  }
387                          });
392                }
388  
389 <                JOptionPane.showMessageDialog(this,
390 <                                bundle.getString("installDone.text"),
391 <                                bundle.getString("installDone.title"),
392 <                                JOptionPane.INFORMATION_MESSAGE);
389 >                        JOptionPane.showMessageDialog(this,
390 >                                        bundle.getString("installDone.text"),
391 >                                        bundle.getString("installDone.title"),
392 >                                        JOptionPane.INFORMATION_MESSAGE);
393 >                }
394          }
395  
396          private void modSelection(Mod m) {
397                  lblSubmitterVal.setText("");
398                  lblCreatorVal.setText("");
399                  lblDescriptionVal.setText("");
400 +                lblTypesVal.setText("");
401 +                lblPlatformVal.setText("");
402                  if (m != null) {
403                          lblSubmitterVal.setText(m.getName());
404                          lblCreatorVal.setText(m.getCreator());
405                          lblDescriptionVal.setText(m.getDescription());
406 +
407 +                        String types = "";
408 +                        for (Type t : m.getTypes()) {
409 +                                if (types.length() > 0)
410 +                                        types += ", ";
411 +                                types += t.getName();
412 +                        }
413 +                        lblTypesVal.setText(types);
414 +                        lblPlatformVal.setText(m.getPlatform().toString());
415                  }
416                  // TODO
417          }
# Line 445 | Line 452 | public class MainWin extends JFrame impl
452                          }
453                  }
454          }
455 <        
455 >
456          private Vector<String> getBasicOniLaunchParams() {
457                  Vector<String> params = new Vector<String>();
458                  switch (Settings.getPlatform()) {
# Line 478 | Line 485 | public class MainWin extends JFrame impl
485                  Vector<String> params = getBasicOniLaunchParams();
486                  if (params.size() > 0) {
487                          try {
488 <                                new ProcessBuilder(params).start();
488 >                                ProcessBuilder pb = new ProcessBuilder(params);
489 >                                pb.directory(Paths.getEditionBasePath());
490 >                                pb.start();
491                          } catch (IOException e) {
492                                  // TODO Auto-generated catch block
493                                  e.printStackTrace();
# Line 492 | Line 501 | public class MainWin extends JFrame impl
501                  if (params.size() > 0) {
502                          params.add("-noswitch");
503                          try {
504 <                                new ProcessBuilder(params).start();
504 >                                ProcessBuilder pb = new ProcessBuilder(params);
505 >                                pb.directory(Paths.getEditionBasePath());
506 >                                pb.start();
507                          } catch (IOException e) {
508                                  // TODO Auto-generated catch block
509                                  e.printStackTrace();

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)