vaadin

Vaadin TouchKit

Setup

@Theme("mobiletheme")
@Widgetset("com.example.myapp.MyAppWidgetSet")
@Title("My Mobile App")
public class SimplePhoneUI extends UI {

@Override
protected void init(VaadinRequest request) {

    // Define a view

    class MyView extends NavigationView {

     public MyView() {
         super("Planet Details");
         CssLayout content = new CssLayout();
         setContent(content);
         VerticalComponentGroup group = new VerticalComponentGroup();
         content.addComponent(group);
         group.addComponent(new TextField("Planet"));
         group.addComponent(new NumberField("Found"));
         group.addComponent(new Switch("Probed"));
         setRightComponent(new Button("OK"));
        }
   }
   // Use it as the content root
   setContent(new MyView());
}

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow