Tabnine Logo
VetoableChangeSupport
Code IndexAdd Tabnine to your IDE (free)

How to use
VetoableChangeSupport
in
java.beans

Best Java code snippets using java.beans.VetoableChangeSupport (Showing top 20 results out of 540)

Refine searchRefine arrow

  • PropertyChangeSupport
origin: stackoverflow.com

if (!isVetoable())
  return;
vetoableChangeSupport.fireVetoableChange("selectedIndex",
    oldSelectionIndex, newSelectionIndex);
if (vetoableChangeSupport == null)
  return false;
return vetoableChangeSupport.hasListeners(null);
  vetoableChangeSupport = new VetoableChangeSupport(this);
vetoableChangeSupport.addVetoableChangeListener(l);
if (vetoableChangeSupport == null)
  return;
vetoableChangeSupport.removeVetoableChangeListener(l);
origin: com.globalmentor/globalmentor-core

/**
 * Returns an array of all the listeners which have been associated with the named property.
 * @param propertyName The name of the property being listened to.
 * @return All the <code>VetoableChangeListeners</code> associated with the named property; if no such listeners have been added, or if
 *         <code>propertyName</code> is <code>null</code>, an empty array is returned.
 */
public VetoableChangeListener[] getVetoableChangeListeners(final String propertyName) {
  return vetoableChangeSupport != null ? vetoableChangeSupport.getVetoableChangeListeners(propertyName) : NO_VETOABLE_CHANGE_LISTENERS; //if we have vetoable change support, delegate to that, else return an empty list
}
origin: org.netbeans.api/org-openide-explorer

/** Add a <code>VetoableListener</code> to the listener list.
* @param l the listener to add
*/
public synchronized void addVetoableChangeListener(VetoableChangeListener l) {
  if (vetoableSupport == null) {
    vetoableSupport = new VetoableChangeSupport(this);
  }
  vetoableSupport.addVetoableChangeListener(l);
}
origin: ca.uhn.hapi/hapi-base

/** Setter for property applicationAck.
 * @param applicationAck New value of property applicationAck.
 *
 * @throws PropertyVetoException
 */
public void setApplicationAck(String applicationAck) throws java.beans.PropertyVetoException {
  String oldApplicationAck = this.applicationAck;
  vetoableChangeSupport.fireVetoableChange("applicationAck", oldApplicationAck, applicationAck);
  this.applicationAck = applicationAck;
  propertyChangeSupport.firePropertyChange("applicationAck", oldApplicationAck, applicationAck);
}

origin: it.tidalwave.thesefoolishthings/it-tidalwave-swing-beansbinding

/** Creates a new instance of AbstractBean */
protected AbstractBean() {
  pcs = new PropertyChangeSupport(this);
  vcs = new VetoableChangeSupport(this);
}
origin: org.netbeans.api/org-openide-explorer

/** Remove a <code>VetoableChangeListener</code> from the listener list.
* @param l the listener to remove
*/
public synchronized void removeVetoableChangeListener(VetoableChangeListener l) {
  if (vetoableSupport != null) {
    vetoableSupport.removeVetoableChangeListener(l);
  }
}
origin: jfree/jfreechart

/**
 * Adds a vetoable property change listener to the series.
 *
 * @param listener  the listener.
 * 
 * @since 1.0.14
 */
public void addVetoableChangeListener(VetoableChangeListener listener) {
  this.vetoableChangeSupport.addVetoableChangeListener(listener);
}
origin: it.tidalwave.thesefoolishthings/it.tidalwave.swing.beansbinding

/**
 * Check if there are any listeners for a specific property, including
 * those registered on all properties.  If <code>propertyName</code>
 * is null, only check for listeners registered on all properties.
 *
 * @param propertyName  the property name.
 * @return true if there are one or more listeners for the given property
 */
protected final boolean hasVetoableChangeListeners(String propertyName) {
  return vcs.hasListeners(propertyName);
}

origin: org.netbeans.api/org-openide-explorer

/**
 * Lazy initialization of the VetoableChangeSupport.
 */
private synchronized VetoableChangeSupport getSupport() {
  if (support == null) {
    support = new VetoableChangeSupport(this);
  }
  return support;
}
origin: ca.uhn.hapi/hapi-base

/** Setter for property orgName.
 * @param orgName New value of property orgName.
 *
 * @throws PropertyVetoException
 */
public void setOrgName(String orgName) throws java.beans.PropertyVetoException {
  String oldOrgName = this.orgName;
  vetoableChangeSupport.fireVetoableChange("orgName", oldOrgName, orgName);
  this.orgName = orgName;
  propertyChangeSupport.firePropertyChange("orgName", oldOrgName, orgName);
}

origin: eu.limetri.client/mapviewer-data

/** Creates a new instance of AbstractBean */
protected AbstractBean() {
  pcs = new PropertyChangeSupport(this);
  vcs = new VetoableChangeSupport(this);
}

origin: org.glassfish.persistence.cmp/cmp-model

/** Add a vetoable change listener.
 * @param l the listener to add
 */
