+
+ inUi(new Runnable() {
+ @Override
+ public void run() {
+ if (status == Status.READY) {
+ helper.createMenu(true);
+ if (typeF == null) {
+ addBookPane(true, false);
+ } else {
+ addBookPane(typeF, true);
+ }
+ pane.setVisible(true);
+ refreshBooks();
+ } else {
+ helper.createMenu(false);
+ validate();
+
+ String err = lib.getLibraryName() + "\n";
+ switch (status) {
+ case INVALID:
+ err += "Library not valid";
+ break;
+
+ case UNAUTORIZED:
+ err += "You are not allowed to access this library";
+ break;
+
+ case UNAVAILABLE:
+ err += "Library currently unavailable";
+ break;
+
+ default:
+ err += "An error occured when contacting the library";
+ break;
+ }
+
+ error(err, "Library error", null);
+ }
+ }
+ });