Changeset 631 for AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Timestamp:
- Jan 18, 2013, 4:45:11 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r630 r631 21 21 22 22 private ResourceBundle bundle = ResourceBundle 23 .getBundle("net.oni2.aeinstaller.localization." 24 + getClass().getSimpleName()); 23 .getBundle("net.oni2.aeinstaller.localization.ModTable"); 25 24 26 25 private Vector<Mod> items = new Vector<Mod>(); … … 33 32 */ 34 33 public ModTableModel() { 35 reloadData();36 34 } 37 35 … … 50 48 case 3: 51 49 return mod.getCreator(); 50 case 4: 51 String res = ""; 52 res += (install.get(row) ? "I" : "_"); 53 res += (mod.isLocalAvailable() && mod.isNewerAvailable() ? "U" 54 : "_"); 55 res += (mod.isLocalAvailable() ? "D" : "_"); 56 return res; 52 57 } 53 58 return null; … … 65 70 case 3: 66 71 return bundle.getString("mod.creator"); 72 case 4: 73 return bundle.getString("mod.state"); 67 74 } 68 75 return null; … … 76 83 @Override 77 84 public int getColumnCount() { 78 return 4;85 return 5; 79 86 } 80 87 … … 89 96 return String.class; 90 97 case 3: 98 return String.class; 99 case 4: 91 100 return String.class; 92 101 } … … 123 132 col.setPreferredWidth(90); 124 133 break; 134 case 4: 135 w = 55; 136 col.setPreferredWidth(w); 137 col.setMinWidth(w); 138 col.setMaxWidth(w); 139 break; 125 140 } 126 141 } … … 141 156 install.clear(); 142 157 for (int i = 0; i < items.size(); i++) { 143 install.add(i, ModManager.getInstance() 144 .isModInstalled(items.get(i))); 158 install.add(i, items.get(i).isInstalled()); 145 159 } 146 160 fireTableDataChanged();
Note:
See TracChangeset
for help on using the changeset viewer.