Changeset 604 for AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Timestamp:
- Jan 12, 2013, 11:48:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r600 r604 1 1 package net.oni2.aeinstaller.gui.modtable; 2 2 3 import java.io.File; 3 4 import java.util.HashSet; 4 5 import java.util.ResourceBundle; … … 44 45 return mod.getName(); 45 46 case 1: 46 return mod.getPackageNumber ();47 return mod.getPackageNumberString(); 47 48 case 2: 48 49 String type = ""; … … 94 95 return String.class; 95 96 case 1: 96 return Integer.class;97 return String.class; 97 98 case 2: 98 99 return String.class; … … 149 150 items.clear(); 150 151 items.addAll(ModManager.getInstance().getMods()); 152 revertSelection(); 153 } 154 155 /** 156 * Revert the selection to the mods that are currently installed 157 */ 158 public void revertSelection() { 151 159 install.clear(); 152 // TODO check installed153 160 for (int i = 0; i < items.size(); i++) { 154 install.add(i, false); 155 } 161 install.add(i, ModManager.getInstance() 162 .isModInstalled(items.get(i))); 163 } 164 fireTableDataChanged(); 165 } 166 167 /** 168 * Reload the selection after a config was loaded 169 * 170 * @param config 171 * Config to load 172 */ 173 public void reloadSelection(File config) { 174 Vector<Integer> selected = ModManager.getInstance().loadModSelection( 175 config); 176 install.clear(); 177 for (int i = 0; i < items.size(); i++) { 178 install.add(i, selected.contains(items.get(i).getPackageNumber())); 179 } 180 fireTableDataChanged(); 156 181 } 157 182
Note:
See TracChangeset
for help on using the changeset viewer.