Package java.beans

Examples of java.beans.VetoableChangeListener


    public void testFireVetoableChangeStringObjectObject_property_Null()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        support.fireVetoableChange(null, "Label: old", "Label: new");
        assertEquals("called", source.getText());
    }
View Full Code Here


    public void testFireVetoableChangeStringObjectObject_property_invalid()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        support.fireVetoableChange("label_invalid", "Label: old", "Label: new");
        assertEquals("called", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_SameValue()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        support.fireVetoableChange("label", "Label: old", "Label: old");
        assertEquals("text.default", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_SameValue_null()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        support.fireVetoableChange("label", null, null);
        assertEquals("called", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_listener()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener("label", proxy);
        support.fireVetoableChange("label", "Label: old", "Label: new");
        assertEquals("called", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_listener_property_Null()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener("label", proxy);
        support.fireVetoableChange(null, "Label: old", "Label: new");
        assertEquals("text.default", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_listener_property_invalid()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener("label", proxy);
        support.fireVetoableChange("label_invalid", "Label: old", "Label: new");
        assertEquals("text.default", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_listener_SameValue()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        support.fireVetoableChange("label", "Label: old", "Label: old");
        assertEquals("text.default", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_listener_SameValue_null()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener("label", proxy);
        support.fireVetoableChange("label", null, null);
        assertEquals("called", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringObjectObject_listener_invalid()
            throws PropertyVetoException {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener("label_invalid", proxy);
        support.fireVetoableChange("label", "1", "2");
        assertEquals("text.default", source.getText());
    }
View Full Code Here

TOP

Related Classes of java.beans.VetoableChangeListener

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.