当前位置: 首页>>代码示例>>Java>>正文


Java Subset类代码示例

本文整理汇总了Java中java.lang.Character.Subset的典型用法代码示例。如果您正苦于以下问题:Java Subset类的具体用法?Java Subset怎么用?Java Subset使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Subset类属于java.lang.Character包,在下文中一共展示了Subset类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
 * @see java.awt.im.InputContext#setCharacterSubsets
 */
public void setCharacterSubsets(Subset[] subsets) {
    if (subsets == null) {
        characterSubsets = null;
    } else {
        characterSubsets = new Subset[subsets.length];
        System.arraycopy(subsets, 0,
                         characterSubsets, 0, characterSubsets.length);
    }
    if (inputMethod != null) {
        inputMethod.setCharacterSubsets(subsets);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:InputContext.java

示例2: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
@Override
public void setCharacterSubsets(Subset[] subsets) {
    if (inputMethod != null) {
        inputMethod.setCharacterSubsets(subsets);
    }
    super.setCharacterSubsets(subsets);
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:8,代码来源:InputMethodContext.java

示例3: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
 * Implements InputMethod.setCharacterSubsets for Windows.
 *
 * @see java.awt.im.spi.InputMethod#setCharacterSubsets
 */
@Override
public void setCharacterSubsets(Subset[] subsets) {
    if (subsets == null){
        setConversionStatus(context, cmode);
        setOpenStatus(context, open);
        return;
    }

    // Use first subset only. Other subsets in array is ignored.
    // This is restriction of Win32 implementation.
    Subset subset1 = subsets[0];

    Locale locale = getNativeLocale();
    int newmode;

    if (locale == null) {
        return;
    }

    if (locale.getLanguage().equals(Locale.JAPANESE.getLanguage())) {
        if (subset1 == UnicodeBlock.BASIC_LATIN || subset1 == InputSubset.LATIN_DIGITS) {
            setOpenStatus(context, false);
        } else {
            if (subset1 == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
                || subset1 == InputSubset.KANJI
                || subset1 == UnicodeBlock.HIRAGANA)
                newmode = IME_CMODE_NATIVE | IME_CMODE_FULLSHAPE;
            else if (subset1 == UnicodeBlock.KATAKANA)
                newmode = IME_CMODE_NATIVE | IME_CMODE_KATAKANA| IME_CMODE_FULLSHAPE;
            else if (subset1 == InputSubset.HALFWIDTH_KATAKANA)
                newmode = IME_CMODE_NATIVE | IME_CMODE_KATAKANA;
            else if (subset1 == InputSubset.FULLWIDTH_LATIN)
                newmode = IME_CMODE_FULLSHAPE;
            else
                return;
            setOpenStatus(context, true);
            newmode |= (getConversionStatus(context)&IME_CMODE_ROMAN);   // reserve ROMAN input mode
            setConversionStatus(context, newmode);
        }
    } else if (locale.getLanguage().equals(Locale.KOREAN.getLanguage())) {
        if (subset1 == UnicodeBlock.BASIC_LATIN || subset1 == InputSubset.LATIN_DIGITS) {
            setOpenStatus(context, false);
        } else {
            if (subset1 == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
                || subset1 == InputSubset.HANJA
                || subset1 == UnicodeBlock.HANGUL_SYLLABLES
                || subset1 == UnicodeBlock.HANGUL_JAMO
                || subset1 == UnicodeBlock.HANGUL_COMPATIBILITY_JAMO)
                newmode = IME_CMODE_NATIVE;
            else if (subset1 == InputSubset.FULLWIDTH_LATIN)
                newmode = IME_CMODE_FULLSHAPE;
            else
                return;
            setOpenStatus(context, true);
            setConversionStatus(context, newmode);
        }
    } else if (locale.getLanguage().equals(Locale.CHINESE.getLanguage())) {
        if (subset1 == UnicodeBlock.BASIC_LATIN || subset1 == InputSubset.LATIN_DIGITS) {
            setOpenStatus(context, false);
        } else {
            if (subset1 == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
                || subset1 == InputSubset.TRADITIONAL_HANZI
                || subset1 == InputSubset.SIMPLIFIED_HANZI)
                newmode = IME_CMODE_NATIVE;
            else if (subset1 == InputSubset.FULLWIDTH_LATIN)
                newmode = IME_CMODE_FULLSHAPE;
            else
                return;
            setOpenStatus(context, true);
            setConversionStatus(context, newmode);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:79,代码来源:WInputMethod.java

示例4: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
 * Implements InputMethod.setCharacterSubsets for Windows.
 *
 * @see java.awt.im.spi.InputMethod#setCharacterSubsets
 */
public void setCharacterSubsets(Subset[] subsets) {
    if (subsets == null){
        setConversionStatus(context, cmode);
        setOpenStatus(context, open);
        return;
    }

    // Use first subset only. Other subsets in array is ignored.
    // This is restriction of Win32 implementation.
    Subset subset1 = subsets[0];

    Locale locale = getNativeLocale();
    int newmode;

    if (locale == null) {
        return;
    }

    if (locale.getLanguage().equals(Locale.JAPANESE.getLanguage())) {
        if (subset1 == UnicodeBlock.BASIC_LATIN || subset1 == InputSubset.LATIN_DIGITS) {
            setOpenStatus(context, false);
        } else {
            if (subset1 == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
                || subset1 == InputSubset.KANJI
                || subset1 == UnicodeBlock.HIRAGANA)
                newmode = IME_CMODE_NATIVE | IME_CMODE_FULLSHAPE;
            else if (subset1 == UnicodeBlock.KATAKANA)
                newmode = IME_CMODE_NATIVE | IME_CMODE_KATAKANA| IME_CMODE_FULLSHAPE;
            else if (subset1 == InputSubset.HALFWIDTH_KATAKANA)
                newmode = IME_CMODE_NATIVE | IME_CMODE_KATAKANA;
            else if (subset1 == InputSubset.FULLWIDTH_LATIN)
                newmode = IME_CMODE_FULLSHAPE;
            else
                return;
            setOpenStatus(context, true);
            newmode |= (getConversionStatus(context)&IME_CMODE_ROMAN);   // reserve ROMAN input mode
            setConversionStatus(context, newmode);
        }
    } else if (locale.getLanguage().equals(Locale.KOREAN.getLanguage())) {
        if (subset1 == UnicodeBlock.BASIC_LATIN || subset1 == InputSubset.LATIN_DIGITS) {
            setOpenStatus(context, false);
        } else {
            if (subset1 == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
                || subset1 == InputSubset.HANJA
                || subset1 == UnicodeBlock.HANGUL_SYLLABLES
                || subset1 == UnicodeBlock.HANGUL_JAMO
                || subset1 == UnicodeBlock.HANGUL_COMPATIBILITY_JAMO)
                newmode = IME_CMODE_NATIVE;
            else if (subset1 == InputSubset.FULLWIDTH_LATIN)
                newmode = IME_CMODE_FULLSHAPE;
            else
                return;
            setOpenStatus(context, true);
            setConversionStatus(context, newmode);
        }
    } else if (locale.getLanguage().equals(Locale.CHINESE.getLanguage())) {
        if (subset1 == UnicodeBlock.BASIC_LATIN || subset1 == InputSubset.LATIN_DIGITS) {
            setOpenStatus(context, false);
        } else {
            if (subset1 == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
                || subset1 == InputSubset.TRADITIONAL_HANZI
                || subset1 == InputSubset.SIMPLIFIED_HANZI)
                newmode = IME_CMODE_NATIVE;
            else if (subset1 == InputSubset.FULLWIDTH_LATIN)
                newmode = IME_CMODE_FULLSHAPE;
            else
                return;
            setOpenStatus(context, true);
            setConversionStatus(context, newmode);
        }
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:78,代码来源:WInputMethod.java

示例5: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
 * Sets the subsets of the Unicode character set that this input method
 * is allowed to input. Null may be passed in to indicate that all
 * characters are allowed.
 * <p>
 * This method is called
 * <ul>
 * <li>immediately after instantiating this input method,
 * <li>when switching to this input method from a different one, and
 * <li>by {@link java.awt.im.InputContext#setCharacterSubsets InputContext.setCharacterSubsets}.
 * </ul>
 *
 * @param subsets the subsets of the Unicode character set from which
 * characters may be input
 */
public void setCharacterSubsets(Subset[] subsets);
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:InputMethod.java

示例6: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
 * Sets the subsets of the Unicode character set that input methods of this input
 * context should be allowed to input. Null may be passed in to
 * indicate that all characters are allowed. The initial value
 * is null. The setting applies to the current input method as well
 * as input methods selected after this call is made. However,
 * applications cannot rely on this call having the desired effect,
 * since this setting cannot be passed on to all host input methods -
 * applications still need to apply their own character validation.
 * If no input methods are available, then this method has no effect.
 *
 * @param subsets The subsets of the Unicode character set from which characters may be input
 */
public void setCharacterSubsets(Subset[] subsets) {
    // real implementation is in sun.awt.im.InputContext
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:InputContext.java

示例7: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
    * Sets the subsets of the Unicode character set that this input method
 * is allowed to input. Null may be passed in to indicate that all
 * characters are allowed.
 * <p>
 * This method is called
 * <ul>
 * <li>immediately after instantiating this input method,
 * <li>when switching to this input method from a different one, and
 * <li>by {@link java.awt.im.InputContext#setCharacterSubsets InputContext.setCharacterSubsets}.
 * </ul>
 *
 * @param subsets the subsets of the Unicode character set from which
 * characters may be input
 */
public void setCharacterSubsets(Subset[] subsets) {
    // -- SAK: Does mac OS X support this?
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:CInputMethod.java

示例8: setCharacterSubsets

import java.lang.Character.Subset; //导入依赖的package包/类
/**
 * Does nothing - XIM doesn't let you specify which characters you expect.
 *
 * @see java.awt.im.spi.InputMethod#setCharacterSubsets
 */
public void setCharacterSubsets(Subset[] subsets) {
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:X11InputMethod.java


注:本文中的java.lang.Character.Subset类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。