List of usage examples for javax.swing AbstractButton addMouseListener
public synchronized void addMouseListener(MouseListener l)
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/*from w ww .ja v a 2 s . 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 addToolbarButtonMouseListener(MouseListener l) { for (AbstractButton b : toolbarButtons.values()) b.addMouseListener(l); }