Java Code Examples for java.awt.Component#removePropertyChangeListener()

The following examples show how to use java.awt.Component#removePropertyChangeListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AnimatedLayout.java    From pumpernickel with MIT License 5 votes vote down vote up
public void propertyChange(PropertyChangeEvent evt) {
	Component c = (JComponent) evt.getSource();
	JComponent parent = (JComponent) c.getParent();
	if (parent != null) {
		LayoutManager layout = parent.getLayout();
		if (layout == ClientProperty.this) {
			layout.layoutContainer(parent);
		} else {
			c.removePropertyChangeListener(PROPERTY_DESTINATION,
					this);
		}
	}
}
 
Example 2
Source File: AWTFrameProcessor.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
protected void unbindListeners() {
	Component destination = getDestination();
	destination.removePropertyChangeListener(this);
	destination.removePropertyChangeListener(this);
}