Java 8 PropertyChangeListener - 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 PropertyChangeListener class.

This code example shows how to use the following methods:propertyChange
        this.propertyName = propertyName;
        this.listener = listener;
    } 
 
    public void updateTargetValue(Object value) { 
        listener.propertyChange(new PropertyChangeEvent(proxyObject, propertyName,
                InvokerHelper.getProperty(proxyObject, propertyName), value));
    } 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
	 * */ 
	public void onStopTrackingTouch(SeekBar seekBar)
	{ 
		if (listener != null)
		{ 
			listener.propertyChange(new PropertyChangeEvent(
				this, "interval", null, interval));
		} 
	} 
 
	public void onStartTrackingTouch(SeekBar seekBar)
	{ 
		// Not important function 
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
    }// </editor-fold>//GEN-END:initComponents 
 
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
         
        PropertyChangeEvent propEvt = new PropertyChangeEvent(jTextField1, "name", null, jTextField1.getText());
        listener.propertyChange(propEvt);
    }//GEN-LAST:event_jButton1ActionPerformed 
 
    // Variables declaration - do not modify//GEN-BEGIN:variables 
    private javax.swing.Box.Filler filler1;
    private javax.swing.Box.Filler filler2;
    private javax.swing.Box.Filler filler3;
    private javax.swing.Box.Filler filler4;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTextField jTextField1;
    // End of variables declaration//GEN-END:variables 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
        } 
 
        @Override 
        public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getSource() == AbstractComponent.this) {
                delegate.propertyChange(evt);
            } 
        } 
         
        @Override 
        public boolean equals(Object obj) {
            return delegate == obj;
        } 
         
        @Override 
        public int hashCode() { 
            return delegate.hashCode();
        } 
    } 
 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
			try { 
				bean.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class).invoke(bean, new PropertyChangeListener() {
					 
					public void propertyChange(PropertyChangeEvent evt) {
						if (propertyName.equals(evt.getPropertyName()))
							listener.propertyChange(evt);
					} 
				}); 
			} catch (Exception ex2) {
				throw new RuntimeException(ex);
			} 
		} 
	} 
	public static void removePropertyChangeListener(Object bean, String propertyName, PropertyChangeListener listener) {
		if (bean == null) 
			throw new NullPointerException("Null bean !");
		 
		try { 
			bean.getClass().getMethod("removePropertyChangeListener", PropertyChangeListener.class).invoke(bean, listener);
		} catch (Exception ex) {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
		if( listener == null )
		{ 
			removeListener(); 
		} 
		else 
			listener.propertyChange( evt );
	} 
 
	private void removeListener() 
	{ 
		try 
		{ 
			Method method = src.getClass().getMethod( "removePropertyChangeListener",
					new Class[] { PropertyChangeListener.class } );
			method.invoke( src, new Object[] { this } );
		} 
		catch( Exception e )
		{ 
			e.printStackTrace();
		} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
		this.listener = listener;
	} 
 
	private void notifyListeners(Object object, String property,
			String oldValue, String newValue) {
		listener.propertyChange(new PropertyChangeEvent(this, "firstName",
				oldValue, newValue));
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
		public MultiPropertyChangeListener(PropertyChangeListener iparent) {
			parent = iparent;
		} 
 
		public void propertyChange(PropertyChangeEvent e) {
			parent.propertyChange(e);
			if (e.getPropertyName().equals("PRESSED_ICON")) {
				setPressedIcon((Icon) e.getNewValue());
			} 
		} 
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
		public MultiPropertyChangeListener(PropertyChangeListener iparent) {
			parent = iparent;
		} 
 
		public void propertyChange(PropertyChangeEvent e) {
			parent.propertyChange(e);
			if (e.getPropertyName().equals("PRESSED_ICON")) {
				setPressedIcon((Icon) e.getNewValue());
			} 
		} 
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:propertyChange
        PropertyChangeListener listener = _listenerRef.get();
        if (listener == null) {
            removeListener(); 
        } 
        else 
            listener.propertyChange(evt);
    } 
 
    public void itemStateChanged(ItemEvent e) {
 
    } 
 
    public void stateChanged(ChangeEvent e) {
 
    } 
 
    private void removeListener() { 
        try { 
            Method method = _src.getClass().getMethod("removePropertyChangeListener"
                    , new Class[]{PropertyChangeListener.class});
4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 PropertyChangeListener Methods: