Example usage for com.google.gwt.user.client.ui DockPanel DockPanel

List of usage examples for com.google.gwt.user.client.ui DockPanel DockPanel

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui DockPanel DockPanel.

Prototype

public DockPanel() 

Source Link

Document

Creates an empty dock panel.

Usage

From source file:edu.umb.jsVGL.client.VGL.CageUI.java

License:Open Source License

/**
 * This method sets up the panels for the Cage
 *///  w w w .  j  ava  2 s.c  o  m
private void setupOrganismPanel() {

    superPanel = new DockPanel();
    DockPanel detailsPanel = new DockPanel();
    final CaptionPanel captionedDetailsPanel;
    if (id > 1) {
        captionedDetailsPanel = new CaptionPanel("Offspring");
        captionedDetailsPanel.add(detailsPanel);
        captionedDetailsPanel.setStyleName("jsVGL_RegularDetailsPanel");
    } else {
        captionedDetailsPanel = new CaptionPanel("Organisms Collected From the Wild");
        captionedDetailsPanel.add(detailsPanel);
        captionedDetailsPanel.setStyleName("jsVGL_FieldPopDetailsPanel");
    }
    HorizontalPanel individualPanel = new HorizontalPanel();

    CaptionPanel captionedOrganismPanel = new CaptionPanel("Organisms");
    captionedOrganismPanel.setStyleName("jsVGL_CageInfoSubPanels");
    VerticalPanel organismsPanel = new VerticalPanel();
    captionedOrganismPanel.add(organismsPanel);

    CaptionPanel captionedCountsPanel = new CaptionPanel("Counts");
    captionedCountsPanel.setStyleName("jsVGL_CageInfoSubPanels");
    VerticalPanel countsPanel = new VerticalPanel();
    captionedCountsPanel.add(countsPanel);

    // headers for the different traits
    CaptionPanel[] captionedTraitPanels = new CaptionPanel[numberOfTraits];
    VerticalPanel[] traitPanels = new VerticalPanel[numberOfTraits];

    // need to get the type of each trait
    //  get one organism's pheno (it doesn't matter which one)
    ArrayList<Phenotype> phenotypes = childrenSortedByPhenotype[0].get(0).getPhenotypes();
    for (int i = 0; i < numberOfTraits; i++) {
        traitPanels[i] = new VerticalPanel();
        captionedTraitPanels[i] = new CaptionPanel(
                phenotypes.get(scrambledTraitOrder[i]).getTrait().getBodyPart());
        captionedTraitPanels[i].setStyleName("jsVGL_CageInfoSubPanels");
        captionedTraitPanels[i].add(traitPanels[i]);
    }

    if (isSuperCross) {
        childrenOrganismUIs = new OrganismUI[2 * numPhenosPresent][absoluteMaxOrgsPerRow];
    } else {
        childrenOrganismUIs = new OrganismUI[2 * numPhenosPresent][maxOrgsInOneRow];
    }

    //For each phenotype, setup its own panels for organismUIs,count and
    //pictures and add them to the right places in the organismpanel,
    // countspanel, phenotype panels
    //and the picturespanel
    for (int i = 0; i < numPhenosPresent; i++) {
        IndividualPanelSet panelSet = setupIndividualPanel(i);
        organismsPanel.add(panelSet.getOrganismPanel());
        countsPanel.add(panelSet.getCountsPanel());
        HorizontalPanel[] phenoPanels = panelSet.getPhenotypePanels();
        for (int j = 0; j < numberOfTraits; j++) {
            traitPanels[j].add(phenoPanels[scrambledTraitOrder[j]]);
        }
    }

    for (int i = 0; i < numberOfTraits; i++) {
        individualPanel.add(captionedTraitPanels[i]);
    }

    individualPanel.add(captionedOrganismPanel);

    individualPanel.add(captionedCountsPanel);

    detailsPanel.add(individualPanel, DockPanel.NORTH);

    superPanel.add(captionedDetailsPanel, DockPanel.SOUTH);

    final CaptionPanel captionedParentInfoPanel = setupParentInfoPanel();

    HorizontalPanel collapseExpandPanel = new HorizontalPanel();
    collapseExpandPanel.setStyleName("jsVGL_CollapseExpandPanel");
    final Button collapseExpandButton = new Button("Minimize");
    collapseExpandButton.setStyleName("jsVGL_CollapseExpandButton");
    collapseExpandButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            if (isMinimized) {
                collapseExpandButton.setText("Minimize");
                isMinimized = false;
                superPanel.add(captionedDetailsPanel, DockPanel.SOUTH);
                if (id > 1)
                    superPanel.add(captionedParentInfoPanel, DockPanel.NORTH);
            } else {
                collapseExpandButton.setText("Maximize");
                isMinimized = true;
                superPanel.remove(captionedDetailsPanel);
                if (id > 1)
                    superPanel.remove(captionedParentInfoPanel);
            }
        }
    });
    collapseExpandPanel.add(collapseExpandButton);
    superPanel.add(collapseExpandPanel, DockPanel.NORTH);
    if (captionedParentInfoPanel != null) {
        superPanel.add(captionedParentInfoPanel, DockPanel.NORTH);
    }

}

