javax.swing.JScrollPane.removeMouseWheelListener()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中javax.swing.JScrollPane.removeMouseWheelListener()方法的一些代码示例,展示了JScrollPane.removeMouseWheelListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.removeMouseWheelListener()方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:removeMouseWheelListener

JScrollPane.removeMouseWheelListener介绍

暂无

代码示例

代码示例来源:origin: org.icepdf.os/icepdf-viewer

public static void uninstall(JScrollPane scrollpane, Object listener) {
  if (scrollpane != null && listener != null &&
      listener instanceof MouseWheelCurrentPageListener) {
    scrollpane.removeMouseWheelListener((MouseWheelCurrentPageListener) listener);
  }
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

public static void uninstall(JScrollPane scrollpane, Object listener) {
  if (scrollpane != null && listener != null &&
      listener instanceof MouseWheelListenerPageChanger) {
    scrollpane.removeMouseWheelListener((MouseWheelListenerPageChanger) listener);
  }
}

代码示例来源:origin: jawi/ols

/**
 * {@inheritDoc}
 */
@Override
public synchronized void removeMouseWheelListener( final MouseWheelListener aListener )
{
 lazyInitListeners();
 this.originalListeners.remove( aListener );
 super.removeMouseWheelListener( aListener );
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

public void uninstallTool() {
    documentScrollPane.setWheelScrollingEnabled(true);
    documentScrollPane.removeMouseWheelListener(this);
  }
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

public ToolHandler uninstallCurrentTool() {
  if (currentTool != null) {
    currentTool.uninstallTool();
    removeMouseListener(currentTool);
    removeMouseMotionListener(currentTool);
    if (currentTool instanceof TextSelectionViewHandler) {
      documentScrollpane.removeMouseWheelListener((TextSelectionViewHandler) currentTool);
    }
  }
  return currentTool;
}

代码示例来源:origin: fiji/TrackMate

jScrollPaneLinkingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneLinkingFeatures, new GridBagConstraints(0, 6, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneLinkingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneGapClosingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneGapClosingFeatures, new GridBagConstraints(0, 12, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneGapClosingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneSplittingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneSplittingFeatures, new GridBagConstraints(0, 18, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneSplittingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneMergingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneMergingFeatures, new GridBagConstraints(0, 24, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneMergingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

代码示例来源:origin: sc.fiji/TrackMate_

jScrollPaneLinkingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneLinkingFeatures, new GridBagConstraints(0, 6, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneLinkingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneGapClosingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneGapClosingFeatures, new GridBagConstraints(0, 12, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneGapClosingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneSplittingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneSplittingFeatures, new GridBagConstraints(0, 18, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneSplittingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jScrollPaneMergingFeatures.removeMouseWheelListener(l[0]);
this.add(jScrollPaneMergingFeatures, new GridBagConstraints(0, 24, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
jScrollPaneMergingFeatures.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

if (listeners != null && listeners.length == 1) {
  final MouseWheelListener listener = listeners[0];
  treeTableScrollPane.removeMouseWheelListener(listener);
  treeTableScrollPane.addMouseWheelListener(new MouseWheelListener() {
    public void mouseWheelMoved(MouseWheelEvent e) {

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf

protected void uninstallListeners(JComponent c) {
JViewport viewport = scrollpane.getViewport();
JScrollBar vsb = scrollpane.getVerticalScrollBar();
JScrollBar hsb = scrollpane.getHorizontalScrollBar();
if (viewport != null) {
  viewport.removeChangeListener(viewportChangeListener);
}
if (vsb != null) {
  vsb.getModel().removeChangeListener(vsbChangeListener);
    vsb.removePropertyChangeListener(vsbPropertyChangeListener);
}
if (hsb != null) {
  hsb.getModel().removeChangeListener(hsbChangeListener);
    hsb.removePropertyChangeListener(hsbPropertyChangeListener);
}
scrollpane.removePropertyChangeListener(spPropertyChangeListener);
if (mouseScrollListener != null) {
  scrollpane.removeMouseWheelListener(mouseScrollListener);
}
vsbChangeListener = null;
hsbChangeListener = null;
viewportChangeListener = null;
spPropertyChangeListener = null;
  mouseScrollListener = null;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

if (listeners != null && listeners.length == 1) {
  final MouseWheelListener listener = listeners[0];
  tableScroll.removeMouseWheelListener(listener);
  tableScroll.addMouseWheelListener(new MouseWheelListener() {
    public void mouseWheelMoved(MouseWheelEvent e) {

代码示例来源:origin: khuxtable/seaglass

scrollpane.removeMouseWheelListener(mouseScrollListener);

代码示例来源:origin: org.icepdf.os/icepdf-viewer

public void dispose() {
  currentDocument = null;
  // clean up scroll listeners
  documentViewController.getHorizontalScrollBar().removeAdjustmentListener(this);
  documentViewController.getVerticalScrollBar().removeAdjustmentListener(this);
  // remove custom handlers
  if (currentTool != null) {
    removeMouseListener(currentTool);
    removeMouseMotionListener(currentTool);
  }
  // mouse/wheel listener
  documentScrollpane.removeMouseWheelListener(mouseWheelZoom);
  removeMouseListener(this);
  // focus management
  removeFocusListener(this);
  // add a focus management listener.
  KeyboardFocusManager focusManager =
      KeyboardFocusManager.getCurrentKeyboardFocusManager();
  focusManager.removePropertyChangeListener(this);
}

相关文章

JScrollPane类方法