Search in sources :

Example 1 with Breadcrumbs

use of org.gwtbootstrap3.client.ui.Breadcrumbs in project ovirt-engine by oVirt.

the class OvirtBreadCrumbsView method buildCrumbs.

@Override
public void buildCrumbs(String modelTitle, String modelHref) {
    // Clear the existing path.
    container.clear();
    breadCrumbs = new Breadcrumbs();
    container.add(breadCrumbs);
    // Add primary menu label.
    String primaryLabel = menuDetailsProvider.getLabelFromHref(modelHref);
    if (primaryLabel != null) {
        breadCrumbs.add(new ListItem(primaryLabel));
    }
    menuDetailsProvider.setMenuActive(modelHref);
    // Add main model name.
    AnchorListItem mainModelAnchor = new AnchorListItem(modelTitle);
    // $NON-NLS-1$
    mainModelAnchor.setHref("#" + modelHref);
    breadCrumbs.add(mainModelAnchor);
    if (currentSelectedItemWidget != null && !hideSelectedWidget) {
        breadCrumbs.add(currentSelectedItemWidget);
    }
}
Also used : AnchorListItem(org.gwtbootstrap3.client.ui.AnchorListItem) Breadcrumbs(org.gwtbootstrap3.client.ui.Breadcrumbs) ListItem(org.gwtbootstrap3.client.ui.ListItem) AnchorListItem(org.gwtbootstrap3.client.ui.AnchorListItem)

Aggregations

AnchorListItem (org.gwtbootstrap3.client.ui.AnchorListItem)1 Breadcrumbs (org.gwtbootstrap3.client.ui.Breadcrumbs)1 ListItem (org.gwtbootstrap3.client.ui.ListItem)1