本文整理汇总了Java中gwt.material.design.client.constants.NavBarType类的典型用法代码示例。如果您正苦于以下问题:Java NavBarType类的具体用法?Java NavBarType怎么用?Java NavBarType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NavBarType类属于gwt.material.design.client.constants包,在下文中一共展示了NavBarType类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import gwt.material.design.client.constants.NavBarType; //导入依赖的package包/类
@PostConstruct
public void init() {
navBar.setActivates("sideNav");
navBar.setType(NavBarType.FIXED);
navBrand.setText("Chat App");
navBar.add(navBrand);
navSection.setFloat(Style.Float.RIGHT);
navSection.setHideOn(HideOn.NONE);
iconUsers.setIconType(IconType.ACCOUNT_CIRCLE);
badgeUsers.setText("0");
badgeUsers.setBackgroundColor("pink");
badgeUsers.setRight(16);
badgeUsers.setCircle(true);
iconUsers.add(badgeUsers);
navSection.add(iconUsers);
navBar.add(navSection);
}
示例2: MaterialNavBarShrink
import gwt.material.design.client.constants.NavBarType; //导入依赖的package包/类
public MaterialNavBarShrink() {
super();
setInitialClasses(NavBarType.SHRINK.getCssName());
}
示例3: Header
import gwt.material.design.client.constants.NavBarType; //导入依赖的package包/类
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);
}