本文整理了Java中java.awt.event.MouseEvent.setSource()
方法的一些代码示例,展示了MouseEvent.setSource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MouseEvent.setSource()
方法的具体详情如下:
包路径:java.awt.event.MouseEvent
类名称:MouseEvent
方法名:setSource
暂无
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport
public void mouseEntered(MouseEvent e)
{
e.setSource(AbstractInteractionPlugin.this);
if (listeners != null)
for (Iterator it = listeners.iterator(); it.hasNext(); )
((MouseListener) it.next()).mouseEntered(e);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport
public void mouseReleased(MouseEvent e)
{
e.setSource(AbstractInteractionPlugin.this);
if (listeners != null)
for (Iterator it = listeners.iterator(); it.hasNext(); )
((MouseListener) it.next()).mouseReleased(e);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport
public void mouseClicked(MouseEvent e)
{
e.setSource(AbstractInteractionPlugin.this);
if (listeners != null)
for (Iterator it = listeners.iterator(); it.hasNext(); )
((MouseListener) it.next()).mouseClicked(e);
}
};
代码示例来源:origin: org.scijava/j3dutils
/**
* Redirects event to canvas and to superclass.
*
* @param e {@inheritDoc}
*/
@Override
protected void processMouseEvent(java.awt.event.MouseEvent e) {
super.processMouseEvent(e);
Object src = e.getSource();
e.setSource(canvas);
canvas.processMouseEvent(e);
e.setSource(src);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport
public void mousePressed(MouseEvent e)
{
e.setSource(AbstractInteractionPlugin.this);
if (listeners != null)
for (Iterator it = listeners.iterator(); it.hasNext(); )
((MouseListener) it.next()).mousePressed(e);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport
public void mouseExited(MouseEvent e)
{
e.setSource(AbstractInteractionPlugin.this);
if (listeners != null)
for (Iterator it = listeners.iterator(); it.hasNext(); )
((MouseListener) it.next()).mouseExited(e);
}
代码示例来源:origin: org.scijava/j3dutils
/**
* Redirects event to canvas and to superclass.
*
* @param e {@inheritDoc}
*/
@Override
protected void processMouseMotionEvent(java.awt.event.MouseEvent e) {
super.processMouseMotionEvent(e);
Object src = e.getSource();
e.setSource(canvas);
canvas.processMouseMotionEvent(e);
e.setSource(src);
}
代码示例来源:origin: net.sf.squirrel-sql.plugins/graph
private MouseEvent transformMouseEvent(MouseEvent e)
{
if(this == e.getComponent())
{
return e;
}
else
{
Point lp = getLocationInQueryTextArea(e.getComponent());
e.setSource(this);
e.translatePoint(lp.x, lp.y);
return e;
}
}
代码示例来源:origin: org.japura/japura-gui
@Override
public void mouseReleased(MouseEvent e) {
if (isEnabled()) {
if (mouseHandler != null) {
e.setSource(component);
mouseHandler.mouseReleased(e);
}
}
}
代码示例来源:origin: org.japura/japura-gui
@Override
public void mouseClicked(MouseEvent e) {
if (isEnabled()) {
if (mouseHandler != null) {
e.setSource(component);
mouseHandler.mouseClicked(e);
}
}
}
代码示例来源:origin: org.japura/japura-gui
@Override
public void mouseEntered(MouseEvent e) {
if (isEnabled()) {
e.setSource(component);
component.dispatchEvent(e);
if (mouseHandler != null) {
mouseHandler.mouseEntered(e);
}
}
}
代码示例来源:origin: org.japura/japura-gui
@Override
public void mousePressed(MouseEvent e) {
if (isEnabled()) {
component.requestFocusInWindow();
if (mouseHandler != null) {
e.setSource(component);
mouseHandler.mousePressed(e);
}
}
}
代码示例来源:origin: org.japura/japura-gui
@Override
public void mouseExited(MouseEvent e) {
if (isEnabled()) {
e.setSource(component);
component.dispatchEvent(e);
if (mouseHandler != null) {
mouseHandler.mouseExited(e);
}
}
}
代码示例来源:origin: google/sagetv
java.awt.event.MouseEvent.MOUSE_EXITED, evt.getWhen(), evt.getModifiers(), evt.getX(), evt.getY(),
evt.getClickCount(), evt.isPopupTrigger());
evt3.setSource(enteredMouseComp);
enteredMouseComp.processMouseEvent(evt3);
enteredMouseComp = null;
java.awt.event.MouseEvent.MOUSE_ENTERED, evt.getWhen(), evt.getModifiers(), evt.getX(), evt.getY(),
evt.getClickCount(), evt.isPopupTrigger());
evt4.setSource(enteredMouseComp);
enteredMouseComp.processMouseEvent(evt4);
evt2.setSource(testComp);
testComp.processMouseEvent(evt2);
lastMouseSrc = testComp;
代码示例来源:origin: google/sagetv
e.setSource(null);
代码示例来源:origin: google/sagetv
evt.getY() - pressure.getTrueY() - pressure.getHitAdjustY(),
evt.getClickCount(), evt.isPopupTrigger());
evt3.setSource(pressure);
pressure.processMouseEvent(evt3);
lastWasTrackedDrag = true;
java.awt.event.MouseEvent.MOUSE_EXITED, evt.getWhen(), evt.getModifiers(), evt.getX(), evt.getY(),
evt.getClickCount(), evt.isPopupTrigger());
evt3.setSource(pressure);
pressure.processMouseEvent(evt3);
pressure = null;
内容来源于网络,如有侵权,请联系作者删除!