Examples of JXDemoFrame


Examples of org.jdesktop.swingxset.JXDemoFrame

    }
    // <snip> Input-/FocusEvent notification
    // install custom dispatcher with demo frame
    private void installInputEventListener() {
        if (!(SwingUtilities.getWindowAncestor(this) instanceof JXDemoFrame)) return;
        JXDemoFrame window = (JXDemoFrame) SwingUtilities.getWindowAncestor(this);
        if (inputEventDispatcher == null) {
            inputEventDispatcher = new AbstractInputEventDispatcher() {
                // updates Highlighter for mouseEntered/mouseExited
                // of all components in the frame's container hierarchy
                @Override
                protected void processMouseEvent(MouseEvent e) {
                    if (MouseEvent.MOUSE_ENTERED == e.getID()) {
                        updateHighlighter(e.getComponent());
                    } else if (MouseEvent.MOUSE_EXITED == e.getID()) {
                        updateHighlighter(null);
                    }
                }
               
            };
        }
        window.setInputEventDispatcher(inputEventDispatcher);
        // </snip>

    }
View Full Code Here

Examples of org.jdesktop.swingxset.JXDemoFrame

    }

    private void uninstallInputEventListener() {
        if (!(SwingUtilities.getWindowAncestor(this) instanceof JXDemoFrame)) return;
        JXDemoFrame window = (JXDemoFrame) SwingUtilities.getWindowAncestor(this);
        window.setInputEventDispatcher(null);
        updateHighlighter(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.