类java.awt.AWTException源码实例Demo

下面列出了怎么用java.awt.AWTException的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: jdk8u-dev-jdk   文件: Test6541987.java
public static void main(String[] args) throws AWTException {
    robot = new Robot();
    // test escape after selection
    start();
    click(KeyEvent.VK_ESCAPE);
    toolkit.realSync();
    // test double escape after editing
    start();
    click(KeyEvent.VK_1);
    click(KeyEvent.VK_0);
    click(KeyEvent.VK_ESCAPE);
    click(KeyEvent.VK_ESCAPE);
    toolkit.realSync();
    // all windows should be closed
    for (Window window : Window.getWindows()) {
        if (window.isVisible()) {
            throw new Error("found visible window: " + window.getName());
        }
    }
}
 
源代码2 项目: openjdk-jdk8u   文件: CGLGraphicsConfig.java
@Override
public void assertOperationSupported(final int numBuffers,
                                     final BufferCapabilities caps)
        throws AWTException {
    // Assume this method is never called with numBuffers != 2, as 0 is
    // unsupported, and 1 corresponds to a SingleBufferStrategy which
    // doesn't depend on the peer. Screen is considered as a separate
    // "buffer".
    if (numBuffers != 2) {
        throw new AWTException("Only double buffering is supported");
    }
    final BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) {
        throw new AWTException("FlipContents.PRIOR is not supported");
    }
}
 
源代码3 项目: jdk8u-jdk   文件: CGLGraphicsConfig.java
@Override
public void assertOperationSupported(final int numBuffers,
                                     final BufferCapabilities caps)
        throws AWTException {
    // Assume this method is never called with numBuffers != 2, as 0 is
    // unsupported, and 1 corresponds to a SingleBufferStrategy which
    // doesn't depend on the peer. Screen is considered as a separate
    // "buffer".
    if (numBuffers != 2) {
        throw new AWTException("Only double buffering is supported");
    }
    final BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) {
        throw new AWTException("FlipContents.PRIOR is not supported");
    }
}
 
源代码4 项目: jdk8u60   文件: D3DGraphicsConfig.java
/**
 * Checks that the requested configuration is natively supported; if not,
 * an AWTException is thrown.
 */
@Override
public void assertOperationSupported(Component target,
                                     int numBuffers,
                                     BufferCapabilities caps)
    throws AWTException
{
    if (numBuffers < 2 || numBuffers > 4) {
        throw new AWTException("Only 2-4 buffers supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.COPIED &&
        numBuffers != 2)
    {
        throw new AWTException("FlipContents.COPIED is only" +
                               "supported for 2 buffers");
    }
}
 
源代码5 项目: candybean   文件: SpecializedScreenRecorder.java
public SpecializedScreenRecorder(GraphicsConfiguration cfg, String name,
		Configuration config) throws IOException, AWTException {
	super(cfg, new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey,
			config.getValue("video.format", MIME_QUICKTIME)), new Format(
			MediaTypeKey, MediaType.VIDEO, EncodingKey,
			config.getValue("video.encoding",
					ENCODING_QUICKTIME_CINEPAK),
			CompressorNameKey, config.getValue("video.compression",
					COMPRESSOR_NAME_QUICKTIME_CINEPAK), DepthKey,
			(int) 24, FrameRateKey, Rational.valueOf(Integer
					.parseInt(config.getValue("video.format.frameRate",
							"15"))), QualityKey, 1.0f, KeyFrameIntervalKey,
			(int) (15 * 60)), new Format(MediaTypeKey, MediaType.VIDEO,
			EncodingKey, "black", FrameRateKey, Rational.valueOf(30)), null);
	this.name = name;
	this.config = config;
	this.setMaxFileSize(Long.parseLong(config.getValue("maxFileSize",MAX_SIZE_DEFAULT_KB)));
	this.setMaxRecordingTime(Long.parseLong(config.getValue("maxRecordingTime",MAX_DURATION_DEFAULT_MS)));
}
 
