gwt.material.design.client.ui.MaterialNavBar Java Examples
The following examples show how to use
gwt.material.design.client.ui.MaterialNavBar.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProgressMixin.java From gwt-material with Apache License 2.0 | 5 votes |
@Override public void showProgress(ProgressType type) { if (uiObject instanceof MaterialCollapsibleItem) { applyCollapsibleProgress(true); } else if (uiObject instanceof MaterialNavBar) { ((MaterialNavBar) uiObject).add(progress); } }
Example #2
Source File: Header.java From lumongo with Apache License 2.0 | 4 votes |
public Header() { MaterialNavBar navBar = new MaterialNavBar(); navBar.setActivates("sideNav"); navBar.setType(NavBarType.FIXED); navBar.setWidth("100%"); navBar.setBackgroundColor(Color.GREY_DARKEN_2); MaterialNavSection navSection = new MaterialNavSection(); navSection.setTextAlign(TextAlign.RIGHT); navBar.add(navSection); sideNav = new MaterialSideNav(SideNavType.PUSH); sideNav.setWidth("60"); sideNav.setId("sideNav"); sideNav.setBackgroundColor(Color.GREY_LIGHTEN_3); sideNav.setCloseOnClick(true); sideNav.setType(SideNavType.PUSH); MaterialNavBrand navBrand = new MaterialNavBrand(); navBrand.add(new MaterialImage(MainResources.INSTANCE.logo())); navBrand.setHref("#"); navBrand.addClickHandler(clickEvent -> sideNav.hide()); sideNav.add(navBrand); { MaterialLink overView = new MaterialLink(IconType.INFO); overView.setTitle("Overview"); overView.addClickHandler(clickEvent -> MainController.get().goTo(new HomePlace())); sideNav.add(overView); } { MaterialLink indexes = new MaterialLink(IconType.SEARCH); indexes.setTitle("Query"); indexes.addClickHandler(clickEvent -> MainController.get().goTo(new QueryPlace(null))); sideNav.add(indexes); } add(navBar); add(sideNav); }