Package java.beans

Examples of java.beans.PropertyChangeEvent


  /**
   * Forteller at objekt har bufferverdier
   */
  void fireBufferChange() {
    for (PropertyChangeListener listener : bufferingListeners) {
      listener.propertyChange(new PropertyChangeEvent(presentationModel
          .getBean(),
          String.valueOf(presentationModel.isBuffering()),
          presentationModel.getBean(), String
              .valueOf(presentationModel.isBuffering())));
    }
View Full Code Here


            this.listener = listener;
        }

        public Object put(Object key, Object value) {
            Object oldValue = super.put(key, value);
            PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, null, value);
            listener.propertyChange(event);
            return oldValue;
        }
View Full Code Here

            return oldValue;
        }

        public Object remove(Object key) {
            Object value = super.remove(key);
            PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, value, null);
            listener.propertyChange(event);
            return value;
        }
View Full Code Here

    } else {
      visibleColumns.remove(columnName);
    }

    propertySupport.firePropertyChange(
      new PropertyChangeEvent(
        this, "visibleColumns", new Boolean(oldValue), new Boolean(newValue)));
  }
View Full Code Here

        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, null, c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);

        assertSame(e, c.getLastEvent());
View Full Code Here

        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, "propertyChange", c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);

        assertSame(e, c.getLastEvent());
    }
View Full Code Here

            prev.removeListener(this);
            prev.stop();
        }

        // notify listeners
        PropertyChangeEvent evt = new PropertyChangeEvent(this, PROPERTY_CONFIG, prev, config);
        for (PropertyChangeListener listener : propertyChangeListeners) {
            listener.propertyChange(evt);
        }
        return prev;
    }
View Full Code Here

        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, null, c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);

        assertSame(e, c.getLastEvent());
View Full Code Here

        EventConsumer c = new EventConsumer();
        EventLinker l = new EventLinkerImpl(null);

        l.addEventListener(p, "propertyChange", c, null);

        PropertyChangeEvent e = new PropertyChangeEvent(this, "whatever", "foo", "bar");

        p.fire(e);

        assertSame(e, c.getLastEvent());
    }
View Full Code Here

        // which should result in one PCE events
        assertEquals(1, pces.size());

        // test for the acutal update of the value
        PropertyChangeEvent propertyChangeEvent = pces.get(0);

        assertEquals("description", propertyChangeEvent.getPropertyName());
        assertEquals("log", propertyChangeEvent.getOldValue());
        assertEquals("updated log", propertyChangeEvent.getNewValue());

    }
View Full Code Here

TOP

Related Classes of java.beans.PropertyChangeEvent

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.