Package com.vaadin.ui

Examples of com.vaadin.ui.Component


            @Override
            public void valueChange(ValueChangeEvent event) {
                Iterator<Component> it = ts.getComponentIterator();
                for (; it.hasNext();) {
                    Component c = it.next();
                    ts.getTab(c).setClosable(
                            (Boolean) event.getProperty().getValue());
                }
            }
        });
View Full Code Here


                        public void valueChange(ValueChangeEvent event) {
                            Class<?> c = (Class<?>) event.getProperty()
                                    .getValue();

                            try {
                                Component newInstance = (Component) c
                                        .newInstance();
                                l.addComponent(newInstance);
                                editcomponent(newInstance);
                                getMainWindow().removeWindow(chooser);
                            } catch (InstantiationException e) {
View Full Code Here

        Button removeComponent = new Button("Remove Component",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        Component last = l.getComponent(l.getComponentCount() - 1);
                        l.removeComponent(last);
                    }
                });
        header.addComponent(removeComponent);
View Full Code Here

        setView("main");

    }

    private void setView(String string) {
        Component component = views.get(string);
        if (component == null) {
            getMainWindow().showNotification(
                    "View called " + string + " not found!");
        } else if (component != currentView) {
            if (currentView != null) {
View Full Code Here

            @Override
            public void buttonClick(ClickEvent event) {
                int components = Integer.parseInt(n.getValue());
                Layout layout = getCurrentLayout();
                for (int i = 0; i < components; i++) {
                    Component component = newTestComponent();
                    if (cb.getValue()) {
                        component.setCaption("caption " + i);
                    }
                    layout.addComponent(component);
                }

                testarea.removeAllComponents();
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

            }
        }));

        for (Iterator<Component> i = controls.getComponentIterator(); i
                .hasNext();) {
            Component component = i.next();
            if (component instanceof NativeSelect) {
                NativeSelect nativeSelect = (NativeSelect) component;
                nativeSelect.setNullSelectionAllowed(false);
                nativeSelect.setValue(new ArrayList<Object>(nativeSelect
                        .getItemIds()).get(0));
View Full Code Here

                        } else {
                            newLayout = new VerticalLayout();
                        }

                        while (currentLayout.getComponentCount() > 0) {
                            Component child = currentLayout.getComponent(0);
                            Alignment alignment = currentLayout
                                    .getComponentAlignment(child);
                            float expRatio = currentLayout
                                    .getExpandRatio(child);
                            newLayout.addComponent(child);
View Full Code Here

            }
        }
    }

    private void setChildState(int childIndex, int selectIndex, int valueIndex) {
        Component child = currentLayout.getComponent(childIndex);
        setState(child, selectIndex, valueIndex);
    }
View Full Code Here

            Button b = new Button("Switch textfield/panel",
                    new ClickListener() {

                        @Override
                        public void buttonClick(ClickEvent event) {
                            Component visible = tf;

                            if (tf.isVisible()) {
                                visible = outerPanel;
                            }

                            outerPanel.setVisible(false);
                            tf.setVisible(false);

                            visible.setVisible(true);
                        }

                    });
            main.addComponent(b);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Component

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.