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

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

源代码1 项目: audiveris   文件: Rubber.java
/**
 * Actually register the rubber as the mouse listener for the provided component.
 *
 * @param component the related component
 */
public final void connectComponent (JComponent component)
{
    // Clean up if needed
    disconnectComponent(this.component);

    // Remember the related component (to get visible rect, etc ...)
    this.component = component;

    if (component != null) {
        // To be notified of mouse clicks
        component.removeMouseListener(this); // No multiple notifications
        component.addMouseListener(this);

        // To be notified of mouse mouvements
        component.removeMouseMotionListener(this); // No multiple notifs
        component.addMouseMotionListener(this);

        // To be notified of mouse  wheel mouvements
        component.removeMouseWheelListener(this); // No multiple notifs
        component.addMouseWheelListener(this);
    }
}
 
源代码2 项目: libreveris   文件: Rubber.java
/**
 * Actually register the rubber as the mouse listener for the provided
 * component.
 *
 * @param component the related component
 */
public void connectComponent (JComponent component)
{
    // Clean up if needed
    disconnectComponent(this.component);

    // Remember the related component (to get visible rect, etc ...)
    this.component = component;

    // To be notified of mouse clicks
    component.removeMouseListener(this); // No multiple notifications
    component.addMouseListener(this);

    // To be notified of mouse mouvements
    component.removeMouseMotionListener(this); // No multiple notifs
    component.addMouseMotionListener(this);

    // To be notified of mouse  wheel mouvements
    component.removeMouseWheelListener(this); // No multiple notifs
    component.addMouseWheelListener(this);
}
 
源代码3 项目: audiveris   文件: Rubber.java
/**
 * Disconnect the provided component
 *
 * @param component the component to disconnect
 */
private void disconnectComponent (JComponent component)
{
    if (component != null) {
        component.removeMouseListener(this);
        component.removeMouseMotionListener(this);
        component.removeMouseWheelListener(this);
    }
}
 
源代码4 项目: WorldGrower   文件: JScrollableToolTip.java
@Override
public void removeNotify() {
    JComponent comp = getComponent();
    if(comp != null) {
        comp.removeMouseWheelListener(this);
    } 
    super.removeNotify();
}
 
源代码5 项目: libreveris   文件: Rubber.java
/**
 * Disconnect the provided component
 *
 * @param component the component to disconnect
 */
public void disconnectComponent (JComponent component)
{
    if (component != null) {
        component.removeMouseListener(this);
        component.removeMouseMotionListener(this);
        component.removeMouseWheelListener(this);
    }
}
 
源代码6 项目: jfxvnc   文件: PointerEventHandler.java
public void unregister(JComponent node) {
  node.removeMouseMotionListener(mouseMotionEventHandler);
  node.removeMouseListener(mouseEventHandler);
  node.removeMouseWheelListener(mouseWheelEventHandler);
}