Get the text that should be shown in the header bar between the "prev" and "next" buttons.
969725
protected void configureNavi (FlexTable controls, int row, int col,
                                  int start, int limit, int total)
    {
        HorizontalPanel panel = new HorizontalPanel();
        panel.add(new Label("Page:")); // TODO: i18n

        // determine which pages we want to show
        int page = 1+start/_resultsPerPage;

        int pages;
        if (total < 0) {
            pages = page + 1;
        } else {
            pages = total/_resultsPerPage + (total%_resultsPerPage == 0 ? 0 : 1);
        }

        List<Integer> shown = new ArrayList<Integer>();
        shown.add(1);
        for (int ii = Math.max(2, Math.min(page-2, pages-5));
             ii <= Math.min(pages-1, Math.max(page+2, 6)); ii++) {
            shown.add(ii);
        }
        if (pages != 1) {
            shown.add(pages);
        }

        // now display those as "Page: _1_ ... _3_ _4_ 5 _6_ _7_ ... _10_"
        int ppage = 0;
        for (Integer cpage : shown) {
            if (cpage - ppage > 1) {
                panel.add(createPageLabel("...", null));
            }
            if (cpage == page) {
                panel.add(createPageLabel(""+page, "Current"));
            } else {
                panel.add(createPageLinkLabel(cpage));
            }
            ppage = cpage;
        }
        if (total < 0) {
            panel.add(createPageLabel("...", null));
        }
        controls.setWidget(row, col, panel);
        controls.getFlexCellFormatter().setHorizontalAlignment(row, col, HasAlignment.ALIGN_CENTER);
    }
421845
def show_messages(self):
        """"""
        string = self.header
        if self.static_message is not None:
            string += self.static_message.to_html()

        for message in self.dynamic_messages:
            string += message.to_html()

        string += self.footer
        print(string)
        self.setHtml(string)
1261241
private function renderPreviousButton()
    {
        $before = $this->page->before;
        $extraClass = $before ? '' : ' not-active';
        if (empty($before)) {
            $before = 1;
        }
        return $this->renderElement($before, $this->settings['label_previous'], 'prev'.$extraClass);
    }
65704
def _get_next_path(headers):
    """"""
    links = headers.get('Link', '')
    matches = re.match('<([^>]+)>; rel="next"', links)
    if matches:
        parsed = urlparse(matches.group(1))
        return "?".join([parsed.path, parsed.query])
1218032
function() {
            var options = this.getSelected();

            // First update the displayed button text.
            $('button', this.$container).html(this.options.buttonText(options, this.$select));

            // Now update the title attribute of the button.
            $('button', this.$container).attr('title', this.options.buttonTitle(options, this.$select));

        }
270078
private void obtainFinishButtonText() {
        CharSequence text;

        try {
            text = ThemeUtil.getText(this, R.attr.finishButtonText);
        } catch (NotFoundException e) {
            text = getText(R.string.finish_button_text);
        }

        setFinishButtonText(text);
    }
281824
def get_title(self):
        
        header_bar_char_list = "=-~+*#^"

        cursor_previous_line = None
        for cursor_line in textfile.readlines(self.rst_path, strip="both"):
            for header_bar_char in header_bar_char_list:
                if cursor_line.startswith(header_bar_char):
                    flag_full_bar_char = cursor_line == header_bar_char * len(cursor_line)
                    flag_line_length_greather_than_1 = len(cursor_line) >= 1
                    flag_previous_line_not_empty = bool(cursor_previous_line)
                    if flag_full_bar_char \
                            and flag_line_length_greather_than_1 \
                            and flag_previous_line_not_empty:
                        return cursor_previous_line.strip()
            cursor_previous_line = cursor_line

        msg = "Warning, this document doesn't have any %s header!" % header_bar_char_list
        return None
1202472
def getPrevUrl(self, url, data):
        """"""
        if 'chapter04' in url:
            return url.replace('chapter04', 'chapter03')
        if 'chapter03' in url:
            return url.replace('chapter03', 'chapter02')
        if 'chapter02' in url:
            return url.replace('chapter02', 'chapter01')
        return None
