writeButton(d, sb, DEFAULT_ICONS[SConstants.VERTICAL][FORWARD][0], "" + (value + extent));
writeButton(d, sb, DEFAULT_ICONS[SConstants.VERTICAL][FORWARD][0], "" + (value + extent), forwardEnabled);
    private void writeVerticalPageScroller(Device d, SPageScroller sb) throws IOException {        int value = sb.getValue();        int extent = sb.getExtent();        int minimum = sb.getMinimum();        int maximum = sb.getMaximum();        boolean backEnabled = value > minimum;        boolean forwardEnabled = value < maximum - extent;        d.print("<table orientation=\"vertical\" class=\"SLayout\"><tbody>\n")                .print("<tr height=\"1%\">\n")                .print("<td height=\"1%\" class=\"SLayout\"><table area=\"buttons\" class=\"SLayout\"><tbody>\n");        d.print("<tr><td class=\"SLayout\">");        writeButton(d, sb, DEFAULT_ICONS[SConstants.VERTICAL][FIRST][0], "" + minimum);        d.print("</td></tr>\n");        d.print("<tr><td class=\"SLayout\">");        writeButton(d, sb, DEFAULT_ICONS[SConstants.VERTICAL][BACKWARD][0], "" + (value - extent));        d.print("</td></tr>\n");        d.print("</tbody></table></td>\n")                .print("</tr>\n")                .print("<tr>\n")                .print("<td class=\"SLayout\"><table area=\"pages\" class=\"SLayout\"><tbody>\n");        int firstDirectPage = sb.getCurrentPage() - (sb.getDirectPages() - 1) / 2;        firstDirectPage = Math.min(firstDirectPage, sb.getPageCount() - sb.getDirectPages());        firstDirectPage = Math.max(firstDirectPage, 0);        for (int i = 0; i < Math.min(sb.getDirectPages(), sb.getPageCount() - firstDirectPage); i++) {            int page = firstDirectPage + i;            d.print("<tr><td class=\"SLayout\">");            writePage(d, sb, page);            d.print("</td></tr>\n");        }        d.print("</tbody></table></td>\n")                .print("</tr>\n")                .print("<tr height=\"1%\">\n")                .print("<td height=\"1%\" class=\"SLayout\"><table area=\"buttons\" class=\"SLayout\"><tbody>\n");        d.print("<tr><td class=\"SLayout\">");        writeButton(d, sb, DEFAULT_ICONS[SConstants.VERTICAL][FORWARD][0], "" + (value + extent));        d.print("</td></tr>\n");        d.print("<tr><td class=\"SLayout\">");        writeButton(d, sb, DEFAULT_ICONS[SConstants.VERTICAL][LAST][0], "" + (maximum + 1 - extent));        d.print("</td></tr>\n");        d.print("</tbody></table></td>\n")                .print("</tr>\n")                .print("</tbody></table>");    }