Package java.awt

Examples of java.awt.AWTEvent$EventConverter


        if(!isPressed() && isArmed()) {
      setSelected(!this.isSelected());

            int modifiers = 0;
            AWTEvent currentEvent = EventQueue.getCurrentEvent();
            if (currentEvent instanceof InputEvent) {
                modifiers = ((InputEvent)currentEvent).getModifiers();
            } else if (currentEvent instanceof ActionEvent) {
                modifiers = ((ActionEvent)currentEvent).getModifiers();
            }
View Full Code Here


        }
    }

    @Override
    public Object addItem(String txt) {
        AWTEvent currentEvent = EventQueue.getCurrentEvent();
        if (currentEvent instanceof FocusEvent) {
            return null;
        }
        int res = MessageBox.showConfirmYesNo(MessageBox.C_ADD_DIRECTORYITEM);
        if (res == MessageBox.ANSWER_YES) {
View Full Code Here

                    SWTNativeInterface.getInstance().getDisplay().readAndDispatch();
                  } else {
                    // On Mac OS, under rare circumstances, we have a situation where SWT is waiting synchronously on AWT, while AWT is blocked here.
                    // We have to use a similar forced dispatching trick.
                    EventQueue eventQueue = Toolkit.getDefaultToolkit().getSystemEventQueue();
                    AWTEvent nextEvent = eventQueue.peekEvent();
                    if(nextEvent != null) {
                      nextEvent = eventQueue.getNextEvent();
                      if(nextEvent != null) {
                        Method dispatchMethod = EventQueue.class.getDeclaredMethod("dispatchEvent", AWTEvent.class);
                        dispatchMethod.setAccessible(true);
View Full Code Here

      owner.addWindowListener(parentWindowListener);
      try {
        if (SwingUtilities.isEventDispatchThread()) {
          EventQueue theQueue = getToolkit().getSystemEventQueue();
          while (isVisible()) {
            AWTEvent event = theQueue.getNextEvent();
            Object src = event.getSource();
            if (event instanceof ActiveEvent) {
              ((ActiveEvent) event).dispatch();
            } else if (src instanceof Component) {
              ((Component) src).dispatchEvent(event);
            }
View Full Code Here

TOP

Related Classes of java.awt.AWTEvent$EventConverter

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.