源代码6 项目: jeveassets   文件: FilterSave.java
@Override
protected void save() {
	if (validate()) {
		returnString = (String) jName.getSelectedItem();
		setVisible(false);
	}
	//XXX - Workaround for strange bug:
	// 1. Tricker validation by pressing enter in the jName JComboBox
	// 2. Doing validate JOptionPane is shown and lose focus (to another program)
	// 3. JOptionPane is hidden (by mouse click)
	// 4. jName is not responding (string is locked)
	try {
		Robot robot = new Robot();
		robot.keyRelease(KeyEvent.VK_ENTER);
	} catch (AWTException e) {

	}
}
 
源代码7 项目: jdk8u60   文件: BackgroundIsNotUpdated.java
public static void main(final String[] args) throws AWTException {
    final Window window = new BackgroundIsNotUpdated(null);
    window.setSize(300, 300);
    window.setLocationRelativeTo(null);
    window.setVisible(true);
    sleep();
    window.setBackground(Color.GREEN);
    sleep();
    final Robot robot = new Robot();
    robot.setAutoDelay(200);
    Point point = window.getLocationOnScreen();
    Color color = robot.getPixelColor(point.x + window.getWidth() / 2,
                                      point.y + window.getHeight() / 2);
    window.dispose();
    if (!color.equals(Color.GREEN)) {
        throw new RuntimeException(
                "Expected: " + Color.GREEN + " , Actual: " + color);
    }
}
 
源代码8 项目: dragonwell8_jdk   文件: D3DGraphicsConfig.java
/**
 * Checks that the requested configuration is natively supported; if not,
 * an AWTException is thrown.
 */
