Package java.beans

Examples of java.beans.VetoableChangeSupport$VetoableChangeListenerMap


  public SmartProperties() {

    values = new HashMap<String, List<String>>();
    descriptions = new HashMap<String, String>();
    listeners = new PropertyChangeSupport(this);
    vetoables = new VetoableChangeSupport(this);
    storeFlags = new HashMap<String, Boolean>();
    lineNumber = new HashMap<String,Integer>();
    cache = new HashMap<String, Object>();
   
    initProperties();
View Full Code Here


  super();

  beanContextChildPeer = this;

  pcSupport = new PropertyChangeSupport(beanContextChildPeer);
  vcSupport = new VetoableChangeSupport(beanContextChildPeer);
    }
View Full Code Here

  super();

  beanContextChildPeer = (bcc != null) ? bcc : this;

  pcSupport = new PropertyChangeSupport(beanContextChildPeer);
  vcSupport = new VetoableChangeSupport(beanContextChildPeer);
    }
View Full Code Here

    private static boolean initialized = false;

    /* public no arg constructor for bean */
    public CookieJar() {
  if (!initialized) {
      vceListeners = new VetoableChangeSupport(this);
      cookieJar = new Hashtable();
      initialized = true;
  }
    }
View Full Code Here

     * @param l the listener to add
     */
    public void addVetoableChangeListener(VetoableChangeListener l)
    {
        if (vetoableChangeSupport == null) {
            vetoableChangeSupport = new VetoableChangeSupport(this);
        }
        vetoableChangeSupport.addVetoableChangeListener(l);
    }
View Full Code Here

     * than it is to introduce synchronization overhead on access.
     */
    synchronized protected VetoableChangeSupport getVetoableChangeSupport()
    {
        if (_vetoSupport == null)
            _vetoSupport = new VetoableChangeSupport(this);

        return _vetoSupport;
    }
View Full Code Here

  }
 
  public void testMethod1(TestHarness harness)
  {
    harness.checkPoint("(VetoableChangeListener)");
    VetoableChangeSupport vcs = new VetoableChangeSupport(this);
    harness.check(vcs.getVetoableChangeListeners().length, 0);
    vcs.addVetoableChangeListener(this);
    harness.check(vcs.getVetoableChangeListeners().length, 1);
    vcs.addVetoableChangeListener(null);
    harness.check(vcs.getVetoableChangeListeners().length, 1);
  }
View Full Code Here

  }

  public void testMethod2(TestHarness harness)
  {
    harness.checkPoint("(String, VetoableChangeListener)");
    VetoableChangeSupport vcs = new VetoableChangeSupport(this);
    harness.check(vcs.getVetoableChangeListeners().length, 0);
    vcs.addVetoableChangeListener("A", this);
    vcs.addVetoableChangeListener("B", this);
    harness.check(vcs.getVetoableChangeListeners().length, 2);
    harness.check(vcs.getVetoableChangeListeners("A").length, 1);
    harness.check(vcs.getVetoableChangeListeners("B").length, 1);
    vcs.addVetoableChangeListener("B", null);
    harness.check(vcs.getVetoableChangeListeners().length, 2);
    harness.check(vcs.getVetoableChangeListeners("B").length, 1);

    // try null property name
    vcs.addVetoableChangeListener(null, this);
    harness.check(vcs.getVetoableChangeListeners().length, 2);
    harness.check(vcs.getVetoableChangeListeners("A").length, 1);
    harness.check(vcs.getVetoableChangeListeners("B").length, 1);
  }
View Full Code Here

    private transient VetoableChangeSupport vcs;
   
    /** Creates a new instance of AbstractBean */
    protected AbstractBean() {
        pcs = new PropertyChangeSupport(this);
        vcs = new VetoableChangeSupport(this);
    }
View Full Code Here

     */
    @Override
    public Object clone() throws CloneNotSupportedException {
        AbstractBean result = (AbstractBean) super.clone();
        result.pcs = new PropertyChangeSupport(result);
        result.vcs = new VetoableChangeSupport(result);
        return result;
    }
View Full Code Here

TOP

Related Classes of java.beans.VetoableChangeSupport$VetoableChangeListenerMap

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.