Пример #1
0
 /** Updates the list of DVDs/Games. */
 public void updateDVDs() {
   fireContentsChanged(this, 0, listDVDs.size());
 }
Пример #2
0
 /**
  * Adds a DVD or Game to the list and updates the list.
  *
  * @param unit the object to be added.
  */
 public void addDVD(DVD unit) {
   if (unit != null) {
     listDVDs.add(unit);
     fireIntervalAdded(this, 0, listDVDs.size());
   }
 }
Пример #3
0
 /**
  * Deletes the selected unit from the list and updates the list.
  *
  * @param index unit to be deleted.
  */
 public void deleteDVD(int index) {
   DVD unit = listDVDs.get(index);
   listDVDs.remove(index);
   fireIntervalRemoved(unit, 0, listDVDs.size());
 }
Пример #4
0
 /** Returns the size of the list as an int. */
 @Override
 public int getSize() {
   return listDVDs.size();
 }