@Override
public void assertOperationSupported(Component target,
                                     int numBuffers,
                                     BufferCapabilities caps)
    throws AWTException
{
    if (numBuffers < 2 || numBuffers > 4) {
        throw new AWTException("Only 2-4 buffers supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.COPIED &&
        numBuffers != 2)
    {
        throw new AWTException("FlipContents.COPIED is only" +
                               "supported for 2 buffers");
    }
}
 
public static void main(String[] args) throws Throwable {

        SwingUtilities.invokeAndWait(new Runnable() {

            @Override
            public void run() {
                constructTestUI();
            }
        });

        try {
            testRobot = new Robot();
        } catch (AWTException ex) {
            throw new RuntimeException("Exception in Robot creation");
        }

        testRobot.waitForIdle();

        // Method performing auto test operation
        test();

        disposeTestUI();
    }
 
源代码10 项目: dragonwell8_jdk   文件: X11GraphicsConfig.java
/**
 * Attempts to create an XDBE-based backbuffer for the given peer.  If
 * the requested configuration is not natively supported, an AWTException
 * is thrown.  Otherwise, if the backbuffer creation is successful, a
 * handle to the native backbuffer is returned.
 */
public long createBackBuffer(X11ComponentPeer peer,
                             int numBuffers, BufferCapabilities caps)
    throws AWTException
{
    if (!X11GraphicsDevice.isDBESupported()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (numBuffers > 2) {
        throw new AWTException(
            "Only double or single buffering is supported");
    }
    BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }

    long window = peer.getContentWindow();
    int swapAction = getSwapAction(caps.getFlipContents());

    return createBackBuffer(window, swapAction);
}
 
源代码11 项目: SikuliX1   文件: Guide.java
private void init(Region region) {
  try {
    robot = new Robot();
  } catch (AWTException e1) {
    e1.printStackTrace();
  }
  content = getJPanel();
  _region = region;
  Rectangle rect = _region.getRect();
  content.setPreferredSize(rect.getSize());
  add(content);
  setBounds(rect);
  getRootPane().putClientProperty("Window.shadow", Boolean.FALSE);
  ((JPanel) getContentPane()).setDoubleBuffered(true);
  setVisible(false);
  setFocusableWindowState(false);
}
 
ExecutableInputMethodManager() {

        // set up host adapter locator
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        try {
            if (toolkit instanceof InputMethodSupport) {
                InputMethodDescriptor hostAdapterDescriptor =
                    ((InputMethodSupport)toolkit)
                    .getInputMethodAdapterDescriptor();
                if (hostAdapterDescriptor != null) {
                    hostAdapterLocator = new InputMethodLocator(hostAdapterDescriptor, null, null);
                }
            }
        } catch (AWTException e) {
            // if we can't get a descriptor, we'll just have to do without native input methods
        }

        javaInputMethodLocatorList = new Vector<InputMethodLocator>();
        initializeInputMethodLocatorList();
    }
 
源代码13 项目: openjdk-8   文件: X11GraphicsConfig.java
/**
 * Attempts to create an XDBE-based backbuffer for the given peer.  If
 * the requested configuration is not natively supported, an AWTException
 * is thrown.  Otherwise, if the backbuffer creation is successful, a
 * handle to the native backbuffer is returned.
 */
public long createBackBuffer(X11ComponentPeer peer,
                             int numBuffers, BufferCapabilities caps)
    throws AWTException
{
    if (!X11GraphicsDevice.isDBESupported()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (numBuffers > 2) {
        throw new AWTException(
            "Only double or single buffering is supported");
    }
    BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }

    long window = peer.getContentWindow();
    int swapAction = getSwapAction(caps.getFlipContents());

    return createBackBuffer(window, swapAction);
}
 
源代码14 项目: openjdk-jdk8u-backup   文件: bug7097771.java
public static void main(final String[] args) throws AWTException {
    final bug7097771 frame = new bug7097771();
    frame.setSize(300, 300);
    frame.setLocationRelativeTo(null);
    final Button button = new Button();
    button.addActionListener(frame);
    frame.add(button);
    frame.setVisible(true);
    sleep();
    frame.setEnabled(false);
    button.setEnabled(false);
    button.setEnabled(true);
    sleep();
    Util.clickOnComp(button, new Robot());
    sleep();
    frame.dispose();
    if (action) {
        throw new RuntimeException("Button is not disabled.");
    }
}
 
源代码15 项目: openjdk-8-source   文件: D3DGraphicsConfig.java
/**
 * Checks that the requested configuration is natively supported; if not,
 * an AWTException is thrown.
 */
@Override
public void assertOperationSupported(Component target,
                                     int numBuffers,
                                     BufferCapabilities caps)
    throws AWTException
{
    if (numBuffers < 2 || numBuffers > 4) {
        throw new AWTException("Only 2-4 buffers supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.COPIED &&
        numBuffers != 2)
    {
        throw new AWTException("FlipContents.COPIED is only" +
                               "supported for 2 buffers");
    }
}
 
源代码16 项目: openjdk-jdk8u-backup   文件: CGLGraphicsConfig.java
@Override
public void assertOperationSupported(final int numBuffers,
                                     final BufferCapabilities caps)
        throws AWTException {
    // Assume this method is never called with numBuffers != 2, as 0 is
    // unsupported, and 1 corresponds to a SingleBufferStrategy which
    // doesn't depend on the peer. Screen is considered as a separate
    // "buffer".
    if (numBuffers != 2) {
        throw new AWTException("Only double buffering is supported");
    }
    final BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) {
        throw new AWTException("FlipContents.PRIOR is not supported");
    }
}
 
源代码17 项目: dragonwell8_jdk   文件: Test6541987.java
public static void main(String[] args) throws AWTException {
    robot = new Robot();
    // test escape after selection
    start();
    click(KeyEvent.VK_ESCAPE);
    toolkit.realSync();
    // test double escape after editing
    start();
    click(KeyEvent.VK_1);
    click(KeyEvent.VK_0);
    click(KeyEvent.VK_ESCAPE);
    click(KeyEvent.VK_ESCAPE);
    toolkit.realSync();
    // all windows should be closed
    for (Window window : Window.getWindows()) {
        if (window.isVisible()) {
            throw new Error("found visible window: " + window.getName());
        }
    }
}
 
源代码18 项目: openjdk-8-source   文件: DisposeFrameOnDragTest.java
public static void main(String[] args) throws Throwable {

        SwingUtilities.invokeAndWait(new Runnable() {
            @Override
            public void run() {
                constructTestUI();
            }
        });

        Util.waitForIdle(null);
        try {
            Point loc = textArea.getLocationOnScreen();
            Util.drag(new Robot(),
                    new Point((int) loc.x + 3, (int) loc.y + 3),
                    new Point((int) loc.x + 40, (int) loc.y + 40),
                    InputEvent.BUTTON1_MASK);
        } catch (AWTException ex) {
            throw new RuntimeException("Could not initiate a drag operation");
        }
        Util.waitForIdle(null);
    }
 
源代码19 项目: jdk8u60   文件: GLXGraphicsConfig.java
/**
 * Attempts to create a GLX-based backbuffer for the given peer.  If
 * the requested configuration is not natively supported, an AWTException
 * is thrown.  Otherwise, if the backbuffer creation is successful, a
 * value of 1 is returned.
 */
@Override
public long createBackBuffer(X11ComponentPeer peer,
                             int numBuffers, BufferCapabilities caps)
    throws AWTException
{
    if (numBuffers > 2) {
        throw new AWTException(
            "Only double or single buffering is supported");
    }
    BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) {
        throw new AWTException("FlipContents.PRIOR is not supported");
    }

    // non-zero return value means backbuffer creation was successful
    // (checked in X11ComponentPeer.flip(), etc.)
    return 1;
}
 
