Changeset 593 for AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Timestamp:
- Dec 31, 2012, 2:48:32 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/gui/modtable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r592 r593 22 22 23 23 private Vector<NodeMod> items; 24 private Vector<Boolean> install; 24 25 private int vocabModTypeID = -1; 25 26 private int vocabPlatformID = -1; … … 45 46 String type = ""; 46 47 if (vocabModTypeID < 0) { 47 vocabModTypeID = DepotManager.getInstance() 48 .getVocabulary(DepotConfig.getVocabularyName_ModType()).getVid(); 48 vocabModTypeID = DepotManager 49 .getInstance() 50 .getVocabulary( 51 DepotConfig.getVocabularyName_ModType()) 52 .getVid(); 49 53 } 50 54 for (int tid : node.getTaxonomyTerms().get(vocabModTypeID)) { … … 57 61 case 3: 58 62 if (vocabPlatformID < 0) { 59 vocabPlatformID = DepotManager.getInstance() 60 .getVocabulary(DepotConfig.getVocabularyName_Platform()).getVid(); 63 vocabPlatformID = DepotManager 64 .getInstance() 65 .getVocabulary( 66 DepotConfig.getVocabularyName_Platform()) 67 .getVid(); 61 68 } 62 69 int tid = node.getTaxonomyTerms().get(vocabPlatformID) … … 64 71 return DepotManager.getInstance().getTaxonomyTerm(tid) 65 72 .getName(); 73 case 4: 74 return install.get(row); 66 75 } 67 76 return null; … … 79 88 case 3: 80 89 return bundle.getString("mod.platform"); 90 case 4: 91 return bundle.getString("mod.install"); 81 92 } 82 93 return null; … … 90 101 @Override 91 102 public int getColumnCount() { 92 return 4;103 return 5; 93 104 } 94 105 … … 104 115 case 3: 105 116 return String.class; 117 case 4: 118 return Boolean.class; 106 119 } 107 120 return null; … … 137 150 col.setMaxWidth(w); 138 151 break; 152 case 4: 153 w = 60; 154 col.setPreferredWidth(w); 155 col.setMinWidth(w); 156 col.setMaxWidth(w); 157 break; 139 158 } 140 159 } … … 145 164 public void reloadData() { 146 165 items = DepotManager.getInstance().getModPackageNodes(); 166 install = new Vector<Boolean>(); 167 // TODO check installed 168 for (int i = 0; i < items.size(); i++) { 169 install.add(i, false); 170 } 147 171 } 148 172 … … 156 180 } 157 181 182 @Override 183 public boolean isCellEditable(int rowIndex, int columnIndex) { 184 return columnIndex == 4; 185 } 186 187 @Override 188 public void setValueAt(Object aValue, int rowIndex, int columnIndex) { 189 super.setValueAt(aValue, rowIndex, columnIndex); 190 if (columnIndex == 4) { 191 install.set(rowIndex, (Boolean) aValue); 192 } 193 } 194 158 195 } -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.properties
r591 r593 3 3 mod.package_number=Pkg# 4 4 mod.platform=Platform 5 mod.install=Install?
Note:
See TracChangeset
for help on using the changeset viewer.