public HistoryList(GoBible goBible) { super(GoBible.getString("UI-History"), Choice.IMPLICIT); if (GoBible.USE_MIDP20) { setFitPolicy(Choice.TEXT_WRAP_ON); } this.goBible = goBible; // Add the history int i = goBible.historyStartIndex; do { if (goBible.historyExcerpts[i] != null && !goBible.historyExcerpts[i].equals("")) { int bookIndex = goBible.historyVerseIndices[i * 3] & 0xFF; int chapterIndex = goBible.historyVerseIndices[i * 3 + 1] & 0xFF; int verseIndex = goBible.historyVerseIndices[i * 3 + 2] & 0xFF; append( goBible.bibleSource.getBookName(bookIndex) + " " + goBible.bibleSource.getReferenceString(bookIndex, chapterIndex, verseIndex) + " \"" + goBible.historyExcerpts[i] + "\"", null); } i++; if (i >= GoBible.HISTORY_SIZE) { i = 0; } } while (i != goBible.historyStartIndex); addCommand(new Command(GoBible.getString("UI-Back"), Command.CANCEL, 0)); setCommandListener(this); }