Java 类javax.swing.plaf.metal.MetalToolTipUI 实例源码

项目:jdk8u-jdk    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:openjdk-jdk10    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:openjdk9    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:jdk8u_jdk    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:lookaside_java-1.8.0-openjdk    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:infobip-open-jdk-8    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:jdk8u-dev-jdk    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:OLD-OpenJDK8    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:openjdk-jdk7u-jdk    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:openjdk-icedtea7    文件:bug4846413.java   
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!");
            }

        }
    });
}
项目:SBOLDesigner    文件:AddressBar.java   
public JToolTipWithIcon(MetalToolTipUI toolTipUI) {
    setUI(toolTipUI);
}