From source file:eu.europeana.uim.gui.cp.client.europeanawidgets.ImportResourcesWidget.java

License:EUPL

/**
 * Creates the Search Criteria Section/*from  w w w  .j  av a 2  s .c o  m*/
 */
private Widget createAdvancedForm() {

    DockPanel dock = new DockPanel();

    // Create a table to layout the form options
    FlexTable layout = new FlexTable();
    layout.setCellSpacing(6);
    layout.setWidth("500px");
    FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();

    // Add a title to the form
    layout.setHTML(0, 2, "<b>Search Criteria</b>");
    cellFormatter.setColSpan(0, 0, 2);
    cellFormatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER);

    // Add some standard form options

    TextBox dsnameSearchField = new TextBox();
    setDOMID(dsnameSearchField, "dsnameSearchField");

    final ListBox statusSearchField = new ListBox(false);
    statusSearchField.addItem("--", "");
    statusSearchField.addItem(RecordStates.OAI_PMH_TESTING.getDescription(),
            RecordStates.OAI_PMH_TESTING.getSysId());
    statusSearchField.addItem(RecordStates.OAI_PMH_SENT_TO_ORG.getDescription(),
            RecordStates.OAI_PMH_SENT_TO_ORG.getSysId());
    statusSearchField.addItem(RecordStates.READY_FOR_HARVESTING.getDescription(),
            RecordStates.READY_FOR_HARVESTING.getSysId());
    statusSearchField.addItem(RecordStates.MAPPING_AND_NORMALIZATION.getDescription(),
            RecordStates.MAPPING_AND_NORMALIZATION.getSysId());
    statusSearchField.addItem(RecordStates.READY_FOR_REPLICATION.getDescription(),
            RecordStates.READY_FOR_REPLICATION.getSysId());
    statusSearchField.addItem(RecordStates.ONGOING_SCHEDULED_UPDATES.getDescription(),
            RecordStates.ONGOING_SCHEDULED_UPDATES.getSysId());
    statusSearchField.addItem(RecordStates.INGESTION_COMPLETE.getDescription(),
            RecordStates.INGESTION_COMPLETE.getSysId());
    statusSearchField.addItem(RecordStates.DISABLED_AND_REPLACED.getDescription(),
            RecordStates.DISABLED_AND_REPLACED.getSysId());
    statusSearchField.addItem(RecordStates.HARVESTING_PENDING.getDescription(),
            RecordStates.HARVESTING_PENDING.getSysId());
    setDOMID(statusSearchField, "statusSearchField");

    importButton = new Button();
    importButton.setText(EuropeanaClientConstants.IMPORTBUTTONLABEL);
    importButton.setTitle(EuropeanaClientConstants.IMPORTBUTTONTITLE);

    importButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            importDialog.center();
            performImport();
        }
    });

    searchButton = new Button();
    searchButton.setText(EuropeanaClientConstants.SEARCHBUTTONLABEL);
    searchButton.setTitle(EuropeanaClientConstants.SEARCHBUTTONTITLE);

    searchButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            searchDialog.center();
            performSearch();
        }
    });

    layout.setHTML(1, 0, EuropeanaClientConstants.DSNAMESEARCHLABEL);
    layout.setWidget(1, 1, dsnameSearchField);

    layout.setHTML(1, 2, EuropeanaClientConstants.STATUSSEARCHLABEL);
    layout.setWidget(1, 3, statusSearchField);

    layout.setWidget(3, 0, searchButton);
    layout.setWidget(3, 1, importButton);

    //Put Legend here

    DisclosurePanel advancedDisclosure = new DisclosurePanel("Show legend");
    advancedDisclosure.setAnimationEnabled(true);
    advancedDisclosure.ensureDebugId("cwDisclosurePanel");

    FlexTable legendcontents = new FlexTable();

    legendcontents.setWidget(0, 0, new Image(EuropeanaClientConstants.SUCCESSIMAGELOC));
    legendcontents.setWidget(0, 1, new HTML(EuropeanaClientConstants.LEGENDSUCCESSLABEL));
    legendcontents.setWidget(1, 0, new Image(EuropeanaClientConstants.ERRORIMAGELOC));
    legendcontents.setWidget(1, 1, new HTML(EuropeanaClientConstants.LEGENDNALABEL));
    legendcontents.setWidget(2, 0, new Image(EuropeanaClientConstants.PROBLEMIMAGELOC));
    legendcontents.setWidget(2, 1, new HTML(EuropeanaClientConstants.LEGENDFAILURELABEL));
    advancedDisclosure.add(legendcontents);

    // Wrap the contents in a DecoratorPanel

    dock.add(layout, DockPanel.NORTH);

    dock.add(advancedDisclosure, DockPanel.NORTH);

    DecoratorPanel decPanel = new DecoratorPanel();
    decPanel.setWidget(dock);
    return decPanel;
}