源代码20 项目: jdk8u_jdk   文件: BackgroundIsNotUpdated.java
public static void main(final String[] args) throws AWTException {
    final Window window = new BackgroundIsNotUpdated(null);
    window.setSize(300, 300);
    window.setLocationRelativeTo(null);
    window.setVisible(true);
    sleep();
    window.setBackground(Color.GREEN);
    sleep();
    final Robot robot = new Robot();
    robot.setAutoDelay(200);
    Point point = window.getLocationOnScreen();
    Color color = robot.getPixelColor(point.x + window.getWidth() / 2,
                                      point.y + window.getHeight() / 2);
    window.dispose();
    if (!color.equals(Color.GREEN)) {
        throw new RuntimeException(
                "Expected: " + Color.GREEN + " , Actual: " + color);
    }
}
 
源代码21 项目: TencentKona-8   文件: X11GraphicsConfig.java
/**
 * Attempts to create an XDBE-based backbuffer for the given peer.  If
 * the requested configuration is not natively supported, an AWTException
 * is thrown.  Otherwise, if the backbuffer creation is successful, a
 * handle to the native backbuffer is returned.
 */
public long createBackBuffer(X11ComponentPeer peer,
                             int numBuffers, BufferCapabilities caps)
    throws AWTException
{
    if (!X11GraphicsDevice.isDBESupported()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (numBuffers > 2) {
        throw new AWTException(
            "Only double or single buffering is supported");
    }
    BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }

    long window = peer.getContentWindow();
    int swapAction = getSwapAction(caps.getFlipContents());

    return createBackBuffer(window, swapAction);
}
 
源代码22 项目: openjdk-jdk9   文件: bug6415145.java
private void test() throws AWTException {
    try {
        moveMouseTo(robot, button);
        robot.mousePress(InputEvent.BUTTON1_MASK);
        robot.waitForIdle();

        moveMouseTo(robot, item1);
        robot.waitForIdle();

        moveMouseTo(robot, item2);
        robot.waitForIdle();
        if ( (item1.isArmed()) || (!item2.isArmed()) ) {
            throw new RuntimeException("Selected item is not being updated" +
                    " while dragging above popup menu.");
        }
    } finally {
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
    }
}
 
