Java Code Examples for java.awt.event.MouseListener#mouseReleased()
The following examples show how to use
java.awt.event.MouseListener#mouseReleased() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IdeGlassPaneImpl.java From consulo with Apache License 2.0 | 6 votes |
private static void fireMouseEvent(final MouseListener listener, final MouseEvent event) { switch (event.getID()) { case MouseEvent.MOUSE_PRESSED: listener.mousePressed(event); break; case MouseEvent.MOUSE_RELEASED: listener.mouseReleased(event); break; case MouseEvent.MOUSE_ENTERED: listener.mouseEntered(event); break; case MouseEvent.MOUSE_EXITED: listener.mouseExited(event); break; case MouseEvent.MOUSE_CLICKED: listener.mouseClicked(event); break; } }
Example 2
Source File: SwingWrapperClickConsumer.java From CrossMobile with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void mouseReleased(MouseEvent e) { if (e.getX() < 0 || e.getY() < 0) return; SwingGraphicsBridge.component.mouseReleased(e); if (active) for (MouseListener mouse1 : mouse) mouse1.mouseReleased(e); }
Example 3
Source File: SkillInfoTab.java From pcgen with GNU Lesser General Public License v2.1 | 5 votes |
private void releaseMouse(Component component) { MouseListener[] listeners = component.getMouseListeners(); for (MouseListener listener : listeners) { listener.mouseReleased(new MouseEvent(component, MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(), 0, 0, 0, 1, false )); } }
Example 4
Source File: RocLinePanel.java From rtg-tools with BSD 2-Clause "Simplified" License | 5 votes |
@Override public void mouseReleased(MouseEvent e) { if (isRetained(e)) { for (final MouseListener u : mListeners) { u.mouseReleased(e); } } }
Example 5
Source File: SkillInfoTab.java From pcgen with GNU Lesser General Public License v2.1 | 5 votes |
private void releaseMouse(Component component) { MouseListener[] listeners = component.getMouseListeners(); for (MouseListener listener : listeners) { listener.mouseReleased(new MouseEvent(component, MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(), 0, 0, 0, 1, false )); } }
Example 6
Source File: Awt.java From pdfxtk with Apache License 2.0 | 5 votes |
public void handle(AsyncInvocation.Invocation i, AsyncInvocation.Result result) { if(i.object instanceof MouseListener) { MouseListener ml = (MouseListener)i.object; if( check(i.method, "mouseClicked", MouseEvent.class)) ml.mouseClicked( (MouseEvent)i.args[0]); else if(check(i.method, "mouseEntered", MouseEvent.class)) ml.mouseEntered( (MouseEvent)i.args[0]); else if(check(i.method, "mouseExited", MouseEvent.class)) ml.mouseExited( (MouseEvent)i.args[0]); else if(check(i.method, "mousePressed", MouseEvent.class)) ml.mousePressed( (MouseEvent)i.args[0]); else if(check(i.method, "mouseReleased", MouseEvent.class)) ml.mouseReleased((MouseEvent)i.args[0]); else throw new IllegalArgumentException("Unknown MouseListener method:" + i.method); result.set(null); } }