MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / getToc

Method getToc

src/org/albite/albite/AlbiteMIDlet.java:1349–1366  ·  view source on GitHub ↗

Returns an initiliazed instance of toc component. @return the initialized component instance

()

Source from the content-addressed store, hash-verified

1347 * @return the initialized component instance
1348 */
1349 public List getToc() {
1350 if (toc == null) {//GEN-END:|325-getter|0|325-preInit
1351 // write pre-init user code here
1352 toc = new List("Table of contents", Choice.IMPLICIT);//GEN-BEGIN:|325-getter|1|325-postInit
1353 toc.addCommand(getBACK_COMMAND());
1354 toc.addCommand(getNEXT_COMMAND());
1355 toc.setCommandListener(this);
1356 toc.setFitPolicy(Choice.TEXT_WRAP_DEFAULT);
1357 toc.setSelectCommand(getNEXT_COMMAND());//GEN-END:|325-getter|1|325-postInit
1358 // write post-init user code here
1359 final Book book = bookCanvas.getCurrentBook();
1360 final int count = book.getChaptersCount();
1361 for (int i = 0; i < count; i++) {
1362 toc.append(book.getChapter(i).getTitle(), null);
1363 }
1364 }//GEN-BEGIN:|325-getter|2|
1365 return toc;
1366 }
1367 //</editor-fold>//GEN-END:|325-getter|2|
1368
1369 //<editor-fold defaultstate="collapsed" desc=" Generated Getter: GO_COMMAND ">//GEN-BEGIN:|359-getter|0|359-preInit

Callers 4

commandActionMethod · 0.95
tocActionMethod · 0.95
showTocMethod · 0.95
executeMethod · 0.95

Calls 7

getBACK_COMMANDMethod · 0.95
getNEXT_COMMANDMethod · 0.95
getChaptersCountMethod · 0.95
getChapterMethod · 0.95
getCurrentBookMethod · 0.80
setCommandListenerMethod · 0.45
getTitleMethod · 0.45

Tested by

no test coverage detected