java.awt.event.MouseListener.mouseClicked()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(123)

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

MouseListener.mouseClicked介绍

[英]Invoked when the mouse button has been clicked (pressed and released) on a component.
[中]

代码示例

代码示例来源:origin: girtel/Net2Plan

  1. @Override
  2. public void mouseClicked(MouseEvent e) {
  3. if (plugin instanceof MouseListener)
  4. ((MouseListener) plugin).mouseClicked(e);
  5. }

代码示例来源:origin: khuxtable/seaglass

  1. /**
  2. * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
  3. */
  4. public void mouseClicked(MouseEvent e) {
  5. delegate.mouseClicked(e);
  6. }

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

  1. public void mouseClicked(MouseEvent e) {
  2. if (_listener != null) {
  3. _listener.mouseClicked(e);
  4. }
  5. }

代码示例来源:origin: bcdev/beam

  1. public void actionPerformed(ActionEvent e) {
  2. _clickTimer.stop();
  3. if (_listener != null && _clickEvent != null) {
  4. _listener.mouseClicked(_clickEvent);
  5. _clickEvent = null;
  6. }
  7. }
  8. });

代码示例来源:origin: net.sf.squirrel-sql.plugins/graph

  1. @Override
  2. public void mouseClicked(MouseEvent e)
  3. {
  4. MouseEvent te = transformMouseEvent(e);
  5. MouseListener[] mouseListenersBuf = _mouseListeners.toArray(new MouseListener[_mouseListeners.size()]);
  6. for (MouseListener mouseListener : mouseListenersBuf)
  7. {
  8. mouseListener.mouseClicked(te);
  9. }
  10. }

代码示例来源:origin: sc.fiji/fiji-lib

  1. @Override
  2. public final void mouseClicked(MouseEvent e) {
  3. if (isThisTool())
  4. listener.mouseClicked(e);
  5. }

代码示例来源:origin: com.anrisoftware.prefdialog/prefdialog-misc-swing

  1. @Override
  2. public void mouseClicked(MouseEvent e) {
  3. if (!isLock()) {
  4. l.mouseClicked(e);
  5. }
  6. }

代码示例来源:origin: jzy3d/jzy3d-api

  1. @Override
  2. public void mouseClicked(com.jogamp.newt.event.MouseEvent me) {
  3. if (mouseListener != null) {
  4. mouseListener.mouseClicked(convertEvent(me, MouseEvent.MOUSE_CLICKED));
  5. }
  6. }

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

  1. public void mouseClicked(MouseEvent e) {
  2. for (MouseListener ml : mouseListeners) {
  3. ml.mouseClicked(translate(e));
  4. }
  5. }

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport

  1. public void mouseClicked(MouseEvent e)
  2. {
  3. e.setSource(AbstractInteractionPlugin.this);
  4. if (listeners != null)
  5. for (Iterator it = listeners.iterator(); it.hasNext(); )
  6. ((MouseListener) it.next()).mouseClicked(e);
  7. }
  8. };

代码示例来源:origin: stackoverflow.com

  1. Component c = mainComponent.getComponentAt(p);
  2. MouseEvent e = new MouseEvent(c,MouseEvent.MOUSE_CLICKED, System.currentTimeMillis(), p.x, p.y, 1, false);
  3. for (MouseListener l : c.getMouseListeners()) {
  4. l.mouseClicked(e);
  5. }

代码示例来源:origin: gurkenlabs/litiengine

  1. @Override
  2. public void mouseClicked(final MouseEvent e) {
  3. this.setLocation(e);
  4. final MouseEvent wrappedEvent = this.createEvent(e);
  5. this.mouseListeners.forEach(listener -> listener.mouseClicked(wrappedEvent));
  6. for (final Consumer<MouseEvent> cons : this.mouseClickedConsumer) {
  7. cons.accept(wrappedEvent);
  8. }
  9. }

代码示例来源:origin: com.eas.platypus/platypus-js-forms

  1. @Override
  2. public void mouseClicked(MouseEvent e) {
  3. if (e.getSource() instanceof Component) {
  4. e = SwingUtilities.convertMouseEvent((Component) e.getSource(), e, ModelGrid.this);
  5. for (MouseListener l : ModelGrid.this.getMouseListeners()) {
  6. l.mouseClicked(e);
  7. }
  8. }
  9. }

代码示例来源:origin: com.eas.platypus/platypus-js-forms

  1. @Override
  2. public void mouseClicked(MouseEvent e) {
  3. MouseListener[] mls = getMouseListeners();
  4. if (mls != null && e.getSource() instanceof Component) {
  5. e = SwingUtilities.convertMouseEvent((Component) e.getSource(), e, ModelComponentDecorator.this);
  6. for (MouseListener ml : mls) {
  7. ml.mouseClicked(e);
  8. }
  9. }
  10. }

代码示例来源:origin: com.jtattoo/JTattoo

  1. public void mouseClicked(MouseEvent e) {
  2. if (scrollableTabLayoutEnabled()) {
  3. MouseListener[] ml = tabPane.getMouseListeners();
  4. for (int i = 0; i < ml.length; i++) {
  5. ml[i].mouseClicked(e);
  6. }
  7. }
  8. }

代码示例来源:origin: org.japura/japura-gui

  1. @Override
  2. public void mouseClicked(MouseEvent e) {
  3. if (isEnabled()) {
  4. if (mouseHandler != null) {
  5. e.setSource(component);
  6. mouseHandler.mouseClicked(e);
  7. }
  8. }
  9. }

代码示例来源:origin: com.googlecode.blaisemath/blaise-graphics

  1. @Override
  2. public void mouseClicked(MouseEvent e) {
  3. GMouseEvent gme = graphicMouseEvent(e);
  4. updateMouseGraphic(gme, false);
  5. if (mouseGraphic != null) {
  6. for (MouseListener l : mouseGraphic.getMouseListeners()) {
  7. l.mouseClicked(gme);
  8. if (gme.isConsumed()) {
  9. return;
  10. }
  11. }
  12. }
  13. }

代码示例来源:origin: net.sf.jung/jung-visualization

  1. public void mouseClicked(MouseEvent e) {
  2. checkMouseListeners();
  3. for(int i=0; i<mouseListeners.length; i++) {
  4. mouseListeners[i].mouseClicked(e);
  5. if(e.isConsumed()) break;
  6. }
  7. }

代码示例来源:origin: jrtom/jung

  1. public void mouseClicked(MouseEvent e) {
  2. checkMouseListeners();
  3. for (int i = 0; i < mouseListeners.length; i++) {
  4. mouseListeners[i].mouseClicked(e);
  5. if (e.isConsumed()) {
  6. break;
  7. }
  8. }
  9. }

代码示例来源:origin: ujmp/universal-java-matrix-package

  1. public void mouseClicked(MouseEvent e) {
  2. if (panel.getMouseListeners() != null && panel.getMouseListeners().length != 0) {
  3. MouseEvent e2 = new MouseEvent(panel, e.getID(), e.getWhen(), e.getModifiers(), e.getX(), e.getY(),
  4. e.getXOnScreen(), e.getYOnScreen(), e.getClickCount(), e.isPopupTrigger(), e.getButton());
  5. for (MouseListener m : panel.getMouseListeners()) {
  6. m.mouseClicked(e2);
  7. }
  8. }
  9. }

相关文章