@Override public void clearChapters() { LOG.trace("Clear list of chapters"); TreeSet<Chapter> oldValue = new TreeSet<>(loadedChapters); loadedChapters.clear(); changes.firePropertyChange( ModelProperties.CHAPTER_LOADED.getPropertyName(), oldValue, loadedChapters); }
@Override public SortedSet<Chapter> getLoadedChapters() { LOG.trace( "Reload chapters [Selected Serie : " + selectedSerie + "; Selected Websites : " + selectedWebsite + "]"); SortedSet<Chapter> newChapters = Services.getLoadingService().loadChapterList(selectedWebsite, selectedSerie); changes.firePropertyChange( ModelProperties.CHAPTER_LOADED.getPropertyName(), loadedChapters, newChapters); loadedChapters = newChapters; return loadedChapters; }