public synchronized void addVetoableChangeListener 
  (VetoableChangeListener l)
{
  if (_vetoableSupport == null)
    _vetoableSupport = new VetoableChangeSupport(_element);
  _vetoableSupport.addVetoableChangeListener(l);
}
origin: jfree/jfreechart

/**
 * Removes a vetoable property change listener from the series.
 *
 * @param listener  the listener.
 * 
 * @since 1.0.14 
 */
public void removeVetoableChangeListener(VetoableChangeListener listener) {
  this.vetoableChangeSupport.removeVetoableChangeListener(listener);
}    
origin: ca.uhn.hapi/hapi-base

/** Adds a VetoableChangeListener to the listener list.
 * @param l The listener to add.
 */
public void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
  vetoableChangeSupport.addVetoableChangeListener(l);
}

origin: it.tidalwave.thesefoolishthings/it-tidalwave-swing-beansbinding

/**
 * Check if there are any listeners for a specific property, including
 * those registered on all properties.  If <code>propertyName</code>
 * is null, only check for listeners registered on all properties.
 *
 * @param propertyName  the property name.
 * @return true if there are one or more listeners for the given property
 */
protected final boolean hasVetoableChangeListeners (final String propertyName) {
  return vcs.hasListeners(propertyName);
}
origin: org.nuiton.topia/topia-persistence

/**
 * Initialize {@link #preReadListeners} at first use or after deserialisation.
 *
 * @param create indicates if the VetoableChangeSupport can be created if it does not exist
 * @return readVetoables
 */
protected VetoableChangeSupport getPreReadListeners(boolean create) {
  if (preReadListeners == null && create) {
    preReadListeners = new VetoableChangeSupport(this);
  }
  return preReadListeners;
}
origin: ca.uhn.hapi/hapi-osgi-base

/** Setter for property eventFlow.
 * @param eventFlow New value of property eventFlow.
 *
 * @throws PropertyVetoException
 */
public void setEventFlow(EventFlow eventFlow) throws java.beans.PropertyVetoException {
  EventFlow oldEventFlow = this.eventFlow;
  vetoableChangeSupport.fireVetoableChange("eventFlow", oldEventFlow, eventFlow);
  this.eventFlow = eventFlow;
  propertyChangeSupport.firePropertyChange("eventFlow", oldEventFlow, eventFlow);
}

origin: org.swinglabs.swingx/swingx-all

/** Creates a new instance of AbstractBean */
protected AbstractBean() {
  pcs = new PropertyChangeSupport(this);
  vcs = new VetoableChangeSupport(this);
}
 
origin: de.schlichtherle.truelicense/truelicense-xml

/**
 * Adds a VetoableChangeListener to the listener list.
 *
 * @param l The listener to add.
 * @deprecated Not required.
 */
public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener l) {
  if (null == vetoableChangeSupport)
    vetoableChangeSupport = new VetoableChangeSupport(this);
  vetoableChangeSupport.addVetoableChangeListener(l);
}
origin: ca.uhn.hapi/hapi-base

/** Removes a VetoableChangeListener from the listener list.
 * @param l The listener to remove.
 */
public void removeVetoableChangeListener(java.beans.VetoableChangeListener l) {
  vetoableChangeSupport.removeVetoableChangeListener(l);
}

java.beansVetoableChangeSupport

Javadoc

This is a utility class that can be used by beans that support constrained properties. It manages a list of listeners and dispatches PropertyChangeEvents to them. You can use an instance of this class as a member field of your bean and delegate these types of work to it. The VetoableChangeListener can be registered for all properties or for a property specified by name.

Here is an example of VetoableChangeSupport usage that follows the rules and recommendations laid out in the JavaBeansâ„¢ specification:

 
public class MyBean { 
private final VetoableChangeSupport vcs = new VetoableChangeSupport(this); 
public void addVetoableChangeListener(VetoableChangeListener listener) { 
this.vcs.addVetoableChangeListener(listener); 
} 
public void removeVetoableChangeListener(VetoableChangeListener listener) { 
this.vcs.removeVetoableChangeListener(listener); 
} 
private String value; 
public String getValue() { 
return this.value; 
} 
public void setValue(String newValue) throws PropertyVetoException { 
String oldValue = this.value; 
this.vcs.fireVetoableChange("value", oldValue, newValue); 
this.value = newValue; 
} 
[...] 
} 

A VetoableChangeSupport instance is thread-safe.

This class is serializable. When it is serialized it will save (and restore) any listeners that are themselves serializable. Any non-serializable listeners will be skipped during serialization.

Most used methods

  • fireVetoableChange
    Reports a boolean constrained property update to listeners that have been registered to track update
  • addVetoableChangeListener
    Add a VetoableChangeListener for a specific property. The listener will be invoked only when a call
  • removeVetoableChangeListener
    Remove a VetoableChangeListener for a specific property. If listener was added more than once to the
  • <init>
    Constructs a VetoableChangeSupport object.
  • getVetoableChangeListeners
    Returns an array of all the listeners which have been associated with the named property.
  • hasListeners
    Check if there are any listeners for a specific property, including those registered on all properti

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now