Package com.vaadin.ui

Examples of com.vaadin.ui.GridLayout.addComponent()


        menu.setCaption("MenuBar");
        MenuItem mi = menu.addItem("File", icon, null);
        MenuItem smi = mi.addItem("Item", icon, null);
        smi = mi.addItem("Item", icon, null);
        smi = smi.addItem("Item", icon, null);
        gl.addComponent(menu);

        // Tree, caption + item + subitem + action icons
        Tree tree = new Tree("Tree");
        tree.addItem("Root");
        tree.setItemIcon("Root", icon);
View Full Code Here


        tree.addItem("Leaf");
        tree.setItemIcon("Leaf", icon);
        tree.setParent("Leaf", "Root");
        tree.expandItemsRecursively("Root");
        tree.addActionHandler(actionHandler);
        gl.addComponent(tree);

        // All of FontAwesome
        String allIcons = "";
        for (FontIcon ic : FontAwesome.values()) {
            allIcons += ic.getHtml() + " ";
View Full Code Here

public class TestGridLayoutLastRowRemoval extends TestCase {

    public void testRemovingLastRow() {
        GridLayout grid = new GridLayout(2, 1);
        grid.addComponent(new Label("Col1"));
        grid.addComponent(new Label("Col2"));

        try {
            // Removing the last row in the grid
            grid.removeRow(0);
View Full Code Here

public class TestGridLayoutLastRowRemoval extends TestCase {

    public void testRemovingLastRow() {
        GridLayout grid = new GridLayout(2, 1);
        grid.addComponent(new Label("Col1"));
        grid.addComponent(new Label("Col2"));

        try {
            // Removing the last row in the grid
            grid.removeRow(0);
        } catch (IllegalArgumentException iae) {
View Full Code Here

        gl.setSizeFull();
        TextField f1 = createField();
        TextField f2 = createField();
        TextField f3 = createField();
        TextField f4 = createField();
        gl.addComponent(f1);
        gl.addComponent(f2);
        gl.addComponent(f3);
        gl.addComponent(f4);

        gl.setComponentAlignment(f1, Alignment.TOP_LEFT);
View Full Code Here

        TextField f1 = createField();
        TextField f2 = createField();
        TextField f3 = createField();
        TextField f4 = createField();
        gl.addComponent(f1);
        gl.addComponent(f2);
        gl.addComponent(f3);
        gl.addComponent(f4);

        gl.setComponentAlignment(f1, Alignment.TOP_LEFT);
        gl.setComponentAlignment(f2, Alignment.TOP_RIGHT);
View Full Code Here

        TextField f2 = createField();
        TextField f3 = createField();
        TextField f4 = createField();
        gl.addComponent(f1);
        gl.addComponent(f2);
        gl.addComponent(f3);
        gl.addComponent(f4);

        gl.setComponentAlignment(f1, Alignment.TOP_LEFT);
        gl.setComponentAlignment(f2, Alignment.TOP_RIGHT);
        gl.setComponentAlignment(f3, Alignment.BOTTOM_LEFT);
View Full Code Here

        TextField f3 = createField();
        TextField f4 = createField();
        gl.addComponent(f1);
        gl.addComponent(f2);
        gl.addComponent(f3);
        gl.addComponent(f4);

        gl.setComponentAlignment(f1, Alignment.TOP_LEFT);
        gl.setComponentAlignment(f2, Alignment.TOP_RIGHT);
        gl.setComponentAlignment(f3, Alignment.BOTTOM_LEFT);
        gl.setComponentAlignment(f4, Alignment.BOTTOM_RIGHT);
View Full Code Here

        tf3.setRows(5);
        tf3.setSizeFull();
        tf3.setValue(contents);
        tf3.setCaption("TextField caption");
        // p3.getContent().addComponent(tf3);
        gl.addComponent(tf3);

        // Panel pp = new Panel();
        // pp.setCaption("OrderedLayout");
        // pp.setWidth("500px");
        // pp.setHeight("500px");
View Full Code Here

        int nr = 5;
        TextField tf;
        tf = new TextField("TextField (tabIndex 1)");
        tf.setTabIndex(1);
        tf.focus();
        layout.addComponent(tf);
        layout.addComponent(new TextField("TextField without tab index"));
        layout.addComponent(new TextField("TextField without tab index"));
        layout.addComponent(new TextField("TextField without tab index"));
        layout.addComponent(new TextField("TextField without tab index"));
        tf = new TextField("TextField (tabIndex 2)");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.