Java Code Examples for javax.swing.plaf.metal.MetalToolTipUI

The following examples show how to use javax.swing.plaf.metal.MetalToolTipUI. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dragonwell8_jdk   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 2
Source Project: TencentKona-8   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 3
Source Project: jdk8u60   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 4
Source Project: openjdk-jdk8u   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 5
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 6
Source Project: openjdk-jdk9   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 7
Source Project: jdk8u-jdk   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 8
Source Project: hottub   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 9
Source Project: openjdk-8-source   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 10
Source Project: openjdk-8   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 11
Source Project: jdk8u_jdk   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 12
Source Project: jdk8u-jdk   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}
 
Example 13
Source Project: jdk8u-dev-jdk   Source File: bug4846413.java    License: GNU General Public License v2.0 6 votes vote down vote up
private static void checkToolTip() throws Exception {
    SwingUtilities.invokeAndWait(new Runnable() {

        @Override
        public void run() {
            JToolTip tooltip = (JToolTip) Util.findSubComponent(
                    JFrame.getFrames()[0], "JToolTip");

            if (tooltip == null) {
                throw new RuntimeException("Tooltip has not been found!");
            }

            MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
            tooltipUI.installUI(tooltip);

            if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
                throw new RuntimeException("Tooltip acceleration is not properly set!");
            }

        }
    });
}