pane.setLayout(new BoxLayout(pane, BoxLayout.PAGE_AXIS));
JScrollPane scroll = new JScrollPane(pane);
- Integer icolor = Instance.getUiConfig().getColor(
- UiConfig.BACKGROUND_COLOR);
+ Integer icolor = Instance.getInstance().getUiConfig().getColor(UiConfig.BACKGROUND_COLOR);
if (icolor != null) {
color = new Color(icolor);
setBackground(color);
helper.createMenu(status);
validate();
- String desc = Instance.getTransGui().getStringX(
- StringIdGui.ERROR_LIB_STATUS,
+ String desc = Instance.getInstance().getTransGui().getStringX(StringIdGui.ERROR_LIB_STATUS,
status.toString());
if (desc == null) {
desc = GuiReader
List<MetaData> metas;
try {
if (currentType) {
- metas = lib.getListBySource(value);
+ metas = lib.getList().filter(value, null, null);
} else {
- metas = lib.getListByAuthor(value);
+ metas = lib.getList().filter(null, value, null);
}
} catch (IOException e) {
error(e.getLocalizedMessage(), "IOException", e);
}
});
} catch (IOException e) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
error(GuiReader.trans(StringIdGui.ERROR_CANNOT_OPEN),
GuiReader.trans(StringIdGui.TITLE_ERROR), e);
}
break;
case SOURCE:
for (MetaData meta : helper.getReader().getLibrary()
- .getListBySource(book.getInfo().getMainInfo())) {
+ .getList().filter(book.getInfo().getMainInfo(), null, null)) {
luids.add(meta.getLuid());
}
break;
case AUTHOR:
for (MetaData meta : helper.getReader().getLibrary()
- .getListByAuthor(book.getInfo().getMainInfo())) {
+ .getList().filter(null, book.getInfo().getMainInfo(), null)) {
luids.add(meta.getLuid());
}
break;
}
} catch (IOException e) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
}
final Progress pg = new Progress();
});
}
} catch (IOException e) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
error(GuiReader.trans(StringIdGui.ERROR_CANNOT_OPEN),
GuiReader.trans(StringIdGui.TITLE_ERROR), e);
}
try {
EventQueue.invokeAndWait(run);
} catch (InterruptedException e) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
} catch (InvocationTargetException e) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
}
}
}
* the exception to log if any
*/
private void error(final String message, final String title, Exception e) {
- Instance.getTraceHandler().error(title + ": " + message);
+ Instance.getInstance().getTraceHandler().error(title + ": " + message);
if (e != null) {
- Instance.getTraceHandler().error(e);
+ Instance.getInstance().getTraceHandler().error(e);
}
SwingUtilities.invokeLater(new Runnable() {