Package java.beans

Examples of java.beans.VetoableChangeListener


    public void testFireVetoableChangeStringintint()
            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", 1, 2);

        assertEquals("called", source.getText());
View Full Code Here


    public void testFireVetoableChangeStringintint_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, 1, 2);

        assertEquals("called", source.getText());
View Full Code Here

    public void testFireVetoableChangeStringintint_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", 1, 2);

        assertEquals("called", source.getText());
View Full Code Here

    public void testFireVetoableChangeStringintint_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", 1, 1);

        assertEquals("text.default", source.getText());
View Full Code Here

    public void testFireVetoableChangeStringintint_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", 1, 2);
        assertEquals("called", source.getText());
    }
View Full Code Here

    public void testFireVetoableChangeStringintint_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, 1, 2);

        assertEquals("text.default", source.getText());
View Full Code Here

    public void testFireVetoableChangeStringintint_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", 1, 2);

        assertEquals("text.default", source.getText());
View Full Code Here

    public void testFireVetoableChangeStringintint_listener_SameValue()
            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", 1, 1);

        assertEquals("text.default", source.getText());
View Full Code Here

    public void testFireVetoableChangeStringintint_listener_Invalid_property()
            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

    public void testFireVetoableChangeStringObjectObject()
            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: new");
        assertEquals("called", 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.