Examples of VetoableChangeListener


Examples of java.beans.VetoableChangeListener

    setStore(FILENAME, false); // We dont store this property, for runtime only
   
    /*
     * Handle the property change for FILENAME property
     */
    addVetoableChangeListener(FILENAME, new VetoableChangeListener() {
      /**
       * Handle property change event. SmartProperties object monitors certain
       * properties which have direct effect on this object. Main property
       * being monitored is FILENAME.
       */
 
View Full Code Here

Examples of java.beans.VetoableChangeListener

      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

Examples of java.beans.VetoableChangeListener

    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

Examples of java.beans.VetoableChangeListener

  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

Examples of java.beans.VetoableChangeListener

      harness.check(listeners[0], pcl);
    else
      harness.check(false);
   
    // try a VetoableChangeListener
    VetoableChangeListener vcl = new MyVetoableChangeListener();
    c.addVetoableChangeListener(vcl);
    listeners = c.getListeners(VetoableChangeListener.class);
    harness.check(listeners.length, 1);
    if (listeners.length > 0)
      harness.check(listeners[0], vcl);
View Full Code Here

Examples of java.beans.VetoableChangeListener

   */
  private synchronized void writeObject(ObjectOutputStream s) throws IOException {
    s.defaultWriteObject();
   
    for (int i = 0; i < listeners.length; i++) {
      VetoableChangeListener l = listeners[i];
      if (listeners[i] instanceof Serializable) {
        s.writeObject(listeners[i]);
      }
    }
    s.writeObject(null);
View Full Code Here

Examples of java.beans.VetoableChangeListener

            public void internalFrameClosed(InternalFrameEvent e) {
                contentManager.removeContent(content);
            }
        });

        internalFrame.addVetoableChangeListener(new VetoableChangeListener() {
            public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
                if (JInternalFrame.IS_CLOSED_PROPERTY.equals(evt.getPropertyName())) {
                    if (Boolean.TRUE.equals(evt.getNewValue())) {
                        if (!contentManagerUI.fireContentUIRemoving(content.getContentUI()))
                            throw new PropertyVetoException("Cannot remove.", evt);
View Full Code Here

Examples of java.beans.VetoableChangeListener

        internalFrame.addInternalFrameListener(internalFrameAdapter = new InternalFrameAdapter() {
            public void internalFrameClosed(InternalFrameEvent e) {
                contentManager.removeContent(content);
            }
        });
        internalFrame.addVetoableChangeListener(vetoableChangeListener = new VetoableChangeListener() {
            public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {
                if (JInternalFrame.IS_CLOSED_PROPERTY.equals(evt.getPropertyName())) {
                    if (Boolean.TRUE.equals(evt.getNewValue())) {
                        if (!myDoggyContentManagerUI.fireContentUIRemoving(content.getContentUI()))
                            throw new PropertyVetoException("Cannot remove.", evt);
View Full Code Here

Examples of java.beans.VetoableChangeListener

                BeanContextSupport.this.propertyChange(pce);
            }
        };

        // Initialize VetoableChangeListener
        this.vcl = new VetoableChangeListener() {

            public void vetoableChange(PropertyChangeEvent pce)
                    throws PropertyVetoException {

                BeanContextSupport.this.vetoableChange(pce);
View Full Code Here

Examples of java.beans.VetoableChangeListener

            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
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.