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

Method updateChapterNum

src/org/albite/albite/BookCanvas.java:2369–2397  ·  view source on GitHub ↗
(final int chapterNo)

Source from the content-addressed store, hash-verified

2367 //#endif
2368
2369 private void updateChapterNum(final int chapterNo) {
2370
2371 /*
2372 * update chapter's number
2373 */
2374 final char[] chapterNoCharsF = chapterNoChars;
2375 final int currentChapterNo = chapterNo;
2376 int i = 1;
2377
2378 if (currentChapterNo > 99) {
2379 chapterNoCharsF[i] = (char) ('0' + (currentChapterNo / 100));
2380 i++;
2381 }
2382
2383 if (currentChapterNo > 9) {
2384 chapterNoCharsF[i] = (char) ('0' + ((currentChapterNo % 100) / 10));
2385 i++;
2386 }
2387
2388 chapterNoCharsF[i] = (char) ('0' + ((currentChapterNo % 100) % 10));
2389 i++;
2390
2391 for (; i < chapterNoCharsF.length; i++) {
2392 chapterNoCharsF[i] = ' ';
2393 }
2394
2395 chapterNoChars = chapterNoCharsF;
2396 repaintChapterNum = true;
2397 }
2398
2399
2400 public final void fillBookInfo(final Form f) {

Callers 1

loadChapterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected