Changeset 606
- Timestamp:
- Jan 14, 2013, 1:34:55 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r604 r606 9 9 import java.text.SimpleDateFormat; 10 10 import java.util.Date; 11 import java.util.HashMap;12 11 import java.util.List; 13 12 import java.util.Scanner; 13 import java.util.TreeMap; 14 14 import java.util.TreeSet; 15 15 import java.util.Vector; … … 146 146 private static void combineBinaryFiles(List<File> srcFoldersFiles, 147 147 InstallProgressListener listener) { 148 HashMap<String, Vector<File>> levels = new HashMap<String, Vector<File>>();148 TreeMap<String, Vector<File>> levels = new TreeMap<String, Vector<File>>(); 149 149 150 150 for (File path : srcFoldersFiles) { -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r605 r606 83 83 private JLabel lblSubmitterVal; 84 84 private JLabel lblCreatorVal; 85 private JLabel lblTypesVal; 86 private JLabel lblPlatformVal; 85 87 private HTMLLinkLabel lblDescriptionVal; 86 88 … … 151 153 sorter.setRowFilter(new ModTableFilter(null)); 152 154 153 sorter.setSortable(2, false);154 155 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 157 sorter.setSortKeys(sortKeys); 158 158 … … 160 160 model.setColumnConstraints(i, tblMods.getColumnModel().getColumn(i)); 161 161 } 162 163 // for (int i = 3; i > 0; i--) {164 // tblMods.getColumnModel().removeColumn(tblMods.getColumnModel().getColumn(i));165 // }166 162 } 167 163 … … 325 321 while (!m.isFinished()) { 326 322 try { 327 Thread.sleep( 50);323 Thread.sleep(10); 328 324 } catch (InterruptedException e) { 329 325 // TODO Auto-generated catch block … … 390 386 } 391 387 }); 392 } 393 394 JOptionPane.showMessageDialog(this,395 bundle.getString("installDone.text"),396 bundle.getString("installDone.title"),397 JOptionPane.INFORMATION_MESSAGE);388 389 JOptionPane.showMessageDialog(this, 390 bundle.getString("installDone.text"), 391 bundle.getString("installDone.title"), 392 JOptionPane.INFORMATION_MESSAGE); 393 } 398 394 } 399 395 … … 402 398 lblCreatorVal.setText(""); 403 399 lblDescriptionVal.setText(""); 400 lblTypesVal.setText(""); 401 lblPlatformVal.setText(""); 404 402 if (m != null) { 405 403 lblSubmitterVal.setText(m.getName()); 406 404 lblCreatorVal.setText(m.getCreator()); 407 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()); 408 415 } 409 416 // TODO … … 446 453 } 447 454 } 448 455 449 456 private Vector<String> getBasicOniLaunchParams() { 450 457 Vector<String> params = new Vector<String>(); … … 479 486 if (params.size() > 0) { 480 487 try { 481 new ProcessBuilder(params).start(); 488 ProcessBuilder pb = new ProcessBuilder(params); 489 pb.directory(Paths.getEditionBasePath()); 490 pb.start(); 482 491 } catch (IOException e) { 483 492 // TODO Auto-generated catch block … … 493 502 params.add("-noswitch"); 494 503 try { 495 new ProcessBuilder(params).start(); 504 ProcessBuilder pb = new ProcessBuilder(params); 505 pb.directory(Paths.getEditionBasePath()); 506 pb.start(); 496 507 } catch (IOException e) { 497 508 // TODO Auto-generated catch block -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.properties
r605 r606 34 34 lblSubmitter.text=Submitter: 35 35 lblCreator.text=Creator: 36 lblTypes.text=Types: 37 lblPlatform.text=Platform: 36 38 lblFiles.text=Number of files: 37 39 lblDescription.text=Description: -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.yml
r605 r606 60 60 - JLabel(name=lblCreator, text=lblCreator.text) 61 61 - JLabel(name=lblCreatorVal) 62 - JLabel(name=lblTypes, text=lblTypes.text) 63 - JLabel(name=lblTypesVal) 64 - JLabel(name=lblPlatform, text=lblPlatform.text) 65 - JLabel(name=lblPlatformVal) 62 66 - JLabel(name=lblDescription, text=lblDescription.text) 63 67 - JScrollPane(name=scrollDescription, vScrollBar=always, hScrollBar=asNeeded): … … 67 71 >lblSubmitter lblSubmitterVal [min] 68 72 >lblCreator lblCreatorVal [min] 73 >lblTypes lblTypesVal [min] 74 >lblPlatform lblPlatformVal [min] 69 75 >^lblDescription scrollDescription [grow] 70 76 - MigLayout: -
AE/installer2/src/net/oni2/aeinstaller/gui/downloadwindow/Downloader.java
r605 r606 1 1 package net.oni2.aeinstaller.gui.downloadwindow; 2 2 3 import java.awt.Dimension;4 3 import java.util.ResourceBundle; 5 4 import java.util.TreeSet; … … 46 45 super(); 47 46 48 set MinimumSize(new Dimension(350, (int) getSize().getHeight()));49 setSize( 450, (int) getSize().getHeight());47 setResizable(false); 48 setSize(500, (int) getSize().getHeight()); 50 49 51 50 downloader = new ModDownloader(mods, this); -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r605 r606 12 12 import net.oni2.aeinstaller.backend.mods.Mod; 13 13 import net.oni2.aeinstaller.backend.mods.ModManager; 14 import net.oni2.aeinstaller.backend.mods.Type;15 14 16 15 /** … … 43 42 return mod; 44 43 case 0: 44 return install.get(row); 45 case 1: 45 46 return mod.getName(); 46 case 1:47 case 2: 47 48 return mod.getPackageNumberString(); 48 case 2:49 String type = "";50 for (Type t : mod.getTypes()) {51 if (type.length() > 0)52 type += ", ";53 type += t.getName();54 }55 return type;56 case 3:57 return mod.getPlatform().toString();58 case 4:59 return install.get(row);60 49 } 61 50 return null; … … 66 55 switch (col) { 67 56 case 0: 57 return bundle.getString("mod.install"); 58 case 1: 68 59 return bundle.getString("mod.name"); 69 case 1:60 case 2: 70 61 return bundle.getString("mod.package_number"); 71 case 2:72 return bundle.getString("mod.type");73 case 3:74 return bundle.getString("mod.platform");75 case 4:76 return bundle.getString("mod.install");77 62 } 78 63 return null; … … 86 71 @Override 87 72 public int getColumnCount() { 88 return 5;73 return 3; 89 74 } 90 75 … … 93 78 switch (col) { 94 79 case 0: 80 return Boolean.class; 81 case 1: 95 82 return String.class; 96 case 1:83 case 2: 97 84 return String.class; 98 case 2:99 return String.class;100 case 3:101 return String.class;102 case 4:103 return Boolean.class;104 85 } 105 86 return null; … … 118 99 switch (colNum) { 119 100 case 0: 120 col.setPreferredWidth(150); 121 break; 122 case 1: 123 w = 55; 101 w = 50; 124 102 col.setPreferredWidth(w); 125 103 col.setMinWidth(w); 126 104 col.setMaxWidth(w); 127 105 break; 128 case 2:129 col.setPreferredWidth(1 00);106 case 1: 107 col.setPreferredWidth(150); 130 108 break; 131 case 3: 132 w = 70; 133 col.setPreferredWidth(w); 134 col.setMinWidth(w); 135 col.setMaxWidth(w); 136 break; 137 case 4: 138 w = 60; 109 case 2: 110 w = 55; 139 111 col.setPreferredWidth(w); 140 112 col.setMinWidth(w); … … 204 176 @Override 205 177 public boolean isCellEditable(int rowIndex, int columnIndex) { 206 return columnIndex == 4;178 return columnIndex == 0; 207 179 } 208 180 … … 210 182 public void setValueAt(Object aValue, int rowIndex, int columnIndex) { 211 183 super.setValueAt(aValue, rowIndex, columnIndex); 212 if (columnIndex == 4) {184 if (columnIndex == 0) { 213 185 install.set(rowIndex, (Boolean) aValue); 214 186 -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.properties
r593 r606 1 1 mod.name=Name 2 mod.type=Type3 2 mod.package_number=Pkg# 4 mod.platform=Platform 5 mod.install=Install? 3 mod.install=Install
Note:
See TracChangeset
for help on using the changeset viewer.