Package java.beans

Examples of java.beans.VetoableChangeListener


     */
    public void testAddVetoableChangeListenerStringVetoableChangeListener_property_duplicate() {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        VetoableChangeListener proxy2 = EventHandler.create(
                VetoableChangeListener.class, source, "setText");

        String propertyName = "label";
        support.addVetoableChangeListener(propertyName, proxy);
        support.addVetoableChangeListener(propertyName, proxy2);
View Full Code Here


     */
    public void testAddVetoableChangeListenerVetoableChangeListener() {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);

        assertTrue(support.hasListeners("label"));
        assertTrue(support.hasListeners("text"));
View Full Code Here

     */
    public void testAddVetoableChangeListenerVetoableChangeListener_duplicate() {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        support.addVetoableChangeListener(proxy);

        assertTrue(support.hasListeners("label"));
View Full Code Here

     */
    public void testAddVetoableChangeListenerVetoableChangeListener_TwoDifferent() {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        VetoableChangeListener proxy2 = EventHandler.create(
                VetoableChangeListener.class, source, "getText");
        support.addVetoableChangeListener(proxy);
        support.addVetoableChangeListener(proxy2);

        assertTrue(support.hasListeners("label"));
View Full Code Here

     */
    public void testAddVetoableChangeListenerVetoableChangeListener_Proxy() {
        MockSource source = new MockSource();
        VetoableChangeSupport support = new VetoableChangeSupport(source);

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");

        proxy = new MockVetoableChangeListener();
        String propertyName = "label";

View Full Code Here

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

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

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

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");
        support.addVetoableChangeListener(proxy);
        try {
            support.fireVetoableChange(null);
            fail("Should throw NullPointerException.");
View Full Code Here

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

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");

        String propertyName = "label";
        support.addVetoableChangeListener(propertyName, proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(source, "label",
View Full Code Here

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

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "setText");

        String propertyName = "label_invalid";
        support.addVetoableChangeListener(propertyName, proxy);
        PropertyChangeEvent event = new PropertyChangeEvent(source, "label",
View Full Code Here

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

        VetoableChangeListener proxy = EventHandler.create(
                VetoableChangeListener.class, source, "increaseTop");
        VetoableChangeListener proxy2 = EventHandler.create(
                VetoableChangeListener.class, source, "setText");

        support.addVetoableChangeListener(proxy);
        support.addVetoableChangeListener(proxy);
        support.addVetoableChangeListener(proxy2);
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.