141312
def show_help_text(self, name, help_txt, wsname='right'):
        
        tabname = 'HELP: {}'.format(name)
        group = 1
        tabnames = self.ds.get_tabnames(group)
        if tabname in tabnames:
            # tab is already up somewhere
            return

        vbox = Widgets.VBox()
        vbox.set_margins(4, 4, 4, 4)
        vbox.set_spacing(2)

        msg_font = self.get_font('fixed', 12)
        tw = Widgets.TextArea(wrap=False, editable=False)
        tw.set_font(msg_font)
        tw.set_text(help_txt)
        vbox.add_widget(tw, stretch=1)

        btns = Widgets.HBox()
        btns.set_border_width(4)
        btns.set_spacing(3)

        def _close_cb(w):
            self.ds.remove_tab(tabname)

        btn = Widgets.Button("Close")
        btn.add_callback('activated', _close_cb)
        btns.add_widget(btn, stretch=0)
        btns.add_widget(Widgets.Label(''), stretch=1)

        vbox.add_widget(btns, stretch=0)

        self.ds.add_tab(wsname, vbox, group, tabname)
        self.ds.raise_tab(tabname)
1365402
function (headerText, prevToken) {
        if (prevToken && prevToken.type === 'paragraph' && utils.isHtml(prevToken.text)) {
            var anchorFromHtml = utils.getAnchorFromHtml(prevToken.text);
            if (anchorFromHtml) {
                return anchorFromHtml;
            }
        }

        var anchor = utils.getAnchorFromHeader(headerText, prevToken);

        if (this._cache.hasOwnProperty(anchor)) {
            anchor += '-' + this._cache[anchor]++;
        } else {
            this._cache[anchor] = 1;
        }

        return anchor;
    }
549769
def gotoNext( self ):
        
        next_page = self.currentPage() + 1
        if ( next_page > self.pageCount() ):
            return
        
        self.setCurrentPage(next_page)
942786
private void showNavButtons() {

        if (m_navButtons.isEmpty()) {
            Button addProject = CmsToolBar.createButton(
                FontOpenCms.WAND,
                CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_ADD_0));
            addProject.addClickListener(new ClickListener() {

                private static final long serialVersionUID = 1L;

                public void buttonClick(ClickEvent event) {

                    Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide);
                    CmsEditProjectForm form = new CmsEditProjectForm(m_projectsTable, window);
                    window.setContent(form);
                    window.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_ADD_0));
                    A_CmsUI.get().addWindow(window);
                    window.center();
                }
            });
            m_uiContext.addToolbarButton(addProject);
            m_navButtons.add(addProject);
            Button history = CmsToolBar.createButton(
                FontOpenCms.CLIPBOARD,
                CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_HISTORY_0));
            history.addClickListener(new ClickListener() {

                private static final long serialVersionUID = 1L;

                public void buttonClick(ClickEvent event) {

                    openSubView(CmsProjectManager.PATH_NAME_HISTORY, true);
                }
            });
            m_uiContext.addToolbarButton(history);
            m_navButtons.add(history);
            try {
                Map<String, String> infos = new LinkedHashMap<String, String>();
                infos.put(
                    CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_STATISTICS_COUNT_0),
                    String.valueOf(
                        OpenCms.getOrgUnitManager().getAllManageableProjects(A_CmsUI.getCmsObject(), "", true).size()));
                CmsInfoButton infoButton = new CmsInfoButton(infos);
                infoButton.setWindowCaption(CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_STATISTICS_0));
                infoButton.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_PROJECTS_STATISTICS_0));
                m_uiContext.addToolbarButton(infoButton);
            } catch (CmsException e) {
                LOG.error("unable to get orgunit manager", e);
            }
        } else {
            for (Component button : m_navButtons) {
                button.setVisible(true);
            }
        }
    }
317192
def text(self):
        
        if self.m_name == -1 or self.m_event != TEXT:
            return ''

        return self.sb[self.m_name]
577409
def select_previous(self):
        """"""
        self.footer.clear_message()

        if self.selected == 0:
            self.footer.draw_message("Cannot move beyond first toot.", Color.GREEN)
            return

        old_index = self.selected
        new_index = self.selected - 1

        self.selected = new_index
        self.redraw_after_selection_change(old_index, new_index)
1041226
def get_text(self):
        
        if self._multiline: return str(self._widget.toPlainText())
        else:               return str(self._widget.text())
1328977
def get_previous_character(self):
        

        cursor = self.textCursor()
        cursor.movePosition(QTextCursor.PreviousCharacter, QTextCursor.KeepAnchor)
        return cursor.selectedText()
591792
def _get_header(self, header):
        
        if header is None:
            html = self.header()
        else:
            html = header
        return html