mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-11 03:45:06 -05:00
dac55956f6
* BackgroundFileTransferablePolicy uses ThreadLocal<Worker> now * support exception handling in BackgroundFileTransferablePolicy changes: * ChecksumComputationTask will only calculate one HashType * added ChecksumRow.dispose() fix: * honor convertValueToString() in SelectDialog
45 lines
686 B
Java
45 lines
686 B
Java
|
|
package net.sourceforge.tuned.ui;
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
import javax.swing.ListModel;
|
|
import javax.swing.event.ListDataListener;
|
|
|
|
|
|
public class ArrayListModel implements ListModel {
|
|
|
|
private final Object[] data;
|
|
|
|
|
|
public ArrayListModel(Collection<? extends Object> data) {
|
|
this.data = data.toArray();
|
|
}
|
|
|
|
|
|
@Override
|
|
public Object getElementAt(int index) {
|
|
return data[index];
|
|
}
|
|
|
|
|
|
@Override
|
|
public int getSize() {
|
|
return data.length;
|
|
}
|
|
|
|
|
|
@Override
|
|
public void addListDataListener(ListDataListener l) {
|
|
// ignore, model is unmodifiable
|
|
}
|
|
|
|
|
|
@Override
|
|
public void removeListDataListener(ListDataListener l) {
|
|
// ignore, model is unmodifiable
|
|
}
|
|
|
|
}
|