Pārlūkot izejas kodu

Add a removeall method to GenericTableModel.

pull/276/head
Greg Holmes 9 gadus atpakaļ
vecāks
revīzija
44fe1a276c

+ 8
- 0
ui_swing/src/com/dmdirc/addons/ui_swing/components/GenericTableModel.java Parādīt failu

@@ -222,6 +222,14 @@ public class GenericTableModel<T> extends AbstractTableModel {
222 222
         fireTableRowsDeleted(index, index);
223 223
     }
224 224
 
225
+    /**
226
+     * Removes all the values from the model.
227
+     */
228
+    public void removeAll() {
229
+        values.clear();
230
+        fireTableDataChanged();
231
+    }
232
+
225 233
     /**
226 234
      * Adds the specified value at the end of the model.
227 235
      *

Notiek ielāde…
Atcelt
Saglabāt