Package java.beans

Examples of java.beans.VetoableChangeListener


    _app = app;
    _uiFactory = (UserInterfaceFactory)getUserInterfaceFactory();
    _uiFactory.setDriversListInternalFrame(this);


      addVetoableChangeListener(new VetoableChangeListener()
      {
         public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException
         {
            if(JInternalFrame.IS_CLOSED_PROPERTY.equals(evt.getPropertyName()) && Boolean.TRUE.equals(evt.getNewValue()))
            {
View Full Code Here


    super(new UserInterfaceFactory(app, list), app);
    _app = app;
    _uiFactory = (UserInterfaceFactory)getUserInterfaceFactory();


      addVetoableChangeListener(new VetoableChangeListener()
      {
         public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException
         {
            if(JInternalFrame.IS_CLOSED_PROPERTY.equals(evt.getPropertyName()) && Boolean.TRUE.equals(evt.getNewValue()))
            {
View Full Code Here

        // check vetoable change listeners
        VetoableChangeSupport origVCS = (VetoableChangeSupport) Utils.getField(
                orig, "vcSupport");
        VetoableChangeSupport serVCS = (VetoableChangeSupport) Utils.getField(
                ser, "vcSupport");
        VetoableChangeListener origVCL[] = origVCS
                .getVetoableChangeListeners("beanContext");
        VetoableChangeListener serVCL[] = serVCS
                .getVetoableChangeListeners("beanContext");
        i = 0;
        j = 0;
        while (i < origVCL.length) {
            if (origVCL[i] instanceof Serializable) {
View Full Code Here

    }
   
    public void testSetBeanContextBeanContextWithPropertyVetoException()
            throws Exception {
        MyBeanContextChildSupport myBeanContextChildSupport = new MyBeanContextChildSupport();
        VetoableChangeListener vcl = new MyVetoableChangeListener();
        myBeanContextChildSupport.addVetoableChangeListener("beanContext", vcl);
        BeanContext beanContext = new BeanContextSupport();
        try {
            myBeanContextChildSupport.setBeanContext(beanContext);
            fail("should throw PropertyVetoException");
View Full Code Here

    ConnectionTester connectionTester = C3P0ImplUtils.defaultConnectionTester();
    Map              userOverrides;

    public WrapperConnectionPoolDataSource()
    {
  VetoableChangeListener setConnectionTesterListener = new VetoableChangeListener()
      {
    // always called within synchronized mutators of the parent class... needn't explicitly sync here
    public void vetoableChange( PropertyChangeEvent evt ) throws PropertyVetoException
    {
        String propName = evt.getPropertyName();
View Full Code Here

            }
        }
        ;
        AncestorListener ancestorListener1 = new ConcreteAncestorListener();
        AncestorListener ancestorListener2 = new ConcreteAncestorListener();
        VetoableChangeListener vetoableChangeListener = new VetoableChangeListener() {
            public void vetoableChange(final PropertyChangeEvent evt) {
            }
        };
        EventListener[] listenersArray = null;
        removeListeners(panel, PropertyChangeListener.class);
View Full Code Here

  setUpPropertyListeners();
    }

    private void setUpPropertyListeners()
    {
  VetoableChangeListener l = new VetoableChangeListener()
      {
    public void vetoableChange( PropertyChangeEvent evt ) throws PropertyVetoException
    {
        Object val = evt.getNewValue();
        if ( "jndiName".equals( evt.getPropertyName() ) )
View Full Code Here

    public WrapperConnectionPoolDataSource()
    { this( true ); }

    private void setUpPropertyListeners()
    {
  VetoableChangeListener setConnectionTesterListener = new VetoableChangeListener()
      {
    // always called within synchronized mutators of the parent class... needn't explicitly sync here
    public void vetoableChange( PropertyChangeEvent evt ) throws PropertyVetoException
    {
        String propName = evt.getPropertyName();
View Full Code Here

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

        childVCL = new VetoableChangeListener() {

            /*
             * this adaptor is used by the BeanContextSupport class to forward
             * vetoable changes from a child to the BeanContext, avoiding
             * accidential serialization of the BeanContext by a badly
View Full Code Here

    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

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.