From source file:eu.europeana.web.timeline.client.ui.Period.java

License:EUPL

private CellPanel createPanel() {
    return new DockPanel();
}

From source file:eu.riscoss.client.report.ReportModule.java

License:Apache License

protected void showResults(JSONObject object) {
    page.clear();//from  w ww . j  a v a2  s .  c om
    if (dock != null) {
        while (dock.getWidgetCount() > 0) {
            dock.remove(dock.getWidget(0));
        }
        dock.removeFromParent();
        dock = new DockPanel();
    }

    if (object.get("results") == null)
        return;
    JSONArray response = object.get("results").isArray();

    //      Window.alert( "2: " + response );
    RiskAnalysisReport report = new RiskAnalysisReport();
    report.showResults(null, response, object.isObject().get("argumentation"));

    DisclosurePanel dp = new DisclosurePanel("Input values used for this evaluation");

    JSONArray inputs = getArray(object, "inputs");
    Grid inputgrid = new Grid(inputs.size(), 2);
    for (int i = 0; i < inputs.size(); i++) {
        JSONObject o = inputs.get(i).isObject();
        //         Window.alert( "" + o );
        inputgrid.setWidget(i, 0, new Label(o.get("id").isString().stringValue()));
        inputgrid.setWidget(i, 1, new Label(o.get("value").isString().stringValue()));
    }
    dp.setContent(inputgrid);

    Anchor a = new Anchor("Change input values...");
    a.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (inputForm != null)
                inputForm.show(new Callback<JSONObject>() {
                    @Override
                    public void onError(Throwable t) {
                        Window.alert(t.getMessage());
                    }

                    @Override
                    public void onDone(JSONObject o) {
                        startAnalysisWorkflow(EAnalysisOption.RunThrough, o);
                    }
                });
        }
    });

    dock.setSize("100%", "100%");
    //      grid.setSize( "100%", "100%" );

    dock.add(
            new HTML("<h1>" + "Risk analysis report of "
                    + object.get("info").isObject().get("entity").isString().stringValue() + "</h1>"),
            DockPanel.NORTH);

    dock.add(report, DockPanel.CENTER);
    dock.add(a, DockPanel.NORTH);
    dock.add(dp, DockPanel.SOUTH);

    mainView.setStyleName("mainViewLayer");
    mainView.setWidth("100%");
    page.setWidth("100%");

    Label title = new Label(
            "Risk analysis report of " + object.get("info").isObject().get("entity").isString().stringValue());
    title.setStyleName("title");
    page.add(title);

    a.setStyleName("leftPanel");
    page.add(a);
    //report.setStyleName("leftPanel");
    page.add(report);
    dp.setStyleName("leftPanel");
    page.add(dp);

    //RootPanel.get().add( dock );
    RootPanel.get().add(page);
}

