Package com.vaadin.ui

Examples of com.vaadin.ui.NativeButton


        AbstractComponent b = new Button("Normal Button");
        b.setDescription("This is a tooltip!");
        l.addComponent(b);

        b = new NativeButton("Native Button");
        b.setDescription("<h2><img src=\"/html/VAADIN/themes/runo/icons/16/globe.png\"/>A richtext tooltip</h2>"
                + "<ul>"
                + "<li>HTML formatting</li><li>Images<br/>"
                + "</li><li>etc...</li></ul>");
        l.addComponent(b);

        b = new CheckBox("Checkbox");
        l.addComponent(b);

        b = new Button("Disabled");
        b.setEnabled(false);
        l.addComponent(b);

        b = new NativeButton("Disabled");
        b.setEnabled(false);
        l.addComponent(b);

        b = new CheckBox("Disabled");
        b.setEnabled(false);
        l.addComponent(b);

        b = new Button("OK");
        b.setIcon(ICON_OK);
        l.addComponent(b);

        b = new NativeButton("OK");
        b.setIcon(ICON_OK);
        l.addComponent(b);

        b = new CheckBox("OK");
        b.setIcon(ICON_OK);
        l.addComponent(b);

        b = new Button("Link Button");
        b.setStyleName(LiferayTheme.BUTTON_LINK);
        l.addComponent(b);

        b = new NativeButton("Link Button");
        b.setStyleName(LiferayTheme.BUTTON_LINK);
        l.addComponent(b);

        l.newLine();

        b = new Button("Link Button");
        b.setIcon(ICON_OK);
        b.setStyleName(LiferayTheme.BUTTON_LINK);
        l.addComponent(b);

        b = new NativeButton("Link Button");
        b.setIcon(ICON_OK);
        b.setStyleName(LiferayTheme.BUTTON_LINK);
        l.addComponent(b);

        return l;
View Full Code Here


public class GridLayoutWidthChange extends AbstractTestUI {

    private GridLayout generateLayout() {
        VerticalLayout fields1 = new VerticalLayout();

        NativeButton nb = new NativeButton("A button");
        nb.setHeight("300px");
        fields1.addComponent(nb);

        VerticalLayout fields3 = new VerticalLayout();
        fields3.addComponent(new TextField("field14"));

        NativeButton b = new NativeButton("A big button");
        b.setWidth("200px");
        b.setHeight("200px");

        GridLayout layout = new GridLayout(3, 2);
        layout.setHideEmptyRowsAndColumns(true);
        layout.setWidth("100%");
        layout.addComponent(fields1, 0, 0, 0, 1);
View Full Code Here

        final AbsoluteLayout layout = new AbsoluteLayout();
        layout.setWidth("100px");
        layout.setWidth("200px");
        layout.setPrimaryStyleName("my-absolute-layout");

        Component comp1 = new NativeButton("Child 1");
        comp1.setWidth("100%");
        comp1.setHeight("50px");
        layout.addComponent(comp1);

        addComponent(layout);

        addComponent(new Button("Change primary stylename",
View Full Code Here

        addComponent(toggleRequired());
        // addComponent(toggleCaptions());
        addComponent(toggleError());
        addComponent(toggleIcon());
        addComponent(addCaptionText());
        layoutParent.addComponent(new NativeButton("Button right of layout"));
        addComponent(layoutParent);
        addComponent(new NativeButton("Button below layout"));
        createComponents();
        layoutSelect.setValue(layoutSelect.getItemIds().iterator().next());
    }
View Full Code Here

        menu.addComponent(new Button("Set body to huge NativeButton",
                new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        layout.addComponent(new NativeButton(
                                "This is it, the body!"), "body");
                    }
                }));
        layout.addComponent(menu, "menu");
    }
View Full Code Here

        LegacyWindow w = new LegacyWindow("Test", sp);
        setMainWindow(w);
    }

    private Button createButton(String height) {
        Button b = new NativeButton("A BIG button");
        b.setHeight(height);
        b.addListener(this);
        return b;
    }
View Full Code Here

        return c;
    }

    /** Create new NativeButton and add it to current component container. */
    public NativeButton nativebutton() {
        NativeButton c = new NativeButton();
        c.setImmediate(true);
        add(c);
        return c;
    }
View Full Code Here

    /**
     * Create new NativeButton with given caption and add it to current
     * component container.
     */
    public NativeButton nativebutton(String caption) {
        NativeButton c = nativebutton();
        c.setCaption(caption);
        return c;
    }
View Full Code Here

    }

    /** Create new NativeButton with given caption and listener. */
    public NativeButton nativebutton(String caption,
            Button.ClickListener listener) {
        NativeButton c = nativebutton(caption);
        c.addListener((Button.ClickListener) listener);
        return c;
    }
View Full Code Here

    this.desktop = desktop;
  }

  @Override
  public Component getUI() {
        Button logo = new NativeButton("Name", new Button.ClickListener() {

      private static final long serialVersionUID = 1L;

      @Override
      public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
       
      }
        });
        logo.setDescription("Home");
        logo.setDebugId("homeButton");
        //logo.setStyleName(BaseTheme.BUTTON_LINK);
        //logo.addStyleName("logo");
        logo.setHeight("50px");
        return logo;
  }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.NativeButton

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.