コード例 #1
0
 public static ArrayList<Uploader> getSortedListCopy() {
   ArrayList<Uploader> uls = new ArrayList<>();
   synchronized (NUTableModel.uploadList) {
     for (int i = 0; i < NUTableModel.uploadList.size(); i++) {
       Uploader upld =
           (Uploader)
               NeembuuUploader.getInstance().neembuuUploaderTable.getValueAt(i, NUTableModel.HOST);
       uls.add(upld);
     }
   }
   return uls;
 }
コード例 #2
0
 /**
  * Remove the selected row from table. Careful when removing as index of all rows change after
  * removing a particular row (if that row is not the last)
  */
 public void removeUpload(int selectedrow) {
   int actualSelectedRow;
   synchronized (uploadList) {
     actualSelectedRow =
         NeembuuUploader.getInstance().neembuuUploaderTable.convertRowIndexToModel(selectedrow);
     uploadList.remove(actualSelectedRow);
   }
   // Fire table row insertion notification to table.
   fireTableRowsDeleted(selectedrow, selectedrow);
   NULogger.getLogger()
       .log(
           Level.INFO,
           "{0}: Row at {1} deleted actual {2}",
           new Object[] {getClass().getName(), selectedrow, actualSelectedRow});
 }