From source file:eu.riscoss.client.riskconfs.ModelSelectionDialog.java

License:Apache License

public void show(Callback<List<String>> cb) {

    this.callback = cb;

    RiscossJsonClient.listModels(new JsonCallback() {
        @Override/*from w w  w  . j  a v  a2  s .c o m*/
        public void onFailure(Method method, Throwable exception) {
            Window.alert(exception.getMessage());
        }

        @Override
        public void onSuccess(Method method, JSONValue response) {
            JsonModelList list = new JsonModelList(response);
            dialog = new DialogBox(true, true); //, new HtmlCaption( "Add model" ) );
            dialog.setText("Model Selection");
            Grid grid = new Grid();
            grid.resize(list.getModelCount(), 1);
            for (int i = 0; i < list.getModelCount(); i++) {
                ModelInfo info = list.getModelInfo(i);
                CheckBox chk = new CheckBox(info.getName());
                chk.setName(info.getName());
                chk.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        CheckBox chk = (CheckBox) event.getSource();
                        boolean value = chk.getValue();
                        if (value == true) {
                            selection.add(chk.getName());
                        } else {
                            selection.remove(chk.getName());
                        }
                    }
                });
                grid.setWidget(i, 0, chk);
            }
            DockPanel dock = new DockPanel();
            dock.add(grid, DockPanel.CENTER);
            Button ok = new Button("Ok", new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    dialog.hide();
                    if (callback != null) {
                        callback.onDone(new ArrayList<String>(selection));
                    }
                }
            });
            Button cancel = new Button("Cancel", new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    dialog.hide();
                }
            });
            ok.setStyleName("deleteButton");
            cancel.setStyleName("deleteButton");
            HorizontalPanel buttons = new HorizontalPanel();
            buttons.add(ok);
            buttons.add(cancel);
            dock.add(buttons, DockPanel.SOUTH);
            dialog.add(dock);
            dialog.getElement().getStyle().setZIndex(Integer.MAX_VALUE);
            dialog.show();
        }
    });
}

From source file:eu.riscoss.client.riskconfs.ModelSelectionDialog.java

License:Apache License

public void show(String l, SimpleRiskCconf rconf, Callback<List<String>> cb) {

    this.callback = cb;
    this.rc = rconf;
    this.layer = l;

    RiscossJsonClient.listModels(new JsonCallback() {
        @Override//ww  w. jav a  2  s  . c om
        public void onFailure(Method method, Throwable exception) {
            Window.alert(exception.getMessage());
        }

        @Override
        public void onSuccess(Method method, JSONValue response) {
            JsonModelList list = new JsonModelList(response);
            List<String> l = rc.getModelList(layer);
            dialog = new DialogBox(true, true); //, new HtmlCaption( "Add model" ) );
            dialog.setText("Model Selection");
            Grid grid = new Grid();
            grid.resize(list.getModelCount(), 1);
            for (int i = 0; i < list.getModelCount(); i++) {
                ModelInfo info = list.getModelInfo(i);
                CheckBox chk = new CheckBox(info.getName());
                chk.setName(info.getName());
                chk.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        CheckBox chk = (CheckBox) event.getSource();
                        boolean value = chk.getValue();
                        if (value == true) {
                            selection.add(chk.getName());
                        } else {
                            selection.remove(chk.getName());
                        }
                    }
                });
                if (l.contains(info.getName())) {
                    chk.setChecked(true);
                    selection.add(chk.getName());
                }
                grid.setWidget(i, 0, chk);
            }
            DockPanel dock = new DockPanel();
            dock.add(grid, DockPanel.CENTER);
            Button ok = new Button("Ok", new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    dialog.hide();
                    if (callback != null) {
                        callback.onDone(new ArrayList<String>(selection));
                    }
                }
            });
            Button cancel = new Button("Cancel", new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    dialog.hide();
                }
            });
            ok.setStyleName("deleteButton");
            cancel.setStyleName("deleteButton");
            HorizontalPanel buttons = new HorizontalPanel();
            buttons.add(ok);
            buttons.add(cancel);
            dock.add(buttons, DockPanel.SOUTH);
            dialog.add(dock);
            dialog.getElement().getStyle().setZIndex(Integer.MAX_VALUE);
            dialog.show();
        }
    });
}