源代码23 项目: openjdk-jdk8u-backup   文件: WGLGraphicsConfig.java
/**
 * Checks that the requested configuration is natively supported; if not,
 * an AWTException is thrown.
 */
@Override
public void assertOperationSupported(Component target,
                                     int numBuffers,
                                     BufferCapabilities caps)
    throws AWTException
{
    if (numBuffers > 2) {
        throw new AWTException(
            "Only double or single buffering is supported");
    }
    BufferCapabilities configCaps = getBufferCapabilities();
    if (!configCaps.isPageFlipping()) {
        throw new AWTException("Page flipping is not supported");
    }
    if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) {
        throw new AWTException("FlipContents.PRIOR is not supported");
    }
}
 
源代码24 项目: openjdk-jdk8u   文件: DisposeFrameOnDragTest.java
public static void main(String[] args) throws Throwable {

        SwingUtilities.invokeAndWait(new Runnable() {
            @Override
            public void run() {
                constructTestUI();
            }
        });

        Util.waitForIdle(null);
        try {
            Point loc = textArea.getLocationOnScreen();
            Util.drag(new Robot(),
                    new Point((int) loc.x + 3, (int) loc.y + 3),
                    new Point((int) loc.x + 40, (int) loc.y + 40),
                    InputEvent.BUTTON1_MASK);
        } catch (AWTException ex) {
            throw new RuntimeException("Could not initiate a drag operation");
        }
        Util.waitForIdle(null);
    }
 
源代码25 项目: jdk8u-jdk   文件: VSyncedBufferStrategyTest.java
private void createBS(boolean requestVSync) {
    if (bs != null && requestVSync == currentBSVSynced) {
        return;
    }

    BufferCapabilities bc = defaultBC;
    if (requestVSync) {
        bc = new sun.java2d.pipe.hw.ExtendedBufferCapabilities(
                new ImageCapabilities(true),
                new ImageCapabilities(true),
                FlipContents.COPIED,
                sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.VSYNC_ON);
    }
    try {
        createBufferStrategy(2, bc);
    } catch (AWTException e) {
        System.err.println("Warning: cap is not supported: "+bc);
        e.printStackTrace();
        createBufferStrategy(2);
    }
    currentBSVSynced = requestVSync;
    bs = getBufferStrategy();
    String s =
        getParent() instanceof Frame ?
            ((Frame)getParent()).getTitle() : "parent";
    System.out.println("Created BS for \"" + s + "\" frame, bs="+bs);
}
 
源代码26 项目: openjdk-8   文件: CustomCompositeTest.java
private static void testVolatileImage(GraphicsConfiguration cfg,
        boolean accelerated)
{
    VolatileImage dst = null;
    try {
        dst = cfg.createCompatibleVolatileImage(640, 480,
            new ImageCapabilities(accelerated));
    } catch (AWTException e) {
        System.out.println("Unable to create volatile image, skip the test.");
        return;
    }
    renderToVolatileImage(dst);
}
 
private void createBS(boolean requestVSync) {
    if (bs != null && requestVSync == currentBSVSynced) {
        return;
    }

    BufferCapabilities bc = defaultBC;
    if (requestVSync) {
        bc = new sun.java2d.pipe.hw.ExtendedBufferCapabilities(
                new ImageCapabilities(true),
                new ImageCapabilities(true),
                FlipContents.COPIED,
                sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.VSYNC_ON);
    }
    try {
        createBufferStrategy(2, bc);
    } catch (AWTException e) {
        System.err.println("Warning: cap is not supported: "+bc);
        e.printStackTrace();
        createBufferStrategy(2);
    }
    currentBSVSynced = requestVSync;
    bs = getBufferStrategy();
    String s =
        getParent() instanceof Frame ?
            ((Frame)getParent()).getTitle() : "parent";
    System.out.println("Created BS for \"" + s + "\" frame, bs="+bs);
}
 
