import javax.swing.filechooser.FileNameExtensionFilter;
import be.nikiroo.fanfix.Instance;
-import be.nikiroo.fanfix.Library;
+import be.nikiroo.fanfix.LocalLibrary;
import be.nikiroo.fanfix.bundles.Config;
import be.nikiroo.fanfix.bundles.UiConfig;
import be.nikiroo.fanfix.data.MetaData;
*
* @param reader
* the associated {@link LocalReader} to forward some commands
- * and access its {@link Library}
+ * and access its {@link LocalLibrary}
* @param type
* the type of {@link Story} to load, or NULL for all types
*/
final String typeF = type;
outOfUi(pg, new Runnable() {
public void run() {
- Instance.getLibrary().refresh(pg);
+ Instance.getLibrary().refresh(false, pg);
invalidate();
setJMenuBar(createMenu());
addBookPane(typeF, true);
private void addBookPane(String value, boolean type) {
if (value == null) {
if (type) {
- for (String tt : Instance.getLibrary().getTypes()) {
+ for (String tt : Instance.getLibrary().getSources()) {
if (tt != null) {
addBookPane(tt, type);
}
JMenu sources = new JMenu("Sources");
sources.setMnemonic(KeyEvent.VK_S);
- List<String> tt = Instance.getLibrary().getTypes();
+ List<String> tt = Instance.getLibrary().getSources();
tt.add(0, null);
for (final String type : tt) {
JMenuItem item = new JMenuItem(type == null ? "All" : type);
List<String> types = new ArrayList<String>();
types.add(null);
- types.addAll(Instance.getLibrary().getTypes());
+ types.addAll(Instance.getLibrary().getSources());
for (String type : types) {
JMenuItem item = new JMenuItem(type == null ? "New type..." : type);
}
/**
- * Import a {@link Story} into the main {@link Library}.
+ * Import a {@link Story} into the main {@link LocalLibrary}.
* <p>
* Should be called inside the UI thread.
*
}
/**
- * Actually import the {@link Story} into the main {@link Library}.
+ * Actually import the {@link Story} into the main {@link LocalLibrary}.
* <p>
* Should be called inside the UI thread.
*