Package de.mhus.lib.vaadin

Examples of de.mhus.lib.vaadin.CardButton


public class DefaultNavigation extends VerticalLayout implements XLayElement, DesktopInject, Observer, Button.ClickListener {

  private Desktop desktop;

  protected Button historyButton(NavigationNode n, boolean isSelected) {
    CardButton b = new CardButton(n.getTitle());
    if (isSelected) {
      b.setBackgroundColor("#000");
      b.setForegroundColor("#fff");
    } else {
      b.setBackgroundColor("#aaa");
      b.setForegroundColor("#000");
    }
    b.setBorder(new Border(1,0,1,0));
    b.setMargin(new Border(1,0,0,0));
    b.setWidth("100%");
    b.setHeight("40px");
    b.updateCaption();
    b.setData(n);
    b.addListener(this);
   
    return b;
  }
View Full Code Here


   
    return b;
  }
 
  protected Button childButton(NavigationNode n, boolean isSelected) {
    CardButton b = new CardButton(n.getTitle());
    if (isSelected) {
      b.setBackgroundColor("#000");
      b.setForegroundColor("#fff");
    } else {
      b.setBackgroundColor("#ccc");
      b.setForegroundColor("#000");
    }
    b.setBorder(new Border(1,0,1,0));
    b.setMargin(new Border(1,0,0,20));
    b.setWidth("100%");
    b.setHeight("40px");
    b.updateCaption();
    b.setData(n);
    b.addListener(this);

    return b;
  }
View Full Code Here

    out.setHeight("30px");
    return out;
  }

  protected Button historyButton(NavigationNode n) {
    CardButton b = new CardButton(n.getTitle());
//    b.setBackgroundColor("#aaa");
    b.setForegroundColor("#000");
//    b.setBorder(new Border(1,0,1,0));
    b.setMargin(new Border(1,0,0,0));
    //b.setWidth("100%");
    b.setHeight("30px");
    b.updateCaption();
    b.setData(n);
    b.addListener(this);
   
    return b;
  }
View Full Code Here

TOP

Related Classes of de.mhus.lib.vaadin.CardButton

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.