Java Code Examples for java.awt.font.TransformAttribute#IDENTITY

The following examples show how to use java.awt.font.TransformAttribute#IDENTITY . 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 File: AttributeValues.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 2
Source File: AttributeValues.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 3
Source File: AttributeValues.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 4
Source File: AttributeValues.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 5
Source File: AttributeValues.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 6
Source File: AttributeValues.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 7
Source File: AttributeValues.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 8
Source File: AttributeValues.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 9
Source File: AttributeValues.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 10
Source File: AttributeValues.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 11
Source File: AttributeValues.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 12
Source File: AttributeValues.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 13
Source File: AttributeValues.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}
 
Example 14
Source File: AttributeValues.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private Object i_get(EAttribute a) {
    switch (a) {
    case EFAMILY: return family;
    case EWEIGHT: return Float.valueOf(weight);
    case EWIDTH: return Float.valueOf(width);
    case EPOSTURE: return Float.valueOf(posture);
    case ESIZE: return Float.valueOf(size);
    case ETRANSFORM:
        return transform == null
            ? TransformAttribute.IDENTITY
            : new TransformAttribute(transform);
    case ESUPERSCRIPT: return Integer.valueOf(superscript);
    case EFONT: return font;
    case ECHAR_REPLACEMENT: return charReplacement;
    case EFOREGROUND: return foreground;
    case EBACKGROUND: return background;
    case EUNDERLINE: return Integer.valueOf(underline);
    case ESTRIKETHROUGH: return Boolean.valueOf(strikethrough);
    case ERUN_DIRECTION: {
        switch (runDirection) {
            // todo: figure out a way to indicate this value
            // case -1: return Integer.valueOf(runDirection);
        case 0: return TextAttribute.RUN_DIRECTION_LTR;
        case 1: return TextAttribute.RUN_DIRECTION_RTL;
        default: return null;
        }
    } // not reachable
    case EBIDI_EMBEDDING: return Integer.valueOf(bidiEmbedding);
    case EJUSTIFICATION: return Float.valueOf(justification);
    case EINPUT_METHOD_HIGHLIGHT: return imHighlight;
    case EINPUT_METHOD_UNDERLINE: return Integer.valueOf(imUnderline);
    case ESWAP_COLORS: return Boolean.valueOf(swapColors);
    case ENUMERIC_SHAPING: return numericShaping;
    case EKERNING: return Integer.valueOf(kerning);
    case ELIGATURES: return Integer.valueOf(ligatures);
    case ETRACKING: return Float.valueOf(tracking);
    default: throw new InternalError();
    }
}