Package java.awt.event

Examples of java.awt.event.MouseEvent.consume()


            if(source == parentComponent) {
                MouseEvent  mouseEvent = (MouseEvent) event;
                boolean filter = handleEventFromParentComponent(mouseEvent);
                if(filter) {
                    mouseEvent.consume();
                }
                else {
                    lastMouseEvent = mouseEvent;
                }
            }
View Full Code Here


            if(source == parentComponent) {
                MouseEvent  mouseEvent = (MouseEvent) event;
                boolean filter = handleEventFromParentComponent(mouseEvent);
                if(filter) {
                    mouseEvent.consume();
                }
                else {
                    lastMouseEvent = mouseEvent;
                }
            }
View Full Code Here

      // Ignores the event in mouseReleased if it is
      // handled by the transfer handler as a drop
      if (handler != null && !handler.isLocalDrag())
      {
        event.consume();
      }

      mouseReleased(event);
    }
  }
View Full Code Here

                    // If this color picker was clicked, cancel the color picking without firing an event
                    if(source!=this)
                        fireColorPicked(color);

                    // Consume the event so that it doesn't get caught by a clicked component
                    mouseEvent.consume();

                    // We're done
                    setActive(false);
                }
View Full Code Here

                                    if (eventNumber == 0) {
                                        dispatchEvent(event);
                                        continue;
                                    }
                                }
                                e.consume();
                                return e;
                            } else {
                                e.consume();
                            }
                        } else {
View Full Code Here

                                    }
                                }
                                e.consume();
                                return e;
                            } else {
                                e.consume();
                            }
                        } else {
                            dispatchEvent(event);
                        }
                    } else if (src instanceof MenuComponent) {
View Full Code Here

            return;
        }
        if (!(event instanceof MouseEvent))
            return;
        MouseEvent mouseEvent = (MouseEvent) event;
        mouseEvent.consume();
        if (event.getID() == MouseEvent.MOUSE_PRESSED) {
            disposeOverlay();
            Component mouseComponent = SwingUtilities.getDeepestComponentAt(mouseEvent.getComponent(), mouseEvent.getX(),
                    mouseEvent.getY());
            if (mouseComponent == null)
View Full Code Here

                    try {
                        BrowserLauncher.openURL(url);
                    } catch (IOException e1) {
                        log.error("Error launching url: " + url);
                    }
                    e.consume();
                    return true;
                }
            }
        }
View Full Code Here

      // Ignores the event in mouseReleased if it is
      // handled by the transfer handler as a drop
      if (handler != null && !handler.isLocalDrag())
      {
        event.consume();
      }

      mouseReleased(event);
    }
  }
View Full Code Here

      // Ignores the event in mouseReleased if it is
      // handled by the transfer handler as a drop
      if (handler != null && !handler.isLocalDrag())
      {
        event.consume();
      }

      mouseReleased(event);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.