Fixed GlazedList @Depricated
This commit is contained in:
parent
1a0fd86ba5
commit
8333c502c4
|
@ -20,13 +20,13 @@ import net.filebot.util.ui.DefaultFancyListCellRenderer;
|
|||
import net.filebot.util.ui.SwingUI;
|
||||
import ca.odell.glazedlists.BasicEventList;
|
||||
import ca.odell.glazedlists.EventList;
|
||||
import ca.odell.glazedlists.swing.EventListModel;
|
||||
import ca.odell.glazedlists.swing.DefaultEventListModel;
|
||||
|
||||
public class FileBotList<E> extends JComponent {
|
||||
|
||||
protected EventList<E> model = new BasicEventList<E>();
|
||||
|
||||
protected JList list = new JList(new EventListModel<E>(model));
|
||||
protected JList list = new JList(new DefaultEventListModel<E>(model));
|
||||
|
||||
protected JScrollPane listScrollPane = new JScrollPane(list);
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class FileBotList<E> extends JComponent {
|
|||
|
||||
public void setModel(EventList<E> model) {
|
||||
this.model = model;
|
||||
list.setModel(new EventListModel(model));
|
||||
list.setModel(new DefaultEventListModel(model));
|
||||
}
|
||||
|
||||
public JList getListComponent() {
|
||||
|
|
|
@ -79,7 +79,7 @@ import net.filebot.web.SortOrder;
|
|||
import net.miginfocom.swing.MigLayout;
|
||||
import ca.odell.glazedlists.EventList;
|
||||
import ca.odell.glazedlists.ListSelection;
|
||||
import ca.odell.glazedlists.swing.EventSelectionModel;
|
||||
import ca.odell.glazedlists.swing.DefaultEventSelectionModel;
|
||||
|
||||
import com.cedarsoftware.util.io.JsonReader;
|
||||
import com.cedarsoftware.util.io.JsonWriter;
|
||||
|
@ -157,7 +157,7 @@ public class RenamePanel extends JComponent {
|
|||
namesList.getListComponent().setCellRenderer(cellrenderer);
|
||||
filesList.getListComponent().setCellRenderer(cellrenderer);
|
||||
|
||||
EventSelectionModel<Match<Object, File>> selectionModel = new EventSelectionModel<Match<Object, File>>(renameModel.matches());
|
||||
DefaultEventSelectionModel<Match<Object, File>> selectionModel = new DefaultEventSelectionModel<Match<Object, File>>(renameModel.matches());
|
||||
selectionModel.setSelectionMode(ListSelection.SINGLE_SELECTION);
|
||||
|
||||
// use the same selection model for both lists to synchronize selection
|
||||
|
|
|
@ -59,8 +59,8 @@ import ca.odell.glazedlists.ObservableElementList;
|
|||
import ca.odell.glazedlists.SortedList;
|
||||
import ca.odell.glazedlists.TextFilterator;
|
||||
import ca.odell.glazedlists.matchers.MatcherEditor;
|
||||
import ca.odell.glazedlists.swing.EventListModel;
|
||||
import ca.odell.glazedlists.swing.EventSelectionModel;
|
||||
import ca.odell.glazedlists.swing.DefaultEventListModel;
|
||||
import ca.odell.glazedlists.swing.DefaultEventSelectionModel;
|
||||
import ca.odell.glazedlists.swing.TextComponentMatcherEditor;
|
||||
|
||||
class SubtitleDownloadComponent extends JComponent {
|
||||
|
@ -79,7 +79,7 @@ class SubtitleDownloadComponent extends JComponent {
|
|||
packageList.setCellRenderer(renderer);
|
||||
|
||||
// better selection behaviour
|
||||
EventSelectionModel<SubtitlePackage> packageSelection = new EventSelectionModel<SubtitlePackage>(packages);
|
||||
DefaultEventSelectionModel<SubtitlePackage> packageSelection = new DefaultEventSelectionModel<SubtitlePackage>(packages);
|
||||
packageSelection.setSelectionMode(ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE);
|
||||
packageList.setSelectionModel(packageSelection);
|
||||
|
||||
|
@ -105,7 +105,7 @@ class SubtitleDownloadComponent extends JComponent {
|
|||
};
|
||||
|
||||
// better selection behaviour
|
||||
EventSelectionModel<MemoryFile> fileSelection = new EventSelectionModel<MemoryFile>(files);
|
||||
DefaultEventSelectionModel<MemoryFile> fileSelection = new DefaultEventSelectionModel<MemoryFile>(files);
|
||||
fileSelection.setSelectionMode(ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE);
|
||||
fileList.setSelectionModel(fileSelection);
|
||||
|
||||
|
@ -170,7 +170,7 @@ class SubtitleDownloadComponent extends JComponent {
|
|||
source = new ObservableElementList<SubtitlePackage>(source, GlazedLists.beanConnector(SubtitlePackage.class));
|
||||
|
||||
// as list model
|
||||
return new EventListModel<SubtitlePackage>(source);
|
||||
return new DefaultEventListModel<SubtitlePackage>(source);
|
||||
}
|
||||
|
||||
protected ListModel createFileListModel() {
|
||||
|
@ -187,7 +187,7 @@ class SubtitleDownloadComponent extends JComponent {
|
|||
});
|
||||
|
||||
// as list model
|
||||
return new EventListModel<MemoryFile>(source);
|
||||
return new DefaultEventListModel<MemoryFile>(source);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
|
|
Loading…
Reference in New Issue