Examples of addListener()


Examples of com.vaadin.addon.timeline.Timeline.addListener()

    timeline.setBrowserOutlineColor(graphDataSource, Color.BLACK);
    timeline.setBrowserFillColor(graphDataSource, new Color(0, 0, 0, 128));

    // adding a listener
    timeline.addListener(new Timeline.EventClickListener() {

      @Override
      public void eventClick(EventButtonClickEvent event) {
        Item item = eventDataSource.getItem(event.getItemIds()
            .iterator().next());
View Full Code Here

Examples of com.vaadin.data.Container.ItemSetChangeNotifier.addListener()

                // Ensure we not already are listening to the events
                isn.removeListener(dataSourceListener);

                // Add listener
                isn.addListener(dataSourceListener);
            }
            if (dataSource instanceof PropertySetChangeNotifier) {
                getLogger()
                        .finest("Attaching PropertySetChangeListener to graph datasource");
                PropertySetChangeNotifier pscn = (PropertySetChangeNotifier) dataSource;
View Full Code Here

Examples of com.vaadin.data.Container.PropertySetChangeNotifier.addListener()

                // Ensure we not already are listening to the events
                pscn.removeListener(dataSourceListener);

                // Add listener
                pscn.addListener(dataSourceListener);
            }
            if (dataSource instanceof ValueChangeNotifier) {
                getLogger().finest(
                        "Attaching ValueChangeListener to graph datasource");
                ValueChangeNotifier vcn = (ValueChangeNotifier) dataSource;
View Full Code Here

Examples of com.vaadin.data.Property.ValueChangeNotifier.addListener()

        if (property instanceof ValueChangeNotifier) {
            // avoid multiple notifications for the same property if
            // multiple filters are in use
            ValueChangeNotifier notifier = (ValueChangeNotifier) property;
            notifier.removeListener(this);
            notifier.addListener(this);
        }
    }

    /**
     * Remove this container as a listener for the given property.
View Full Code Here

Examples of com.vaadin.ui.AbstractSelect.addListener()

                        s2.addItem("Separate by comma (,)");
                        s2.addItem("Separate by colon (:)");
                        s2.addItem("Separate by semicolon (;)");
                        s2.setEnabled(false);

                        s1.addListener(new ValueChangeListener() {

                            @Override
                            public void valueChange(ValueChangeEvent event) {
                                String v = (String) event.getProperty()
                                        .getValue();
View Full Code Here

Examples of com.vaadin.ui.AbstractTextField.addListener()

    public void addListener(AbstractField newField) {
        AbstractTextField newTextField = (AbstractTextField) newField;
        newTextField.setTextChangeEventMode(TextChangeEventMode.EAGER);

        newTextField.addListener(new TextChangeListener() {
            @Override
            public void textChange(TextChangeEvent event) {
                AbstractTextField component = (AbstractTextField) event
                        .getComponent();
                cursorPosition.setValue(String.valueOf(component
View Full Code Here

Examples of com.vaadin.ui.Button.addListener()

    };

    @Override
    protected void setup(VaadinRequest request) {
        Button addButton = new Button("Add new Window");
        addButton.addListener(addListener);
        addComponent(addButton);

        addWindowAgain = new ComboBox("Add Window Again");
        addWindowAgain.setBuffered(false);
        addWindowAgain.setImmediate(true);
View Full Code Here

Examples of com.vaadin.ui.CheckBox.addListener()

        });
        controls.addComponent(pageLength);

        CheckBox cb = new CheckBox("Column 1");
        cb.setValue(true);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                Boolean value = (Boolean) event.getProperty().getValue();
                tbl.setColumnCollapsed("Column 1", !value);
View Full Code Here

Examples of com.vaadin.ui.ComboBox.addListener()

        for (Locale l : Locale.getAvailableLocales()) {
            cb.addItem(l);
        }
        cb.setImmediate(true);
        cb.setValue(Locale.US);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                recreateTable();
            }
View Full Code Here

Examples of com.vaadin.ui.CssLayout.addListener()

    }
    final Label descriptionLabel = new Label(descriptionText);
    descriptionLabel.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
    descriptionLayout.addComponent(descriptionLabel);
   
    descriptionLayout.addListener(new LayoutClickListener() {
      public void layoutClick(LayoutClickEvent event) {
        if (event.getClickedComponent() != null && event.getClickedComponent().equals(descriptionLabel)) {
          // layout for textarea + ok button
          final VerticalLayout editLayout = new VerticalLayout();
          editLayout.setSpacing(true);
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.