Code example for PropertyChangeSupport

0
 * 
 */ 
@SuppressWarnings("serial") 
public class SamplePanel extends JPanel { 
 
	private PropertyChangeSupport support = new PropertyChangeSupport(this);
	private String yaml = BuilderUtils.getYamlContent(SwingJavaBuilder.getConfig(), this.getClass());
 
	public SamplePanel() throws Exception {} 
	 
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		if (support != null) {
			support.addPropertyChangeListener(listener);
		} 
	} 
 
	public void removePropertyChangeListener(PropertyChangeListener listener) {
		if (support != null) {
			support.removePropertyChangeListener(listener);
		} 
	}