javax.swing.JComponent#removeFocusListener ( )源码实例Demo

下面列出了javax.swing.JComponent#removeFocusListener ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: TransparentToolBar.java
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);
    }
}
 
源代码2 项目: visualvm   文件: TransparentToolBar.java
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);
    }
}
 
源代码3 项目: pumpernickel   文件: ColorWellUI.java
@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);
}
 
源代码4 项目: pumpernickel   文件: PaletteUI.java
@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);
}
 
源代码5 项目: pumpernickel   文件: MultiThumbSliderUI.java
@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);
}
 
源代码6 项目: littleluck   文件: LuckPasswordFieldUI.java
/**
 * remove focus Listener
 *
 * @param c
 */
protected void uninstallFocusListener(JComponent c)
{
    if(handle != null)
    {
        c.removeMouseListener(handle);

        c.removeFocusListener(handle);

        handle = null;
    }
    
    borderShape = null;
}
 
源代码7 项目: littleluck   文件: LuckFormattedTextFieldUI.java
/**
 * remove focus Listener
 *
 * @param c
 */
protected void uninstallFocusListener(JComponent c)
{
    if(handle != null)
    {
        c.removeMouseListener(handle);

        c.removeFocusListener(handle);

        handle = null;
    }
    
    borderShape = null;
}
 
源代码8 项目: littleluck   文件: LuckTexFieldUI.java
/**
 * remove focus Listener
 *
 * @param c
 */
protected void uninstallFocusListener(JComponent c)
{
    if(handle != null)
    {
        c.removeMouseListener(handle);

        c.removeFocusListener(handle);

        handle = null;
    }
}
 
源代码9 项目: littleluck   文件: LuckComboBoxUI.java
/**
 * remove focus Listener
 *
 * @param c
 */
protected void uninstallFocusListener(JComponent c)
{
    if(handle != null)
    {
        c.removeMouseListener(handle);

        c.removeFocusListener(handle);

        handle = null;
    }
}
 
源代码10 项目: PyramidShader   文件: MultiThumbSliderUI.java
@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);
}
 
源代码11 项目: birt   文件: SwingRendererImpl.java
/**
 * 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;
			}
		}
	}
}
 
源代码12 项目: birt   文件: SwingRendererImpl.java
@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 );
}
 
源代码13 项目: pumpernickel   文件: RoundTextFieldUI.java
@Override
public void uninstallUI(JComponent c) {
	super.uninstallUI(c);
	c.removeFocusListener(focusListener);
}