-
- // 前回のタブを復元
- noteTableView.load(true);
- HashMap<Integer, String> tabs = new HashMap<Integer, String>();
- if (Global.getLastViewedTabs() != null) {
- tabs.putAll(Global.getLastViewedTabs());
- }
-
- Collection<String> guids = tabs.values();
- Iterator<String> guidIterator = guids.iterator();
- Collection<Integer> indexes = tabs.keySet();
- Iterator<Integer> indexIterator = indexes.iterator();
- noteDirty = new HashMap<Integer, Boolean>();
-
- while (guidIterator.hasNext()) {
- String guid = guidIterator.next();
- int tabIndex = indexIterator.next();
-
- currentNoteGuid = guid;
- noteDirty.put(tabIndex, false);
- if (!currentNoteGuid.trim().equals("")) {
- currentNote = conn.getNoteTable().getNote(currentNoteGuid, true, true, false, false, true);
- if (currentNote != null) {
- openTabEditor(guid, tabIndex);
- }
- }
- }
-
- // タブが0個だったら作る
- if (tabBrowser.count() <= 0) {
- TabBrowse tab = new TabBrowse(conn, tabBrowser, cbObserver);
- browserWindow = tab.getBrowserWindow();
- tabBrowser.currentChanged.disconnect();
- int index = tabBrowser.addNewTab(tab, "");
- tabBrowser.currentChanged.connect(this, "tabWindowChanged(int)");
- tabWindows.put(index, tab);
- noteDirty.put(index, false);
-
- // 履歴記録のハッシュマップを初期化
- historyGuids.put(index, new ArrayList<String>());
- historyPosition.put(index, 0);
- fromHistory.put(index, false);
- }
-