Example usage for javax.swing AbstractButton removeMouseListener

List of usage examples for javax.swing AbstractButton removeMouseListener

Introduction

In this page you can find the example usage for javax.swing AbstractButton removeMouseListener.

Prototype

public synchronized void removeMouseListener(MouseListener l) 

Source Link

Document

Removes the specified mouse listener so that it no longer receives mouse events from this component.

Usage

From source file:com.haulmont.cuba.desktop.sys.DesktopToolTipManager.java

/**
 * Register tooltip for {@link javax.swing.AbstractButton}.
 * Tooltip is displayed when the user hovers over a button
 * ToolTip text is taken from {@link javax.swing.JComponent#getToolTipText()}.
 *
 * @param btn Button to register//  ww  w .  jav a 2s.  c  o m
 */
public void registerTooltip(final AbstractButton btn) {
    btn.removeMouseListener(componentMouseListener);
    btn.addMouseListener(componentMouseListener);
}

From source file:org.nuclos.client.ui.collect.Chart.java

public void removeToolbarButtonMouseListener(MouseListener l) {
    for (AbstractButton b : toolbarButtons.values())
        b.removeMouseListener(l);
}