Package javax.swing.event

Examples of javax.swing.event.MenuDragMouseEvent


    }

    public void processMouseEvent(final MouseEvent event, final MenuElement[] path,
                                  final MenuSelectionManager manager) {

        processMenuDragMouseEvent(new MenuDragMouseEvent((Component)event.getSource(),
                                                         event.getID(), event.getWhen(),
                                                         event.getModifiers(),
                                                         event.getX(), event.getY(),
                                                         event.getClickCount(),
                                                         event.isPopupTrigger(),
View Full Code Here


             sourceWheelEvent.getScrollType(),
             sourceWheelEvent.getScrollAmount(),
             sourceWheelEvent.getWheelRotation());
  }
  else if (sourceEvent instanceof MenuDragMouseEvent) {
      MenuDragMouseEvent sourceMenuDragEvent = (MenuDragMouseEvent)sourceEvent;
      newEvent = new MenuDragMouseEvent(newSource,
                sourceMenuDragEvent.getID(),
                sourceMenuDragEvent.getWhen(),
                sourceMenuDragEvent.getModifiers(),
                p.x,p.y,
                                              sourceMenuDragEvent.getXOnScreen(),
                                              sourceMenuDragEvent.getYOnScreen(),
                sourceMenuDragEvent.getClickCount(),
                sourceMenuDragEvent.isPopupTrigger(),
                sourceMenuDragEvent.getPath(),
                sourceMenuDragEvent.getMenuSelectionManager());
  }
  else {
      newEvent = new MouseEvent(newSource,
              sourceEvent.getID(),
              sourceEvent.getWhen(),
View Full Code Here

    /*
     * Test method for 'javax.swing.JMenuItem.fireMenuDragMouseEntered(MenuDragMouseEvent)'
     */
    public void testFireMenuDragMouseEntered() {
        MenuDragMouseEvent event1 = new MenuDragMouseEvent(menuItem, 0, 0, 0, 0, 0, 0, false,
                new MenuElement[0], new MenuSelectionManager());
        ConcreteMenuDragMouseListener listener1 = new ConcreteMenuDragMouseListener();
        ConcreteMenuDragMouseListener listener2 = new ConcreteMenuDragMouseListener();
        menuItem.addMenuDragMouseListener(listener1);
        menuItem.addMenuDragMouseListener(listener2);
View Full Code Here

    /*
     * Test method for 'javax.swing.JMenuItem.fireMenuDragMouseExited(MenuDragMouseEvent)'
     */
    public void testFireMenuDragMouseExited() {
        MenuDragMouseEvent event1 = new MenuDragMouseEvent(menuItem, 0, 0, 0, 0, 0, 0, false,
                new MenuElement[0], new MenuSelectionManager());
        ConcreteMenuDragMouseListener listener1 = new ConcreteMenuDragMouseListener();
        ConcreteMenuDragMouseListener listener2 = new ConcreteMenuDragMouseListener();
        menuItem.addMenuDragMouseListener(listener1);
        menuItem.addMenuDragMouseListener(listener2);
View Full Code Here

    /*
     * Test method for 'javax.swing.JMenuItem.fireMenuDragMouseDragged(MenuDragMouseEvent)'
     */
    public void testFireMenuDragMouseDragged() {
        MenuDragMouseEvent event1 = new MenuDragMouseEvent(menuItem, 0, 0, 0, 0, 0, 0, false,
                new MenuElement[0], new MenuSelectionManager());
        ConcreteMenuDragMouseListener listener1 = new ConcreteMenuDragMouseListener();
        ConcreteMenuDragMouseListener listener2 = new ConcreteMenuDragMouseListener();
        menuItem.addMenuDragMouseListener(listener1);
        menuItem.addMenuDragMouseListener(listener2);
View Full Code Here

    /*
     * Test method for 'javax.swing.JMenuItem.fireMenuDragMouseReleased(MenuDragMouseEvent)'
     */
    public void testFireMenuDragMouseReleased() {
        MenuDragMouseEvent event1 = new MenuDragMouseEvent(menuItem, 0, 0, 0, 0, 0, 0, false,
                new MenuElement[0], new MenuSelectionManager());
        ConcreteMenuDragMouseListener listener1 = new ConcreteMenuDragMouseListener();
        ConcreteMenuDragMouseListener listener2 = new ConcreteMenuDragMouseListener();
        menuItem.addMenuDragMouseListener(listener1);
        menuItem.addMenuDragMouseListener(listener2);
View Full Code Here

    /*
     * Test method for 'javax.swing.JMenuItem.processMenuDragMouseEvent(MenuDragMouseEvent)'
     */
    public void testProcessMenuDragMouseEvent() {
        MenuDragMouseEvent event1 = new MenuDragMouseEvent(menuItem, MouseEvent.MOUSE_DRAGGED,
                0, 0, 10, 10, 1, true, new MenuElement[0], new MenuSelectionManager());
        MenuDragMouseEvent event2 = new MenuDragMouseEvent(menuItem, MouseEvent.MOUSE_EXITED,
                0, 0, 10, 10, 1, true, new MenuElement[] { menuItem },
                new MenuSelectionManager());
        MenuDragMouseEvent event3 = new MenuDragMouseEvent(new JButton(),
                MouseEvent.MOUSE_ENTERED, 0, 0, 10, 10, 1, true,
                new MenuElement[] { menuItem }, new MenuSelectionManager());
        MenuDragMouseEvent event4 = new MenuDragMouseEvent(menuItem, MouseEvent.MOUSE_RELEASED,
                0, MouseEvent.BUTTON1, 10, 10, 1, false, new MenuElement[] {},
                new MenuSelectionManager());
        ConcreteMenuDragMouseListener listener1 = new ConcreteMenuDragMouseListener();
        menuItem.addMenuDragMouseListener(listener1);
        menuItem.processMenuDragMouseEvent(event2);
View Full Code Here

                                           sourceWheelEvent.getScrollType(),
                                           sourceWheelEvent.getScrollAmount(),
                                           sourceWheelEvent.getWheelRotation());
        }
        else if (sourceEvent instanceof MenuDragMouseEvent) {
            MenuDragMouseEvent sourceMenuDragEvent = (MenuDragMouseEvent)sourceEvent;
            newEvent = new MenuDragMouseEvent(newSource,
                                              sourceMenuDragEvent.getID(),
                                              sourceMenuDragEvent.getWhen(),
                                              sourceMenuDragEvent.getModifiers()
                                                      | sourceMenuDragEvent.getModifiersEx(),
                                              p.x,p.y,
                                              sourceMenuDragEvent.getXOnScreen(),
                                              sourceMenuDragEvent.getYOnScreen(),
                                              sourceMenuDragEvent.getClickCount(),
                                              sourceMenuDragEvent.isPopupTrigger(),
                                              sourceMenuDragEvent.getPath(),
                                              sourceMenuDragEvent.getMenuSelectionManager());
        }
        else {
            newEvent = new MouseEvent(newSource,
                                      sourceEvent.getID(),
                                      sourceEvent.getWhen(),
View Full Code Here

    }

    public void processMouseEvent(final MouseEvent event, final MenuElement[] path,
                                  final MenuSelectionManager manager) {

        processMenuDragMouseEvent(new MenuDragMouseEvent((Component)event.getSource(),
                                                         event.getID(), event.getWhen(),
                                                         event.getModifiers(),
                                                         event.getX(), event.getY(),
                                                         event.getClickCount(),
                                                         event.isPopupTrigger(),
View Full Code Here

    }

    public void processMouseEvent(final MouseEvent event, final MenuElement[] path,
                                  final MenuSelectionManager manager) {

        processMenuDragMouseEvent(new MenuDragMouseEvent((Component)event.getSource(),
                                                         event.getID(), event.getWhen(),
                                                         event.getModifiers(),
                                                         event.getX(), event.getY(),
                                                         event.getClickCount(),
                                                         event.isPopupTrigger(),
View Full Code Here

TOP

Related Classes of javax.swing.event.MenuDragMouseEvent

Copyright © 2018 www.massapicom. 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.