Esempio n. 1
0
 public void setSideBar(String sideBar) {
   this.sideBar = sideBar;
   mobileNav.addStyleName(sideBar);
   if (sideBar.equals("hidden")) {
     mobileNav.getElement().getStyle().setPaddingLeft(0, Unit.PX);
     navMenu.getElement().getStyle().setDisplay(Display.BLOCK);
   }
 }
Esempio n. 2
0
 public void setAlign(String align) {
   this.align = align;
   switch (align) {
     case "right":
       anchor.addStyleName("left");
       navigation.addStyleName("right");
       break;
     case "left":
       anchor.addStyleName("right");
       navigation.addStyleName("left");
       break;
     default:
       navBar.addStyleName("navbar-fixed");
       anchor.addStyleName("left");
       navigation.addStyleName("right");
       break;
   }
 }
Esempio n. 3
0
  public void setType(String type) {
    this.type = type;
    switch (type) {
      case "fixed":
        navBar.addStyleName("navbar-" + type);
        break;

      default:
        navBar.addStyleName("navbar-fixed");
        anchor.addStyleName("left");
        navigation.addStyleName("right");
        break;
    }

    if (type.contains("no-padding")) {
      wrapper.removeStyleName("container");
    }
  }