From source file:eu.riscoss.client.riskconfs.NewModelDialog.java

License:Apache License

public void show(String rcName) {

    //         this.callback = cb;
    this.selectedRC = rcName;

    RiscossJsonClient.listModels(new JsonCallback() {
        @Override/*w  w w.  j  a  va 2s  .c  om*/
        public void onFailure(Method method, Throwable exception) {
            Window.alert(exception.getMessage());
        }

        @Override
        public void onSuccess(Method method, JSONValue response) {
            JsonModelList list = new JsonModelList(response);
            dialog = new DialogBox(true, true); //, new HtmlCaption( "Add model" ) );
            Grid grid = new Grid();
            grid.resize(list.getModelCount(), 1);
            for (int i = 0; i < list.getModelCount(); i++) {
                ModelInfo info = list.getModelInfo(i);
                CheckBox chk = new CheckBox(info.getName());
                chk.setName(info.getName());
                chk.addClickHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        CheckBox chk = (CheckBox) event.getSource();
                        boolean value = chk.getValue();
                        if (value == true) {
                            selection.add(chk.getName());
                        } else {
                            selection.remove(chk.getName());
                        }
                    }
                });
                grid.setWidget(i, 0, chk);
            }
            DockPanel dock = new DockPanel();
            dock.add(grid, DockPanel.CENTER);
            dock.add(new Button("Ok", new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    //                     SimpleRiskCconf rc = new SimpleRiskCconf( selection );
                    //                     RiscossJsonClient.setRCContent( selectedRC, rc, new JsonCallback() {
                    //                        
                    //                        @Override
                    //                        public void onSuccess(Method method, JSONValue response) {
                    //                           dialog.hide();
                    ////                           if( callback != null ) {
                    ////                              callback.onDone( null );
                    ////                           }
                    //                        }
                    //                        
                    //                        @Override
                    //                        public void onFailure(Method method, Throwable exception) {
                    //                           Window.alert( exception.getMessage() );
                    //                        }
                    //                     });
                }
            }), DockPanel.SOUTH);
            dialog.add(dock);
            dialog.show();
        }
    });
}

From source file:fr.aliasource.webmail.client.AdvancedSearchForms.java

License:GNU General Public License

private Widget createHeader() {
    HorizontalPanel hp = new HorizontalPanel();
    hp.getElement().setAttribute("style", "width:100%; padding-left: 10em");

    DockPanel titleBar = new DockPanel();
    Label title = new Label(I18N.strings.searchOptions());
    title.setStyleName("bold");
    Anchor hideOptions = new Anchor(I18N.strings.hideSearchOptions());
    hideOptions.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            hideOptions();//www.  j a v  a 2 s .c o m
        }
    });

    titleBar.add(title, DockPanel.WEST);

    titleBar.add(hideOptions, DockPanel.EAST);
    titleBar.setCellHorizontalAlignment(hideOptions, DockPanel.ALIGN_RIGHT);
    titleBar.setStyleName("advancedSearchHeader");
    titleBar.setWidth("100%");

    hp.add(titleBar);
    return hp;
}

From source file:fr.aliasource.webmail.client.composer.AttachmentUploadWidget.java

License:GNU General Public License

public AttachmentUploadWidget(AttachmentsPanel attPanel, String attId, boolean alreadyOnServer) {
    this.attachPanel = attPanel;
    this.attachementId = attId;
    dp = new DockPanel();
    dp.setSpacing(1);/* ww  w .  j  a  va2s . c  o  m*/

    setWidget(dp);

    if (!alreadyOnServer) {
        // when we create a forward, the attachment are already on the
        // backend
        buildUpload(dp);
    } else {
        // we're creating a forwarded message
        buildDisplay(dp);
    }

}

From source file:fr.aliasource.webmail.client.conversations.ConversationListActionsPanel.java

License:GNU General Public License

