Java Code Examples for javax.swing.JComponent#removeFocusListener()
The following examples show how to use
javax.swing.JComponent#removeFocusListener() .
These examples are extracted from open source projects.
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 Project: netbeans File: TransparentToolBar.java License: Apache License 2.0 | 5 votes |
public void removeItem(JComponent c) { if (toolbar != null) { toolbar.remove(c); } else { if (c instanceof AbstractButton) { c.removeMouseListener(listener); ((AbstractButton) c).removeChangeListener(listener); c.removeFocusListener(listener); } remove(c); } }
Example 2
Source Project: visualvm File: TransparentToolBar.java License: GNU General Public License v2.0 | 5 votes |
public void removeItem(JComponent c) { if (toolbar != null) { toolbar.remove(c); } else { if (c instanceof AbstractButton) { c.removeMouseListener(listener); ((AbstractButton) c).removeChangeListener(listener); c.removeFocusListener(listener); } remove(c); } }
Example 3
Source Project: pumpernickel File: ColorWellUI.java License: MIT License | 5 votes |
@Override public void uninstallUI(JComponent c) { c.removeFocusListener(repaintFocusListener); c.removeMouseListener(mouseListener); c.removeMouseMotionListener(mouseListener); c.removeKeyListener(keyListener); JColorWell well = (JColorWell) c; ColorChangeListener ccl = listenerMap.remove(well); if (ccl != null) well.getColorSelectionModel().removeChangeListener(ccl); }
Example 4
Source Project: pumpernickel File: PaletteUI.java License: MIT License | 5 votes |
@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 5
Source Project: pumpernickel File: MultiThumbSliderUI.java License: MIT License | 5 votes |
@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 Project: littleluck File: LuckPasswordFieldUI.java License: Apache License 2.0 | 5 votes |
/** * remove focus Listener * * @param c */ protected void uninstallFocusListener(JComponent c) { if(handle != null) { c.removeMouseListener(handle); c.removeFocusListener(handle); handle = null; } borderShape = null; }
Example 7
Source Project: littleluck File: LuckFormattedTextFieldUI.java License: Apache License 2.0 | 5 votes |
/** * remove focus Listener * * @param c */ protected void uninstallFocusListener(JComponent c) { if(handle != null) { c.removeMouseListener(handle); c.removeFocusListener(handle); handle = null; } borderShape = null; }
Example 8
Source Project: littleluck File: LuckTexFieldUI.java License: Apache License 2.0 | 5 votes |
/** * remove focus Listener * * @param c */ protected void uninstallFocusListener(JComponent c) { if(handle != null) { c.removeMouseListener(handle); c.removeFocusListener(handle); handle = null; } }
Example 9
Source Project: littleluck File: LuckComboBoxUI.java License: Apache License 2.0 | 5 votes |
/** * remove focus Listener * * @param c */ protected void uninstallFocusListener(JComponent c) { if(handle != null) { c.removeMouseListener(handle); c.removeFocusListener(handle); handle = null; } }
Example 10
Source Project: PyramidShader File: MultiThumbSliderUI.java License: GNU General Public License v3.0 | 5 votes |
@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 11
Source Project: birt File: SwingRendererImpl.java License: Eclipse Public License 1.0 | 5 votes |
/** * Free all allocated system resources. */ @Override public void dispose( ) { super.dispose( ); _lhmAllTriggers.clear( ); if ( _iun != null ) { Object obj = _iun.peerInstance( ); if ( obj instanceof JComponent ) { JComponent jc = (JComponent) obj; if ( _eh != null ) { jc.removeMouseListener( _eh ); jc.removeMouseMotionListener( _eh ); jc.removeKeyListener( _eh ); jc.removeFocusListener( _eh ); _eh = null; } } } }
Example 12
Source Project: birt File: SwingRendererImpl.java License: Eclipse Public License 1.0 | 5 votes |
@Override public void setProperty( String sProperty, Object oValue ) { // InteractiveRenderer(iv) is only for Swing if ( sProperty.equals( IDeviceRenderer.UPDATE_NOTIFIER ) && iv != null ) { _iun = (IUpdateNotifier) oValue; iv.setUpdateNotifier( _iun ); _lhmAllTriggers.clear( ); Object obj = _iun.peerInstance( ); if ( obj instanceof JComponent ) { JComponent jc = (JComponent) obj; if ( _eh != null ) { // We can't promise to remove all the old swtEventHandler // due to SWT limitation here, so be sure to just attach the // update_notifier only to one renderer. jc.removeMouseListener( _eh ); jc.removeMouseMotionListener( _eh ); jc.removeKeyListener( _eh ); jc.removeFocusListener( _eh ); } _eh = new SwingEventHandler( iv, _lhmAllTriggers, _iun, getULocale( ) ); jc.addMouseListener( _eh ); jc.addMouseMotionListener( _eh ); jc.addKeyListener( _eh ); jc.addFocusListener( _eh ); } } super.setProperty( sProperty, oValue ); }
Example 13
Source Project: pumpernickel File: RoundTextFieldUI.java License: MIT License | 4 votes |
@Override public void uninstallUI(JComponent c) { super.uninstallUI(c); c.removeFocusListener(focusListener); }