Java Code Examples for javax.swing.JComponent#removePropertyChangeListener()

The following examples show how to use javax.swing.JComponent#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: MigLayoutVisualPadding.java    From FlatLaf with Apache License 2.0 6 votes vote down vote up
/**
 * Removes listeners and restores client property.
 */
public static void uninstall( JComponent c ) {
	if( !migLayoutAvailable )
		return;

	// remove listener
	for( PropertyChangeListener l : c.getPropertyChangeListeners() ) {
		if( l instanceof FlatMigListener ) {
			c.removePropertyChangeListener( l );
			break;
		}
	}

	// remove client property
	if( c.getClientProperty( VISUAL_PADDING_PROPERTY ) instanceof FlatMigInsets )
		c.putClientProperty( VISUAL_PADDING_PROPERTY, null );
}
 
Example 2
Source File: BreadCrumbUI.java    From pumpernickel with MIT License 5 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	super.uninstallUI(c);

	c.removeMouseListener(mouseListener);
	c.removePropertyChangeListener(JBreadCrumb.PATH_KEY, refreshUIListener);
	c.removePropertyChangeListener(JBreadCrumb.FORMATTER_KEY,
			refreshUIListener);
	c.removePropertyChangeListener(PROPERTY_SEPARATOR_ICON,
			refreshUIListener);
}
 
Example 3
Source File: BasicAudioPlayerUI.java    From pumpernickel with MIT License 5 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	super.uninstallUI(c);

	getFields(c).uninstall();
	c.removePropertyChangeListener(AudioPlayerComponent.SOURCE_KEY,
			updateSourceListener);
	c.removeHierarchyListener(hierarchyListener);
}
 
Example 4
Source File: MultiThumbSliderUI.java    From pumpernickel with MIT License 5 votes vote down vote up
@Override
public void uninstallUI(JComponent slider) {
	slider.removeMouseListener(this);
	slider.removeMouseMotionListener(this);
	slider.removeFocusListener(focusListener);
	slider.removeKeyListener(keyListener);
	slider.removeComponentListener(compListener);
	slider.removePropertyChangeListener(propertyListener);
	slider.removePropertyChangeListener(THUMB_SHAPE_PROPERTY,
			thumbShapeListener);
	super.uninstallUI(slider);
}
 
Example 5
Source File: MultiThumbSliderUI.java    From PyramidShader with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void uninstallUI(JComponent slider) {
	slider.removeMouseListener(this);
	slider.removeMouseMotionListener(this);
	slider.removeFocusListener(focusListener);
	slider.removeKeyListener(keyListener);
	slider.removeComponentListener(compListener);
	slider.removePropertyChangeListener(propertyListener);
	slider.removePropertyChangeListener(THUMB_SHAPE_PROPERTY, thumbShapeListener);
	super.uninstallUI(slider);
}
 
Example 6
Source File: PaletteUI.java    From pumpernickel with MIT License 5 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	super.uninstallUI(c);
	c.removePropertyChangeListener(JPalette.PROPERTY_COLORS,
			propertyLayoutListener);
	c.removePropertyChangeListener(PaletteUI.PROPERTY_HIGHLIGHT,
			propertyRepaintListener);
	c.removeMouseListener(mouseListener);
	c.removeFocusListener(focusListener);
	c.removeKeyListener(keyListener);
	Fields fields = getFields((JPalette) c, false);
	if (fields != null)
		fields.uninstall();
	c.putClientProperty(PROPERTY_FIELDS, null);
}
 
Example 7
Source File: SeaGlassViewportUI.java    From seaglass with Apache License 2.0 4 votes vote down vote up
protected void uninstallListeners(JComponent c) {
    c.removePropertyChangeListener(this);
}
 
Example 8
Source File: FlatToolTipUI.java    From FlatLaf with Apache License 2.0 4 votes vote down vote up
@Override
protected void uninstallListeners( JComponent c ) {
	super.uninstallListeners( c );

	c.removePropertyChangeListener( sharedPropertyChangedListener );
}
 
Example 9
Source File: AudioPlayerUI.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	c.removePropertyChangeListener(AudioPlayerComponent.PLAYER_KEY,
			audioPlayerListener);
}
 
Example 10
Source File: SubtleScrollBarUI.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	super.uninstallUI(c);
	c.removePropertyChangeListener(PROPERTY_ROLLOVER_BOOLEAN,
			rolloverListener);
}
 
Example 11
Source File: AquaOpenLocationPaneUI.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	c.removePropertyChangeListener(KEY_INCLUDE_SIDEBAR,
			propertyChangeListener);
	super.uninstallUI(c);
}
 
Example 12
Source File: QOptionPaneUI.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public void uninstallUI(JComponent c) {
	super.uninstallUI(c);
	c.removePropertyChangeListener(optionPanePropertyListener);
}
 
Example 13
Source File: XTextAreaPeer.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void uninstallListeners(JComponent scrollPane) {
    super.uninstallListeners(scrollPane);
    scrollPane.removePropertyChangeListener(propertyChangeHandler);
}
 
Example 14
Source File: XTextAreaPeer.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void uninstallListeners(JComponent scrollPane) {
    super.uninstallListeners(scrollPane);
    scrollPane.removePropertyChangeListener(propertyChangeHandler);
}
 
Example 15
Source File: XTextAreaPeer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void uninstallListeners(JComponent scrollPane) {
    super.uninstallListeners(scrollPane);
    scrollPane.removePropertyChangeListener(propertyChangeHandler);
}
 
Example 16
Source File: XTextAreaPeer.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void uninstallListeners(JComponent scrollPane) {
    super.uninstallListeners(scrollPane);
    scrollPane.removePropertyChangeListener(propertyChangeHandler);
}
 
Example 17
Source File: PToolTipUI.java    From PolyGlot with MIT License 4 votes vote down vote up
protected void uninstallListeners(JComponent c) {
    c.removePropertyChangeListener(propertyChangeListener);

    propertyChangeListener = null;
}
 
Example 18
Source File: XTextAreaPeer.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void uninstallListeners(JComponent scrollPane) {
    super.uninstallListeners(scrollPane);
    scrollPane.removePropertyChangeListener(propertyChangeHandler);
}
 
Example 19
Source File: XTextAreaPeer.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected void uninstallListeners(JComponent scrollPane) {
    super.uninstallListeners(scrollPane);
    scrollPane.removePropertyChangeListener(propertyChangeHandler);
}
 
Example 20
Source File: SeaGlassToolTipUI.java    From seaglass with Apache License 2.0 4 votes vote down vote up
/**
 * @inheritDoc
 */
@Override
protected void uninstallListeners(JComponent c) {
    c.removePropertyChangeListener(this);
}