Package java.awt

Examples of java.awt.Component.dispatchEvent()


         Component dispatchComponent = SwingUtilities.getDeepestComponentAt(editorComponent, 3, 3 );
            MouseEvent e = (MouseEvent)anEvent;
            MouseEvent e2 = new MouseEvent( dispatchComponent, MouseEvent.MOUSE_RELEASED,
                e.getWhen() + 100000, e.getModifiers(), 3, 3, e.getClickCount(),
                e.isPopupTrigger() );
            dispatchComponent.dispatchEvent(e2);
            e2 = new MouseEvent( dispatchComponent, MouseEvent.MOUSE_CLICKED,
                e.getWhen() + 100001, e.getModifiers(), 3, 3, 1,
                e.isPopupTrigger() );
            dispatchComponent.dispatchEvent(e2);
        }
View Full Code Here


                e.isPopupTrigger() );
            dispatchComponent.dispatchEvent(e2);
            e2 = new MouseEvent( dispatchComponent, MouseEvent.MOUSE_CLICKED,
                e.getWhen() + 100001, e.getModifiers(), 3, 3, 1,
                e.isPopupTrigger() );
            dispatchComponent.dispatchEvent(e2);
        }
        return false;
    }

    public boolean stopCellEditing() {
View Full Code Here

            ((ActiveEvent)event).dispatch();
        } else {
            Object source = event.getSource();
            if (source instanceof Component) {
                Component comp = (Component)source;
                comp.dispatchEvent(event);
            } else if (source instanceof MenuComponent) {
                ((MenuComponent)source).dispatchEvent(event);
            }
        }
    }
View Full Code Here

        if (source != null) {
            InputMethodEvent event = new InputMethodEvent(source,
                    id, text, committedCharacterCount, caret, visiblePosition);

            if (haveActiveClient() && !useBelowTheSpotInput()) {
                source.dispatchEvent(event);
            } else {
                getCompositionAreaHandler(true).processInputMethodEvent(event);
            }
        }
    }
View Full Code Here

            }

            if (target != null) {
                MouseEvent e1 = SwingUtilities.convertMouseEvent(
                        frame.getGlassPane(), e, target);
                target.dispatchEvent(e1);
            }
        }

        private void createAndDispatchMouseEvent(final Component target,
                                                 final int id,
View Full Code Here

     */
    void handleKeyEvent(java.awt.event.KeyEvent keyEvent) {
   
        Component host = fTextComponent.getHost();
        if (host != null) {
            host.dispatchEvent(keyEvent);
        }
    }
}
View Full Code Here

                                .getButton());
                    destination.getParent().dispatchEvent(parentNewEvent);
                   
                }
               
                destination.dispatchEvent(newEvent);
               
             
                if (lastMouseEnteredWidget != null) {
                    newPoint = SwingUtilities.convertPoint(Augmentation.this.augmentedPanel, e
                                    .getPoint(), lastMouseEnteredWidget);
View Full Code Here

                            .getButton());
                destination.getParent().dispatchEvent(parentNewEvent);
               
            }
           
            destination.dispatchEvent(newEvent);
           
           
        } else if (lastMouseEnteredWidget != null) {           
            Point newPoint = SwingUtilities.convertPoint(Augmentation.this.augmentedPanel, e
View Full Code Here

                                                                                    pressedPoint.x, pressedPoint.y);
                                                                                   
                        // If the mouse was aimed at the table top then forward the event
                        // to it so that the gem can be added.
                        if (pressedComp == getTableTopPanel() || pressedComp == getTableTopExplorer().getExplorerTree()) {
                            pressedComp.dispatchEvent(SwingUtilities.convertMouseEvent((Component)evt.getSource(), evt, pressedComp));
                            return;
                        }
                    }
                   
                    // If we get here then either the mouse press was with the right mouse button or
View Full Code Here

        Point p = SwingUtilities.convertPoint((JPanel)e.getSource(), e.getPoint(), contentPane);
        // contentPane のマウス場所のコンポネントを得る
        Component target = contentPane.findComponentAt(p);
        // そのコンポネントにイベントを送る
        if (target != null) {
            target.dispatchEvent(SwingUtilities.convertMouseEvent((JPanel)e.getSource(), e, target));
            //if (e.getID() != MouseEvent.MOUSE_MOVED) System.out.println("target=" + target.getClass());
            SwingUtilities.invokeLater(new Runnable(){
                @Override
                public void run() {
                    repaint();
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.