javax.swing.JComponent.removeMouseListener()方法的使用及代码示例

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

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

JComponent.removeMouseListener介绍

暂无

代码示例

代码示例来源:origin: freeplane/freeplane

/**
 * Removes a component from tooltip control.
 *
 * @param component  a <code>JComponent</code> object to remove
 */
public void unregisterComponent(JComponent component) {
  component.removeMouseListener(componentMouseListener);
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

/** Stop listening to mouse motion on the passed component */
private int detachFrom (JComponent comp) {
  assert comp instanceof JTree || comp instanceof JList;
  comp.removeMouseMotionListener (this);
  comp.removeMouseListener (this);
  return --refcount;
}

代码示例来源:origin: com.jidesoft/jide-oss

/**
 * Uninstalls the listeners that created to perform resizing operations. After the uninstallation, the component
 * will not be resizable anymore.
 */
public void uninstallListeners() {
  _component.removeMouseListener(_mouseInputAdapter);
  _component.removeMouseMotionListener(_mouseInputAdapter);
  _mouseInputAdapter = null;
}

代码示例来源:origin: freeplane/freeplane

@Override
public void mouseEntered(MouseEvent e) {
  AutoHide.this.popup.removeMouseListener(this);
  mouseInsideListener = new MouseInsideListener(AutoHide.this.popup);
  mouseInsideListener.mouseEntered(e);
  timer.start();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers

public void unregisterComponent(JComponent component) {
  if (!(component instanceof CellTipAware)) {
    throw new RuntimeException("Only components implementing org.netbeans.lib.profiler.ui.components.CellTipAware interface can be unregistered!"); // NOI18N
  }
  component.removeMouseListener(this);
  component.removeMouseMotionListener(moveBeforeEnterListener);
  universalCellTipListener.unregisterForComponent(component);
}

代码示例来源:origin: org.fudaa.framework.fudaa/fudaa-common

private static void removeDndSource(final JComponent _c) {
 _c.putClientProperty("DND_SOURCE", null);
 final MouseListener[] ls = _c.getMouseListeners();
 if (ls != null) {
  for (int i = ls.length - 1; i >= 0; i--) {
   if (ls[i] instanceof DndSource) {
    _c.removeMouseListener(ls[i]);
    _c.removeMouseMotionListener((DndSource) ls[i]);
   }
  }
 }
}

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Removes all listeners.
 * 
 * @param component target component to uninstall required listeners from, 
 *   must not be null
 */
public void release(JComponent component) {
  component.removeMouseListener(this);
  component.removeMouseMotionListener(this);
  component.removeComponentListener(this);
}

代码示例来源:origin: org.swinglabs.swingx/swingx-core

/**
 * Removes all listeners.
 * 
 * @param component target component to uninstall required listeners from, 
 *   must not be null
 */
public void release(JComponent component) {
  component.removeMouseListener(this);
  component.removeMouseMotionListener(this);
  component.removeComponentListener(this);
}

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

/**
 * Removes all listeners.
 * 
 * @param component target component to uninstall required listeners from, 
 *   must not be null
 */
public void release(JComponent component) {
  component.removeMouseListener(this);
  component.removeMouseMotionListener(this);
  component.removeComponentListener(this);
}

代码示例来源:origin: com.github.insubstantial/substance

public void unregisterListeners() {
  this.component.removeMouseListener(this);
  this.component.removeMouseMotionListener(this);
  this.component.removeFocusListener(this);
}

代码示例来源:origin: org.java.net.substance/substance

protected void installPreviewPanel() {
  if (previewPanel != null) {
    previewPanel.removeMouseListener(previewMouseListener);
  }
  super.installPreviewPanel();
  previewPanel.addMouseListener(previewMouseListener);
}

代码示例来源:origin: protegeproject/protege

public void setComponent(JComponent component) {
  if(this.component != null && this.component != component) {
    this.component.removeMouseListener(mouseListener);
    this.component.removeMouseMotionListener(mouseMotionListener);
  }
  if (this.component != component) {
    this.component = component;
    this.component.addMouseListener(mouseListener);
    this.component.addMouseMotionListener(mouseMotionListener);
  }
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

public void setComponent(JComponent component) {
  if(this.component != null && this.component != component) {
    this.component.removeMouseListener(mouseListener);
    this.component.removeMouseMotionListener(mouseMotionListener);
  }
  if (this.component != component) {
    this.component = component;
    this.component.addMouseListener(mouseListener);
    this.component.addMouseMotionListener(mouseMotionListener);
  }
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void uninstallUI(JComponent c) {
  super.uninstallUI(c);
  dockable.removePropertyChangeListener(this);
  c.removeMouseListener(adapter);
  c.removeMouseMotionListener(adapter);
}

代码示例来源:origin: org.java.net.substance/substance

@Override
protected void uninstallListeners() {
  ((SubstanceInternalFrameTitlePane) this.iconPane).uninstallListeners();
  this.iconPane
      .removeMouseMotionListener(this.substanceLabelMouseInputListener);
  this.iconPane
      .removeMouseListener(this.substanceLabelMouseInputListener);
  this.substanceLabelMouseInputListener = null;
  super.uninstallListeners();
}

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

public void setComponent(JComponent component) {
  if(this.component != null && this.component != component) {
    this.component.removeMouseListener(mouseListener);
    this.component.removeMouseMotionListener(mouseMotionListener);
  }
  if (this.component != component) {
    this.component = component;
    this.component.addMouseListener(mouseListener);
    this.component.addMouseMotionListener(mouseMotionListener);
  }
}

代码示例来源:origin: com.github.insubstantial/substance

@Override
protected void uninstallListeners() {
  ((SubstanceInternalFrameTitlePane) this.iconPane).uninstallListeners();
  this.iconPane
      .removeMouseMotionListener(this.substanceLabelMouseInputListener);
  this.iconPane
      .removeMouseListener(this.substanceLabelMouseInputListener);
  this.substanceLabelMouseInputListener = null;
  super.uninstallListeners();
}

代码示例来源:origin: xyz.cofe/docking-frames-core

@Override
public void removeMouseInputListener( MouseInputListener listener ) {
  panel.removeMouseListener( listener );
  panel.removeMouseMotionListener( listener );
  mouseInputListeners.remove( listener );
  
  if( stackComponent != null ){
    stackComponent.getComponent().removeMouseListener( listener );
    stackComponent.getComponent().removeMouseMotionListener( listener );
  }
}

代码示例来源:origin: antlr/antlrworks

public void close() {
  if(parentFrame.getJavaContainer() != null) {
    parentFrame.getJavaContainer().removeComponentListener(pfcl);
  }
  parentComponent.removeComponentListener(pccl);
  parentComponent.removeMouseListener(pcml);
  parentFrame = null;
  parentComponent = null;
}

代码示例来源:origin: org.gephi/ui-components

@Override
  public void uninstallUI(JComponent slider) {
    slider.removeMouseListener(this);
    slider.removeMouseMotionListener(this);
    slider.removeFocusListener(focusListener);
    slider.removeKeyListener(keyListener);
    slider.removeComponentListener(compListener);
    slider.removePropertyChangeListener(propertyListener);
    super.uninstallUI(slider);
  }
}

相关文章

JComponent类方法