本文整理了Java中java.awt.event.MouseListener.mouseClicked()
方法的一些代码示例,展示了MouseListener.mouseClicked()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MouseListener.mouseClicked()
方法的具体详情如下:
包路径:java.awt.event.MouseListener
类名称:MouseListener
方法名:mouseClicked
[英]Invoked when the mouse button has been clicked (pressed and released) on a component.
[中]
代码示例来源:origin: girtel/Net2Plan
@Override
public void mouseClicked(MouseEvent e) {
if (plugin instanceof MouseListener)
((MouseListener) plugin).mouseClicked(e);
}
代码示例来源:origin: khuxtable/seaglass
/**
* @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
*/
public void mouseClicked(MouseEvent e) {
delegate.mouseClicked(e);
}
代码示例来源:origin: com.jidesoft/jide-oss
public void mouseClicked(MouseEvent e) {
if (_listener != null) {
_listener.mouseClicked(e);
}
}
代码示例来源:origin: bcdev/beam
public void actionPerformed(ActionEvent e) {
_clickTimer.stop();
if (_listener != null && _clickEvent != null) {
_listener.mouseClicked(_clickEvent);
_clickEvent = null;
}
}
});
代码示例来源:origin: net.sf.squirrel-sql.plugins/graph
@Override
public void mouseClicked(MouseEvent e)
{
MouseEvent te = transformMouseEvent(e);
MouseListener[] mouseListenersBuf = _mouseListeners.toArray(new MouseListener[_mouseListeners.size()]);
for (MouseListener mouseListener : mouseListenersBuf)
{
mouseListener.mouseClicked(te);
}
}
代码示例来源:origin: sc.fiji/fiji-lib
@Override
public final void mouseClicked(MouseEvent e) {
if (isThisTool())
listener.mouseClicked(e);
}
代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing
@Override
public void mouseClicked(MouseEvent e) {
if (!isLock()) {
l.mouseClicked(e);
}
}
代码示例来源:origin: jzy3d/jzy3d-api
@Override
public void mouseClicked(com.jogamp.newt.event.MouseEvent me) {
if (mouseListener != null) {
mouseListener.mouseClicked(convertEvent(me, MouseEvent.MOUSE_CLICKED));
}
}
代码示例来源:origin: sdedit/sdedit
public void mouseClicked(MouseEvent e) {
for (MouseListener ml : mouseListeners) {
ml.mouseClicked(translate(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: stackoverflow.com
Component c = mainComponent.getComponentAt(p);
MouseEvent e = new MouseEvent(c,MouseEvent.MOUSE_CLICKED, System.currentTimeMillis(), p.x, p.y, 1, false);
for (MouseListener l : c.getMouseListeners()) {
l.mouseClicked(e);
}
代码示例来源:origin: gurkenlabs/litiengine
@Override
public void mouseClicked(final MouseEvent e) {
this.setLocation(e);
final MouseEvent wrappedEvent = this.createEvent(e);
this.mouseListeners.forEach(listener -> listener.mouseClicked(wrappedEvent));
for (final Consumer<MouseEvent> cons : this.mouseClickedConsumer) {
cons.accept(wrappedEvent);
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public void mouseClicked(MouseEvent e) {
if (e.getSource() instanceof Component) {
e = SwingUtilities.convertMouseEvent((Component) e.getSource(), e, ModelGrid.this);
for (MouseListener l : ModelGrid.this.getMouseListeners()) {
l.mouseClicked(e);
}
}
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@Override
public void mouseClicked(MouseEvent e) {
MouseListener[] mls = getMouseListeners();
if (mls != null && e.getSource() instanceof Component) {
e = SwingUtilities.convertMouseEvent((Component) e.getSource(), e, ModelComponentDecorator.this);
for (MouseListener ml : mls) {
ml.mouseClicked(e);
}
}
}
代码示例来源:origin: com.jtattoo/JTattoo
public void mouseClicked(MouseEvent e) {
if (scrollableTabLayoutEnabled()) {
MouseListener[] ml = tabPane.getMouseListeners();
for (int i = 0; i < ml.length; i++) {
ml[i].mouseClicked(e);
}
}
}
代码示例来源:origin: org.japura/japura-gui
@Override
public void mouseClicked(MouseEvent e) {
if (isEnabled()) {
if (mouseHandler != null) {
e.setSource(component);
mouseHandler.mouseClicked(e);
}
}
}
代码示例来源:origin: com.googlecode.blaisemath/blaise-graphics
@Override
public void mouseClicked(MouseEvent e) {
GMouseEvent gme = graphicMouseEvent(e);
updateMouseGraphic(gme, false);
if (mouseGraphic != null) {
for (MouseListener l : mouseGraphic.getMouseListeners()) {
l.mouseClicked(gme);
if (gme.isConsumed()) {
return;
}
}
}
}
代码示例来源:origin: net.sf.jung/jung-visualization
public void mouseClicked(MouseEvent e) {
checkMouseListeners();
for(int i=0; i<mouseListeners.length; i++) {
mouseListeners[i].mouseClicked(e);
if(e.isConsumed()) break;
}
}
代码示例来源:origin: jrtom/jung
public void mouseClicked(MouseEvent e) {
checkMouseListeners();
for (int i = 0; i < mouseListeners.length; i++) {
mouseListeners[i].mouseClicked(e);
if (e.isConsumed()) {
break;
}
}
}
代码示例来源:origin: ujmp/universal-java-matrix-package
public void mouseClicked(MouseEvent e) {
if (panel.getMouseListeners() != null && panel.getMouseListeners().length != 0) {
MouseEvent e2 = new MouseEvent(panel, e.getID(), e.getWhen(), e.getModifiers(), e.getX(), e.getY(),
e.getXOnScreen(), e.getYOnScreen(), e.getClickCount(), e.isPopupTrigger(), e.getButton());
for (MouseListener m : panel.getMouseListeners()) {
m.mouseClicked(e2);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!