Changeset 752 for java/installer2/src
- Timestamp:
- Mar 28, 2013, 4:34:30 PM (12 years ago)
- Location:
- java/installer2/src/net/oni2/aeinstaller
- Files:
-
- 2 added
- 5 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/Images.properties
r657 r752 3 3 img.settings=/net/oni2/aeinstaller/images/tango/preferences-system.png 4 4 img.exit=/net/oni2/aeinstaller/images/tango/system-log-out.png 5 img.undo=/net/oni2/aeinstaller/images/tango/edit-undo.png6 img.undo16=/net/oni2/aeinstaller/images/tango/edit-undo16.png7 5 img.redo=/net/oni2/aeinstaller/images/tango/edit-redo.png 8 6 img.refresh=/net/oni2/aeinstaller/images/tango/view-refresh.png … … 15 13 img.folder=/net/oni2/aeinstaller/images/open_icon_library/folder-open-3.png 16 14 img.update=/net/oni2/aeinstaller/images/open_icon_library/system-software-update-2.png 17 img.unSelect16=/net/oni2/aeinstaller/images/open_icon_library/select-2.png 15 16 img.unSelect16=/net/oni2/aeinstaller/images/selectall.png 17 img.undo=/net/oni2/aeinstaller/images/gnome-edit-undo.png 18 18 19 19 img.ae=/net/oni2/aeinstaller/images/AElogo.png -
java/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTable.java
r720 r752 267 267 for (int i = 0; i < getRowCount(); i++) { 268 268 int modRow = convertRowIndexToModel(i); 269 model.setValueAt(!isAll, modRow, 0); 270 } 269 model.selectPackage(modRow, !isAll); 270 } 271 model.updateDownloadSize(); 271 272 invalidate(); 272 273 repaint(); -
java/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTableModel.java
r673 r752 271 271 } 272 272 273 /** 274 * Check the current download size and notify listeners 275 */ 276 public void updateDownloadSize() { 277 int size = 0; 278 int count = 0; 279 for (int i = 0; i < items.size(); i++) { 280 if (install.get(i)) { 281 count++; 282 Package m = items.get(i); 283 if (!m.isLocalAvailable()) 284 size += m.getZipSize(); 285 } 286 } 287 notifyDownloadSize(size, count); 288 } 289 273 290 @Override 274 291 public void setValueAt(Object aValue, int rowIndex, int columnIndex) { 275 292 super.setValueAt(aValue, rowIndex, columnIndex); 276 293 if (columnIndex == 0) { 277 install.set(rowIndex, (Boolean) aValue); 278 279 int size = 0; 280 int count = 0; 281 for (int i = 0; i < items.size(); i++) { 282 if (install.get(i)) { 283 count++; 284 Package m = items.get(i); 285 if (!m.isLocalAvailable()) 286 size += m.getZipSize(); 287 } 288 } 289 notifyDownloadSize(size, count); 290 } 294 selectPackage(rowIndex, (Boolean) aValue); 295 updateDownloadSize(); 296 } 297 } 298 299 /** 300 * Select package in given row 301 * 302 * @param row 303 * Row of package 304 * @param select 305 * Select or not 306 */ 307 public void selectPackage(int row, boolean select) { 308 install.set(row, select); 291 309 } 292 310
Note:
See TracChangeset
for help on using the changeset viewer.