源代码28 项目: openjdk-jdk9   文件: bug6219960.java
private static boolean pressOK(Component comp) {

        JInternalFrame internalFrame
                = findModalInternalFrame(comp, QUESTION);

        if (internalFrame == null) {
            return false;
        }

        JButton button = (JButton) findButton(internalFrame);

        if (button == null) {
            return false;
        }

        try {
            Robot robot = new Robot();
            Point location = button.getLocationOnScreen();
            Rectangle bounds = button.getBounds();
            int centerX = (int) (location.getX() + bounds.getWidth() / 2);
            int centerY = (int) (location.getY() + bounds.getHeight() / 2);
            robot.mouseMove(centerX, centerY);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
        } catch (IllegalComponentStateException ignore) {
            return false;
        } catch (AWTException e) {
            throw new RuntimeException(e);
        }
        return true;
    }
 
源代码29 项目: senbot   文件: SeleniumManagerTest.java
@Test
public void testSenBotContext_webdriverCreationHookInitialized() throws IOException, AWTException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
	SenBotContext.cleanupSenBot();
	
	SeleniumManager manager = SenBotContext.getSenBotContext().getSeleniumManager();
	
 assertNotNull("Ensure hook created", manager.getWebDriverCreationHook());
 assertEquals("Ensure the created hook is of the right type", MockWebDriverCreationHook.class, manager.getWebDriverCreationHook().getClass());
 assertTrue("Ensure the startup hook is not yet called", MockWebDriverCreationHook.createdWebDrivers.isEmpty());
 assertTrue("Ensure the shutdown hook is not yet called", MockWebDriverCreationHook.destroyedWebdrivers.isEmpty());
	
 TestEnvironment createdFFenv = manager.getSeleniumTestEnvironments().get(0);
 WebDriver ffWebDriver = createdFFenv.getWebDriver();
	
 assertFalse("Ensure the startup hook is called", MockWebDriverCreationHook.createdWebDrivers.isEmpty());
 assertEquals("Only one webdriver should be created", 1, MockWebDriverCreationHook.createdWebDrivers.size());
 WebDriver foundWebdriver = MockWebDriverCreationHook.createdWebDrivers.get(0);
 //when remote webdrivers are used, they will be proxies and the equeals methods won't work. Let's equal on the toString
 assertEquals("Ensure the startup hook is called with the correct webdriver", ffWebDriver.toString(), foundWebdriver.toString());
 assertTrue("Ensure the shutdown hook is not yet called", MockWebDriverCreationHook.destroyedWebdrivers.isEmpty());
	
 SenBotContext.cleanupSenBot();
	
 assertFalse("Ensure the shutdown hook is called", MockWebDriverCreationHook.destroyedWebdrivers.isEmpty());
 assertEquals("Only one webdriver should be removed", 1, MockWebDriverCreationHook.destroyedWebdrivers.size());
 WebDriver foundRemovedWebdriver = MockWebDriverCreationHook.destroyedWebdrivers.get(0);
 assertEquals("Ensure the shutdown hook is called with the correct webdriver", ffWebDriver.toString(), foundRemovedWebdriver.toString());
}
 
源代码30 项目: dragonwell8_jdk   文件: X11InputMethod.java
/**
 * Constructs an X11InputMethod instance. It initializes the XIM
 * environment if it's not done yet.
 *
 * @exception AWTException if XOpenIM() failed.
 */
public X11InputMethod() throws AWTException {
    // supports only the locale in which the VM is started
    locale = X11InputMethodDescriptor.getSupportedLocale();
    if (initXIM() == false) {
        throw new AWTException("Cannot open X Input Method");
    }
}
 
 类所在包
 类方法
 同包方法