Examples of VetoableChangeListener


Examples of java.beans.VetoableChangeListener

        });
    }

    private VetoableChangeListener createListener(final List<VetoableChangeListener> calledListeners)
    {
        return new VetoableChangeListener()
        {
            @Override
            public void vetoableChange(final PropertyChangeEvent e)
            {
                calledListeners.add(this);
View Full Code Here

Examples of java.beans.VetoableChangeListener

    public void testAddEventListenerWithPrivateAddMethod()
    {
        final PropertyChangeSource src = new PropertyChangeSource();
        EventCountingInvociationHandler handler = new EventCountingInvociationHandler();
        VetoableChangeListener listener = handler.createListener(VetoableChangeListener.class);
        try
        {
            EventUtils.addEventListener(src, VetoableChangeListener.class, listener);
            fail("Should not be allowed to add a listener to an object that doesn't support it.");
        }
View Full Code Here

Examples of java.beans.VetoableChangeListener

                .publicGetChildSerializable(new BadChild());
        assertNull(result);
    }

    public void testGetChildVetoableChangeListener_NullParam() {
        VetoableChangeListener result = MockBeanContextSupport
                .publicGetChildVetoableChangeListener(null);
        assertNull(result);
    }
View Full Code Here

Examples of java.beans.VetoableChangeListener

        assertNull(result);
    }

    public void testGetChildVetoableChangeListener() {
        MockBeanContextSupport child = new MockBeanContextSupport();
        VetoableChangeListener result = MockBeanContextSupport
                .publicGetChildVetoableChangeListener(child);
        assertSame(child, result);
    }
View Full Code Here

Examples of java.beans.VetoableChangeListener

                .publicGetChildVetoableChangeListener(child);
        assertSame(child, result);
    }

    public void testGetChildVetoableChangeListener_WrongClass() {
        VetoableChangeListener result = MockBeanContextSupport
                .publicGetChildVetoableChangeListener(new Integer(129));
        assertNull(result);
    }
View Full Code Here

Examples of java.beans.VetoableChangeListener

    public BlockTimeLineNode(Time startTime, Time endTime, String name) {

        fModel = new DefaultVetoableTimeLineNodeModel(startTime, endTime, name, true);
        fChangeSupport = new VetoableChangeSupport(this);
        fModel.addVetoableChangeListener(new VetoableChangeListener() {

            public void vetoableChange(PropertyChangeEvent evt)
                    throws PropertyVetoException {
                fChangeSupport.fireVetoableChange(evt.getPropertyName(),
                                                  evt.getOldValue(),
View Full Code Here

Examples of java.beans.VetoableChangeListener

                    details += "</font></html>";
                    return details;
                }
            };
            timeLine.addTimeLineNode(node1);
            node1.addVetoableChangeListener(new VetoableChangeListener() {

                public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
                    System.out.println("XXX node 1 changed: " + evt);
                }
            });

            String label2 = "Label 2";
            DefaultTimeLineNode node2 = new DefaultTimeLineNode(new Time(24.0 * 60.0), new Time(30.0 * 60.0), label2) {

                public String getDescription(Point pt) {
                    return "Node Description";
                }
            };
            timeLine.addTimeLineNode(node2);
            node2.addVetoableChangeListener(new VetoableChangeListener() {

                public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
                    System.out.println("XXX node 2 changed: " + evt);
                }
            });
View Full Code Here

Examples of java.beans.VetoableChangeListener

        getContentPane().setLayout(new GridLayout(1, 1));
        getContentPane().add(p);

        // Watch for the frame closing
        //setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);
        addVetoableChangeListener(new VetoableChangeListener() {
                public void vetoableChange(PropertyChangeEvent evt)
                    throws PropertyVetoException {
                    if (application != null) {
                        application.closeContainer(SshToolsApplicationInternalFrame.this);
                    } else {
View Full Code Here

Examples of java.beans.VetoableChangeListener

    public void GivenCBWhenTripCBWithExceptionsAndGetStatusWithFailureThenStatusIsOff()
            throws PropertyVetoException
    {
        assertThat( cb.status(), CoreMatchers.equalTo( CircuitBreaker.Status.on ) );

        cb.addVetoableChangeListener( new VetoableChangeListener()
        {

            public void vetoableChange( PropertyChangeEvent evt )
                    throws PropertyVetoException
            {
View Full Code Here

Examples of java.beans.VetoableChangeListener

            public void propertyChange(PropertyChangeEvent pce) {
                ControlBeanContextSupport.this.propertyChange(pce);
            }
        };

        _childVcl = new VetoableChangeListener() {
            public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException {
                ControlBeanContextSupport.this.vetoableChange(pce);
            }
        };
    }
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.