private void initConvToolbar(DockPanel convToolbar, final ConversationListPanel clp) {

    DockPanel leftActions = new DockPanel();

    actions = new HorizontalPanel();
    delete = new Button(I18N.strings.delete());
    delete.addStyleName("deleteButton");
    delete.setEnabled(false);//from   w w  w  .  j av  a  2 s  . com
    actions.add(delete);
    actions.setCellVerticalAlignment(delete, HorizontalPanel.ALIGN_MIDDLE);
    delete.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent ev) {
            clp.deleteConversation();
        }
    });

    // FIXME: merge reportSpam and notSpam in spamActions
    reportSpam = new Button(I18N.strings.markAsSpam());
    reportSpam.addStyleName("noWrap");
    reportSpam.setEnabled(false);
    actions.add(reportSpam);
    actions.setCellVerticalAlignment(reportSpam, HorizontalPanel.ALIGN_MIDDLE);
    reportSpam.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            clp.moveConversation(WebmailController.get().getSelector().getCurrent(),
                    new Folder(WebmailController.get().getSetting(GetSettings.SPAM_FOLDER)), true, null);
        }
    });

    notSpam = new Button(I18N.strings.notSpam());
    notSpam.addStyleName("noWrap");
    notSpam.setEnabled(false);
    notSpam.setVisible(false);

    actions.add(notSpam);
    actions.setCellVerticalAlignment(notSpam, HorizontalPanel.ALIGN_MIDDLE);

    notSpam.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            clp.moveConversation(WebmailController.get().getSelector().getCurrent(), new Folder("INBOX"), true,
                    null);
        }
    });

    HorizontalPanel hp = new HorizontalPanel();
    hp.setSpacing(0);
    moveToButton = new MoveConversationsMenu(I18N.strings.moveTo(), clp, true, position);
    hp.add(moveToButton);
    copyToButton = new MoveConversationsMenu(I18N.strings.copyTo(), clp, false, position);
    hp.add(copyToButton);

    actions.add(hp);
    actions.setCellVerticalAlignment(hp, HasVerticalAlignment.ALIGN_MIDDLE);

    moreActions = new MoreActionMenu(I18N.strings.moreActions(), clp, position);
    actions.add(moreActions);
    actions.setCellVerticalAlignment(moreActions, HorizontalPanel.ALIGN_MIDDLE);

    actions.setSpacing(3);

    actions.addStyleName("actionBox");

    leftActions.add(actions, DockPanel.NORTH);

    HorizontalPanel selection = new HorizontalPanel();
    selection.addStyleName("panelActions");
    selection.add(new Label(I18N.strings.select() + ": "));

    createSelectors(clp, selection);
    selection.addStyleName("selectionBox");
    leftActions.add(selection, DockPanel.SOUTH);

    convToolbar.add(leftActions, DockPanel.WEST);

    newest = new Button(" " + I18N.strings.newest());
    newest.addStyleName("noWrap");
    newest.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            clp.showPage(1);
        }
    });
    newer = new Button(" " + I18N.strings.newer());
    newer.addStyleName("noWrap");
    newer.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            clp.showPage(clp.getCurrentPage() - 1);
        }
    });

    countLabel = new Label();
    countLabel.addStyleName("noWrap");
    older = new Button(I18N.strings.older() + " ");
    older.addStyleName("noWrap");
    older.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            clp.showPage(clp.getCurrentPage() + 1);
        }
    });

    oldest = new Button(I18N.strings.oldest() + " ");
    oldest.addStyleName("noWrap");
    oldest.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent sender) {
            clp.showPage(clp.getLastPage());
        }
    });

    VerticalPanel rightVrt = new VerticalPanel();

    HorizontalPanel right = new HorizontalPanel();
    right.add(newest);
    right.add(newer);
    right.add(countLabel);
    right.setCellVerticalAlignment(countLabel, HorizontalPanel.ALIGN_MIDDLE);
    right.add(older);
    right.add(oldest);
    right.setSpacing(3);

    rightVrt.add(right);
    convFolderQuota = new ConversationFolderQuota(this.ui);
    rightVrt.add(convFolderQuota);
    rightVrt.setHorizontalAlignment(ALIGN_RIGHT);
    rightVrt.setCellHorizontalAlignment(convFolderQuota, VerticalPanel.ALIGN_RIGHT);

    right.setCellVerticalAlignment(right, VerticalPanel.ALIGN_MIDDLE);

    convToolbar.add(rightVrt, DockPanel.EAST);
    convToolbar.setCellHorizontalAlignment(rightVrt, DockPanel.ALIGN_RIGHT);

    newest.setVisible(false);
    newer.setVisible(false);
    older.setVisible(false);
    oldest.setVisible(false);
}