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

Method applyAbsScrPgOrd

src/org/albite/albite/BookCanvas.java:2150–2187  ·  view source on GitHub ↗

Sets up absolute scrolling direction and page ordering, i.e.: - scrollinOnX - inverted Depends on: - horizontalScrolling - orientation Therefore, needs to be called after: - Page interaction screen - Screen mode screen

()

Source from the content-addressed store, hash-verified

2148 * - Screen mode screen
2149 */
2150 private void applyAbsScrPgOrd() {
2151 /*
2152 * Set which direction on should scroll around
2153 */
2154 if (orientation == ORIENTATION_0 || orientation == ORIENTATION_180) {
2155 scrollingOnX = horizontalScrolling;
2156 } else {
2157 scrollingOnX = !horizontalScrolling;
2158 }
2159
2160 /*
2161 * Do we need to inverted the ordering of pages?
2162 */
2163 //#mdebug
2164 AlbiteMIDlet.LOGGER.log("Orientation: " + orientation);
2165 AlbiteMIDlet.LOGGER.log("horiz: " + horizontalScrolling);
2166 //#enddebug
2167
2168 switch (orientation) {
2169 case ORIENTATION_0:
2170 inverted = false;
2171 break;
2172
2173 case ORIENTATION_90:
2174 inverted = (horizontalScrolling ? false : true);
2175 break;
2176
2177 case ORIENTATION_180:
2178 inverted = true;
2179 break;
2180
2181 case ORIENTATION_270:
2182 inverted = (horizontalScrolling ? true : false);
2183 break;
2184 }
2185 //#debug
2186 AlbiteMIDlet.LOGGER.log("Inverted: " + inverted);
2187 }
2188
2189 /**
2190 * Sets up scrolling limits according to current page size, i.e.

Callers 3

initializeMethod · 0.95
setScrollingOptionsMethod · 0.95
setOrientationMethod · 0.95

Calls 1

logMethod · 0.80

Tested by

no test coverage detected