Java 8 PropertyChangeEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 PropertyChangeEvent class.

This code example shows how to use the following methods:getNewValue, getOldValue, getPropertyName
		} 
		return new PluginResult(Status.OK); 
	} 
 
	public void propertyChange(PropertyChangeEvent evt) {
		String propName = evt.getPropertyName();
		JSONArray data;
		if( propName.equalsIgnoreCase(activity.PROP_ORIENTATION) ) {
			String oldOrientation = (String)evt.getOldValue();
			String newOrientation = (String)evt.getNewValue();
			data = new JSONArray();
			data.put(publisherId);
			data.put(deviceType);
			data.put(newOrientation);			
			deleteBanner(); 
			createBanner(data);
		} 
	} 
} 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue, getPropertyName
This code example shows how to use the following methods:getNewValue, getPropertyName
	 * @param cause the root cause (may be {@code null}) 
	 */ 
	public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class<?> requiredType, Throwable cause) {
		super(propertyChangeEvent,
				"Failed to convert property value of type '" + 
				ClassUtils.getDescriptiveType(propertyChangeEvent.getNewValue()) + "'" +
				(requiredType != null ?
				 " to required type '" + ClassUtils.getQualifiedName(requiredType) + "'" : "") +
				(propertyChangeEvent.getPropertyName() != null ?
				 " for property '" + propertyChangeEvent.getPropertyName() + "'" : ""),
				cause);
		this.value = propertyChangeEvent.getNewValue();
		this.requiredType = requiredType;
	} 
 
	/** 
	 * Create a new TypeMismatchException without PropertyChangeEvent. 
	 * @param value the offending value that couldn't be converted (may be {@code null}) 
	 * @param requiredType the required target type (or {@code null} if not known) 
	 */ 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getPropertyName
	 * Create a new MethodInvocationException. 
	 * @param propertyChangeEvent PropertyChangeEvent that resulted in an exception 
	 * @param cause the Throwable raised by the invoked method 
	 */ 
	public MethodInvocationException(PropertyChangeEvent propertyChangeEvent, Throwable cause) {
		super(propertyChangeEvent, "Property '" + propertyChangeEvent.getPropertyName() + "' threw exception", cause);
	} 
 
	@Override 
	public String getErrorCode() {
		return ERROR_CODE;
	} 
 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue, getOldValue, getPropertyName
     * @param evt A PropertyChangeEvent object describing the event source 
     *            and the property that has changed. 
     */ 
    public void propertyChange(final PropertyChangeEvent evt)
    { 
      changeSupport.firePropertyChange(evt.getPropertyName(), evt.getOldValue(), evt.getNewValue());
    } 
  } 
 
  private DrillDownParameterTable table;
 
  public XulDrillDownParameterTable(final Element self, 
                                    final XulComponent parent,
                                    final XulDomContainer domContainer,
                                    final String tagName)
  { 
    super(tagName);
    this.table = new DrillDownParameterTable();
    setManagedObject(table);
 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue
 
	/** 
	 * Return the affected value that was about to be set, if any. 
	 */ 
	public Object getValue() { 
		return (this.propertyChangeEvent != null ? this.propertyChangeEvent.getNewValue() : null);
	} 
 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue, getOldValue, getPropertyName, getSource
        refreshButton = rb;
    } 
 
    @Override 
    public void propertyChange(PropertyChangeEvent evt) {
        if (names.contains(evt.getPropertyName())) {
            if(evt.getPropertyName().equals(PROPERTY_NAME_USE_ROI_MASK) && evt.getNewValue().equals(true) &&
                ((PropertyContainer)evt.getSource()).getProperty(PROPERTY_NAME_ROI_MASK).getValue()==null){
                return; 
            } 
            else if(evt.getPropertyName().equals(PROPERTY_NAME_NUM_BINS) && evt.getOldValue().equals(evt.getNewValue())){
                return; 
            } 
            else if(evt.getPropertyName().equals(PROPERTY_NAME_AUTO_MIN_MAX) && evt.getNewValue().equals(false)){
                return; 
            } 
            else if(evt.getPropertyName().equals(PROPERTY_NAME_MIN) && (evt.getOldValue().equals(evt.getNewValue()) ||
                ((PropertyContainer)evt.getSource()).getProperty(PROPERTY_NAME_AUTO_MIN_MAX).getValue().equals(true))){
                return; 
            } 

7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue, getOldValue, getPropagationId, getPropertyName, getSource
		super(source, propertyName, oldValue, newValue);
	} 
 
	@SuppressWarnings("unchecked") 
	public GenericPropertyChangeEvent(final PropertyChangeEvent propertyChangeEvent) {
		this(propertyChangeEvent.getSource(),
				propertyChangeEvent.getPropertyName(),
				(V)propertyChangeEvent.getOldValue(),
				(V)propertyChangeEvent.getNewValue());
		setPropagationId(propertyChangeEvent.getPropagationId());
	} 
 
	@SuppressWarnings("unchecked") 
	public V getOldValue() { 
		return (V)super.getOldValue(); 
	} 
 
	@SuppressWarnings("unchecked") 
	public V getNewValue() { 
		return (V)super.getNewValue(); 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getNewValue, getOldValue
     * @param evt A PropertyChangeEvent object describing the event source and the property that has changed. 
     */ 
 
    public void propertyChange(final PropertyChangeEvent evt)
    { 
      final ReportRenderContext oldContext = (ReportRenderContext) evt.getOldValue();
      final ReportRenderContext activeContext = (ReportRenderContext) evt.getNewValue();
      updateActiveContext(oldContext, activeContext);
    } 
  } 
 
  private class SelectionUpdateHandler implements ReportSelectionListener 
  { 
    private SelectionUpdateHandler() 
    { 
    } 
 
    public void selectionAdded(final ReportSelectionEvent event)
    { 
      updateSelection(); 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 PropertyChangeEvent Methods: