本文整理了Java中java.awt.Window.addMouseMotionListener()
方法的一些代码示例,展示了Window.addMouseMotionListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.addMouseMotionListener()
方法的具体详情如下:
包路径:java.awt.Window
类名称:Window
方法名:addMouseMotionListener
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
/**
* Installs the necessary listeners on the parent window, if there is one.
* This takes the parent so that cleanup can be done from
* <tt>removeNotify</tt>, at which point the parent hasn't been reset yet.
*
* @param parent The parent of the <tt>JRootPane</tt>.
*/
private void installWindowListeners(Component parent) {
window = parent instanceof Window ?
(Window) parent :
SwingUtilities.getWindowAncestor(parent);
if (window != null) {
if (mouseInputListener == null) {
mouseInputListener = createWindowMouseInputListener();
}
window.addMouseListener(mouseInputListener);
window.addMouseMotionListener(mouseInputListener);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf
/**
* Installs the necessary Listeners on the parent <code>Window</code>, if
* there is one.
* <p>
* This takes the parent so that cleanup can be done from <code>removeNotify</code>,
* at which point the parent hasn't been reset yet.
*
* @param parent The parent of the JRootPane
*/
private void installWindowListeners(JRootPane root, Component parent) {
if (parent instanceof java.awt.Window) {
window = (java.awt.Window)parent;
} else {
window = SwingUtilities.getWindowAncestor(parent);
}
if (window != null) {
if (mouseInputListener == null) {
mouseInputListener = createWindowMouseInputListener(root);
}
window.addMouseListener(mouseInputListener);
window.addMouseMotionListener(mouseInputListener);
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
/**
* Installs the necessary Listeners on the parent <code>Window</code>, if
* there is one.
* <p>
* This takes the parent so that cleanup can be done from
* <code>removeNotify</code>, at which point the parent hasn't been reset
* yet.
*
* @param parent The parent of the JRootPane
*/
private void installWindowListeners(JRootPane root, Component parent)
{
if (parent instanceof Window)
{
window = (Window) parent;
}
else
{
window = SwingUtilities.getWindowAncestor(parent);
}
if (window != null)
{
if (mouseInputListener == null)
{
mouseInputListener = createWindowMouseInputListener(root);
}
window.addMouseListener(mouseInputListener);
window.addMouseMotionListener(mouseInputListener);
}
}
代码示例来源:origin: com.jtattoo/JTattoo
window.addMouseMotionListener(mouseInputListener);
代码示例来源:origin: khuxtable/seaglass
/**
* Installs the necessary Listeners on the parent <code>Window</code>, if
* there is one.
*
* <p>This takes the parent so that cleanup can be done from <code>
* removeNotify</code>, at which point the parent hasn't been reset yet.</p>
*
* @param root the JRootPane.
* @param parent The parent of the JRootPane
*/
private void installWindowListeners(JRootPane root, Component parent) {
if (parent instanceof Window) {
window = (Window) parent;
} else {
window = SwingUtilities.getWindowAncestor(parent);
}
if (window != null) {
if (mouseInputListener == null) {
mouseInputListener = createWindowMouseInputListener(root);
}
window.addMouseListener(mouseInputListener);
window.addMouseMotionListener(mouseInputListener);
if (windowListener == null) {
windowListener = createFocusListener();
window.addWindowListener(windowListener);
}
}
}
代码示例来源:origin: com.threerings/nenya
root.addKeyListener(listener);
root.addMouseListener(listener);
root.addMouseMotionListener(listener);
代码示例来源:origin: threerings/nenya
root.addKeyListener(listener);
root.addMouseListener(listener);
root.addMouseMotionListener(listener);
代码示例来源:origin: org.java.net.substance/substance
.addMouseMotionListener(this.substanceMouseInputListener);
代码示例来源:origin: com.github.insubstantial/substance
.addMouseMotionListener(this.substanceMouseInputListener);
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
protected void initWindowListeners() {
descriptor.setIdOnTitleBar();
// Remove listeners
window.getWindow().removeMouseMotionListener(resizeMouseInputHandler);
window.getWindow().removeMouseListener(resizeMouseInputHandler);
titleBarTabs.removeEventDispatcherlListener(moveMouseInputHandler);
titleBar.removeMouseMotionListener(moveMouseInputHandler);
titleBar.removeMouseListener(moveMouseInputHandler);
// Add listeners
window.getWindow().addMouseMotionListener(resizeMouseInputHandler);
window.getWindow().addMouseListener(resizeMouseInputHandler);
titleBarTabs.addEventDispatcherlListener(moveMouseInputHandler);
titleBar.addMouseMotionListener(moveMouseInputHandler);
titleBar.addMouseListener(moveMouseInputHandler);
settedListener = true;
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
resizeMouseInputHandler = new FloatingResizeMouseInputHandler(window.getWindow());
moveMouseInputHandler = new FloatingMoveMouseInputHandler(window.getWindow());
window.getWindow().addMouseMotionListener(resizeMouseInputHandler);
window.getWindow().addMouseListener(resizeMouseInputHandler);
window.getWindow().addComponentListener(windowComponentAdapter);
resizeMouseInputHandler = new FloatingResizeMouseInputHandler(window.getWindow());
moveMouseInputHandler = new FloatingMoveMouseInputHandler(window.getWindow());
window.getWindow().addMouseMotionListener(resizeMouseInputHandler);
window.getWindow().addMouseListener(resizeMouseInputHandler);
window.getWindow().addComponentListener(new WindowComponentAdapter());
内容来源于网络,如有侵权,请联系作者删除!