Package java.awt.im.spi

Examples of java.awt.im.spi.InputMethodDescriptor


                if (!(item instanceof IMSubmenu)) {
                    // skip all non-menu elements, such as separators
                    continue;
                }
                IMSubmenu subMenu = (IMSubmenu) item;
                InputMethodDescriptor desc = subMenu.getDesc();
                if (desc == null) {
                    continue;
                }
                if (desc.hasDynamicLocaleList()) {                   
                    subMenu.removeAll();
                    subMenu.addLocales();
                }
                subMenu.checkItems();
                i++;
View Full Code Here


     * @throws Exception
     */
    private InputMethod getIMInstance(Iterator<InputMethodDescriptor> descriptors,
                                      Locale locale) throws Exception {
        while (descriptors.hasNext()) {
            InputMethodDescriptor desc = descriptors.next();
            Locale[] locs = desc.getAvailableLocales();
            for (Locale element : locs) {
                if (locale.equals(element)) {
                    return getIMInstance(desc);
                }
            }
View Full Code Here

                addIM(it);
            }
        }

        private void addIM(Iterator<InputMethodDescriptor> it) {
            InputMethodDescriptor desc = it.next();
            IMSubmenu subMenu = new IMSubmenu(desc);
            add(subMenu);
        }
View Full Code Here

                if (!(item instanceof IMSubmenu)) {
                    // skip all non-menu elements, such as separators
                    continue;
                }
                IMSubmenu subMenu = (IMSubmenu) item;
                InputMethodDescriptor desc = subMenu.getDesc();
                if (desc == null) {
                    continue;
                }
                if (desc.hasDynamicLocaleList()) {                   
                    subMenu.removeAll();
                    subMenu.addLocales();
                }
                subMenu.checkItems();
                i++;
View Full Code Here

      }
    InputMethod next = recent.get(locale);
    if (next != null)
      for (int i = 0, limit = descriptors.size(); i < limit; i++)
        {
          InputMethodDescriptor d = descriptors.get(i);
          Locale[] list;
          try
            {
              list = d.getAvailableLocales();
            }
          catch (AWTException ignored)
            {
              continue;
            }
          for (int j = list.length; --j >= 0; )
            if (locale.equals(list[j]))
              {
                try
                  {
                    next = d.createInputMethod();
                    recent.put(locale, next);
                  }
                catch (Exception ignored)
                  {
                    continue;
View Full Code Here

TOP

Related Classes of java.awt.im.spi.InputMethodDescriptor

Copyright © 2018 www.massapicom. 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.