}
}
// Open/close notebooks
@SuppressWarnings("unused")
private void closeNotebooks() {
NotebookArchive na = new NotebookArchive(listManager.getNotebookIndex(), listManager.getArchiveNotebookIndex());
na.exec();
if (!na.okClicked())
return;
waitCursor(true);
listManager.getArchiveNotebookIndex().clear();
for (int i=na.getClosedBookList().count()-1; i>=0; i--) {
String text = na.getClosedBookList().takeItem(i).text();
for (int j=0; j<listManager.getNotebookIndex().size(); j++) {
if (listManager.getNotebookIndex().get(j).getName().equalsIgnoreCase(text)) {
Notebook n = listManager.getNotebookIndex().get(j);
conn.getNotebookTable().setArchived(n.getGuid(),true);
listManager.getArchiveNotebookIndex().add(n);
j=listManager.getNotebookIndex().size();
}
}
}
for (int i=na.getOpenBookList().count()-1; i>=0; i--) {
String text = na.getOpenBookList().takeItem(i).text();
for (int j=0; j<listManager.getNotebookIndex().size(); j++) {
if (listManager.getNotebookIndex().get(j).getName().equalsIgnoreCase(text)) {
Notebook n = listManager.getNotebookIndex().get(j);
conn.getNotebookTable().setArchived(n.getGuid(),false);
j=listManager.getNotebookIndex().size();