Package java.beans

Examples of java.beans.PropertyChangeSupport.firePropertyChange()


        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "long", "source.long");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("long:1000", target.getActionRecord());
    }

    public void testInvoke_extend10() {
        MockFish fish = new MockFish();
View Full Code Here


        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "float", "source.float");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("float:2.2", target.getActionRecord());
    }

    public void testInvoke_extend11() {
        MockFish fish = new MockFish();
View Full Code Here

        Object proxy = EventHandler.create(PropertyChangeListener.class,
                target, "double", "source.double");
        support.addPropertyChangeListener((PropertyChangeListener) proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(fish, "name", "1",
                "5");
        support.firePropertyChange(event);
        assertEquals("double:3.3", target.getActionRecord());
    }

    /**
     * @tests java.beans.EventHandler#create(java.lang.Class<T>,
View Full Code Here

        }
        if (changeSupport == null ||
            (oldValue != null && newValue != null && oldValue.equals(newValue))) {
            return;
        }
        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
    }

    /**
     * Support for reporting bound property changes for boolean properties.
     * This method can be called when a bound property has changed and it will
View Full Code Here

                                      boolean oldValue, boolean newValue) {
        PropertyChangeSupport changeSupport = this.changeSupport;
        if (changeSupport == null || oldValue == newValue) {
            return;
        }
        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
    }

    /**
     * Support for reporting bound property changes for integer properties.
     * This method can be called when a bound property has changed and it will
View Full Code Here

                                      int oldValue, int newValue) {
        PropertyChangeSupport changeSupport = this.changeSupport;
        if (changeSupport == null || oldValue == newValue) {
            return;
        }
        changeSupport.firePropertyChange(propertyName, oldValue, newValue);
    }

    /**
     * Reports a bound property change.
     *
 
View Full Code Here

            Runnable updater = new Runnable() {
                public void run() {
                    PropertyChangeSupport pcs = (PropertyChangeSupport)
                            AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
                    if (null != pcs) {
                        pcs.firePropertyChange(evt);
                    }
                }
            };
            final AppContext currentAppContext = AppContext.getAppContext();
            for (AppContext appContext : AppContext.getAppContexts()) {
View Full Code Here

        if (oldValue == newValue) {
            return;
        }
        PropertyChangeSupport changeSupport = this.changeSupport;
        if (changeSupport != null) {
            changeSupport.firePropertyChange(propertyName, oldValue, newValue);
        }
    }

    /**
     * Adds a VetoableChangeListener to the listener list. The listener is
View Full Code Here

            this.isDisposed = true;
        }

        final PropertyChangeSupport changeSupport = this.changeSupport;
        if (changeSupport != null) {
            changeSupport.firePropertyChange(DISPOSED_PROPERTY_NAME, false, true);
        }

        // First, we post an InvocationEvent to be run on the
        // EventDispatchThread which disposes of all top-level Frames and TrayIcons
View Full Code Here

                            return null;
                        }
                    });
                // Alert PropertyChangeListeners that the GUI has been disposed.
                if (changeSupport != null) {
                    changeSupport.firePropertyChange(GUI_DISPOSED, false, true);
                }
                synchronized(notificationLock) {
                    notificationLock.notifyAll(); // Notify caller that we're done
                }
            }
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.