Examples of dispatchEvent()


Examples of javax.swing.JComponent.dispatchEvent()

    Object value = getValueAt(row, col);
    if (value instanceof JComponent) {
      JComponent component = (JComponent) value;
      MouseEvent newEvent = SwingUtilities.convertMouseEvent(this, e, component);

      component.dispatchEvent(newEvent);
      repaint();
      return true;
    }
    return false;
  }
View Full Code Here

Examples of javax.swing.JFileChooser.dispatchEvent()

      protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed)
      {
        if (e.getKeyCode() == KeyEvent.VK_ESCAPE && getCellEditor() == null)
        {
          // We are not editing, forward to filechooser.
          chooser.dispatchEvent(e);
          return true;
        }
        return super.processKeyBinding(ks, e, condition, pressed);
      }
    };
View Full Code Here

Examples of javax.swing.JFrame.dispatchEvent()

        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here

Examples of javax.swing.JFrame.dispatchEvent()

        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
        menuItem.addActionListener(new AbstractAction() {
      private static final long serialVersionUID = 1L;
            public void actionPerformed(ActionEvent event) {
              JFrame frame = XBayaMenuItem.this.engine.getGUI().getFrame();
        frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
            }
        });
        return menuItem;
    }
View Full Code Here

Examples of javax.swing.JPanel.dispatchEvent()

    }

    public void testMouseInputAdapter() throws Exception {
        JComponent component = new JPanel();
        component.addMouseListener(adapter);
        component.dispatchEvent(new MouseEvent(component, MouseEvent.MOUSE_ENTERED, EventQueue
                .getMostRecentEventTime(), 0, 0, 0, 1, false));
        assertTrue(adapter.isEventOccured());
    }

    private class TestAdapter extends MouseInputAdapter {
View Full Code Here

Examples of javax.swing.JTextField.dispatchEvent()

      JTextField component = new JTextField();
      bind().textOf(component).after(eventsOf(MouseListener.class, MouseEvent.MOUSE_CLICKED)).to(model, ModelForTests.VALUE);
      component.setText("Text to be transferred on specific event");
      assertEquals("", model.getValue());
      // when
      component.dispatchEvent(new MouseEvent(component, MouseEvent.MOUSE_CLICKED, 0, 0, 0, 0, 1, false));
      // then
      assertEquals("Text to be transferred on specific event", model.getValue());
   }

   @Test
View Full Code Here

Examples of javax.swing.JTree.dispatchEvent()

      if (treeColumn != -1)
      {
        MouseEvent newME = new MouseEvent(tree, me.getID(), me.getWhen(), me.getModifiers(), me.getX(), me.getY(), me.getClickCount(), me.isPopupTrigger());

        tree.dispatchEvent(newME);
      }
      else
      {
        int [] selectedRow = tree.getSelectionRows();
View Full Code Here

Examples of net.xoetrope.optional.svg.w3c.dom.events.EventTarget.dispatchEvent()

    {
        if(theEvent!=null)
        {
           EventTarget target = theEvent.getCurrentTarget();
           if(target!= null)
              target.dispatchEvent(theEvent);
        }
    }


    /**
 
View Full Code Here

Examples of org.activiti.engine.delegate.event.ActivitiEventDispatcher.dispatchEvent()

    }
   
    // Dispatch both an update and a retry-decrement event
    ActivitiEventDispatcher eventDispatcher = commandContext.getEventDispatcher();
    if (eventDispatcher.isEnabled()) {
      eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
          ActivitiEventType.ENTITY_UPDATED, job));
      eventDispatcher.dispatchEvent(ActivitiEventBuilder.createEntityEvent(
          ActivitiEventType.JOB_RETRIES_DECREMENTED, job));
    }
   
View Full Code Here

Examples of org.apache.batik.dom.events.NodeEventTarget.dispatchEvent()

        final String s =
            elt.getAttributeNS(null, SVGConstants.SVG_ONLOAD_ATTRIBUTE);
        if (s.length() == 0) {
            // No script to run so just dispatch the event to DOM
            // (For java presumably).
            t.dispatchEvent(ev);
            return;
        }

        final Interpreter interp = getInterpreter();
        if (interp == null) {
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.