本文整理了Java中java.awt.Container.removeMouseListener()
方法的一些代码示例,展示了Container.removeMouseListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.removeMouseListener()
方法的具体详情如下:
包路径:java.awt.Container
类名称:Container
方法名:removeMouseListener
暂无
代码示例来源:origin: edu.ucar/grib
/**
* Removes the specified mouse listener so that it no longer receives
* mouse events from this component.
*
* @param l the mouse listener
* */
public synchronized void removeMouseListener(MouseListener l) {
super.removeMouseListener(l);
imgDisplay.removeMouseListener(l);
}
代码示例来源:origin: edu.ucar/jj2000
/**
* Removes the specified mouse listener so that it no longer receives
* mouse events from this component.
*
* @param l the mouse listener
* */
public synchronized void removeMouseListener(MouseListener l) {
super.removeMouseListener(l);
imgDisplay.removeMouseListener(l);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide-loaders
public void removeNotify() {
try {
getParent().removeMouseListener(listener);
} finally {
super.removeNotify();
}
}
代码示例来源:origin: net.sf.cuf/cuf-swing
/**
* Process add/remove of the table to/from a parent.
* We have to install mouse listeners in order to get the context menu working properly
* for tables that are embedded into a {@link javax.swing.JScrollPane}.
*/
private void checkTableParent()
{
if ( (mMode & CONTEXT_MENU_IN_VIEWPORT) != 0 ) // only install mouse listener in corresponding mode
{
Container currentParent = mTable.getParent();
if ( currentParent != mTableParent)
{
// remove contect menu mouse listener from previous parent
if ( mTableParent != null )
{
mTableParent.removeMouseListener(this);
mTableParent = null;
}
// add context menu mouse listener to new parent
if ( currentParent instanceof JViewport )
{
mTableParent = currentParent;
mTableParent.addMouseListener(this);
}
}
}
}
代码示例来源:origin: net.sf.cuf/cuf-swing
/**
* Set the mode as a bitflag consisting of
* {@link #CONTEXT_MENU_IN_TABLE}, {@link #CONTEXT_MENU_IN_HEADER} and {@link #CONTEXT_MENU_IN_VIEWPORT}.
* @param pMode new mode
*/
public void setMode(final int pMode)
{
// remove old listeners
if ( (this.mMode & CONTEXT_MENU_IN_HEADER) != 0 )
mTable.getTableHeader().removeMouseListener(this);
if ( (this.mMode & CONTEXT_MENU_IN_TABLE) != 0 )
mTable.removeMouseListener(this);
if ( mTableParent != null ) // tableParent is only set when there is a listener installed in it
{
mTableParent.removeMouseListener(this);
mTableParent = null;
}
// add new listeners
this.mMode = pMode;
if ( (pMode & CONTEXT_MENU_IN_HEADER) != 0 )
mTable.getTableHeader().addMouseListener(this);
if ( (pMode & CONTEXT_MENU_IN_TABLE) != 0 )
mTable.addMouseListener(this);
checkTableParent();
}
内容来源于网络,如有侵权,请联系作者删除!