Examples of firePropertyChange()


Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

    harness.check(this.lastEvent.getOldValue(), new Integer(12));
    harness.check(this.lastEvent.getNewValue(), new Integer(34));
   
    // if both ints are equal, no event is generated
    this.lastEvent = null;
    s.firePropertyChange("X", 99, 99);
    harness.check(this.lastEvent, null);
  }

  public void propertyChange(PropertyChangeEvent e)
  {
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

   */
  public void test(TestHarness harness)     
  {
    SwingPropertyChangeSupport s = new SwingPropertyChangeSupport(this);
    s.addPropertyChangeListener(this);
    s.firePropertyChange("X", false, true);
    harness.check(this.event.getSource(), this);
   
    // check null argument
    boolean pass = false;
    try
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

  {
    harness.checkPoint("(PropertyChangeEvent)");
    SwingPropertyChangeSupport s = new SwingPropertyChangeSupport(this);
    s.addPropertyChangeListener(this);
    PropertyChangeEvent e = new PropertyChangeEvent("SOURCE", "X", "Y", "Z");
    s.firePropertyChange(e);
    harness.check(this.lastEvent.getSource(), "SOURCE");
    harness.check(this.lastEvent.getPropertyName(), "X");
    harness.check(this.lastEvent.getOldValue(), "Y");
    harness.check(this.lastEvent.getNewValue(), "Z");
   
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

    harness.check(lastEvent, null);
   
    // but if the old and new values are both null, listeners ARE notified
    this.lastEvent = null;
    e = new PropertyChangeEvent("SOURCE", "X", null, null);
    s.firePropertyChange(e);
    harness.check(lastEvent, e);   
   
    // check that a null argument throws a null pointer exception
    this.lastEvent = null;
    boolean pass = false;
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

    // check that a null argument throws a null pointer exception
    this.lastEvent = null;
    boolean pass = false;
    try
    {
      s.firePropertyChange(null);
    }
    catch (NullPointerException npe)
    {
      pass = true;
    }
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

  private void test2(TestHarness harness)
  {
    harness.checkPoint("(String, Object, Object)");
    SwingPropertyChangeSupport s = new SwingPropertyChangeSupport("SOURCE");
    s.addPropertyChangeListener(this);
    s.firePropertyChange("X", "Y", "Z");
    harness.check(this.lastEvent.getSource(), "SOURCE");
    harness.check(this.lastEvent.getPropertyName(), "X");
    harness.check(this.lastEvent.getOldValue(), "Y");
    harness.check(this.lastEvent.getNewValue(), "Z");
    this.lastEvent = null;
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

    harness.check(this.lastEvent.getNewValue(), "Z");
    this.lastEvent = null;
   
    // if both Objects are equal and non-null, no event is generated
    this.lastEvent = null;
    s.firePropertyChange("X", "Z", "Z");
    harness.check(this.lastEvent, null);

    // the following should not throw any exceptions
//    s.firePropertyChange(null, "Y", "Z");
//    s.firePropertyChange("X", null, "Z");
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

  private void test3(TestHarness harness)
  {
    harness.checkPoint("(String, boolean, boolean)");
    SwingPropertyChangeSupport s = new SwingPropertyChangeSupport("SOURCE");
    s.addPropertyChangeListener(this);
    s.firePropertyChange("X", false, true);
    harness.check(this.lastEvent.getSource(), "SOURCE");
    harness.check(this.lastEvent.getPropertyName(), "X");
    harness.check(this.lastEvent.getOldValue(), Boolean.FALSE);
    harness.check(this.lastEvent.getNewValue(), Boolean.TRUE);
   
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

    harness.check(this.lastEvent.getOldValue(), Boolean.FALSE);
    harness.check(this.lastEvent.getNewValue(), Boolean.TRUE);
   
    // if both booleans are equal, no event is generated
    this.lastEvent = null;
    s.firePropertyChange("X", true, true);
    harness.check(this.lastEvent, null);
  }

  private void test4(TestHarness harness)
  {
View Full Code Here

Examples of javax.swing.event.SwingPropertyChangeSupport.firePropertyChange()

  private void test4(TestHarness harness)
  {
    harness.checkPoint("(String, int, int)");
    SwingPropertyChangeSupport s = new SwingPropertyChangeSupport("SOURCE");
    s.addPropertyChangeListener(this);
    s.firePropertyChange("X", 12, 34);
    harness.check(this.lastEvent.getSource(), "SOURCE");
    harness.check(this.lastEvent.getPropertyName(), "X");
    harness.check(this.lastEvent.getOldValue(), new Integer(12));
    harness.check(this.lastEvent.getNewValue(), new Integer(34));
   
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.