类java.awt.font.GraphicAttribute源码实例Demo

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

源代码1 项目: dragonwell8_jdk   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码2 项目: TencentKona-8   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码3 项目: jdk8u60   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码4 项目: openjdk-jdk8u   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码6 项目: Bytecoder   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码7 项目: openjdk-jdk9   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码8 项目: jdk8u-jdk   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码9 项目: hottub   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码10 项目: openjdk-8-source   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码11 项目: openjdk-8   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码12 项目: jdk8u_jdk   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码13 项目: jdk8u-jdk   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码14 项目: jdk8u-dev-jdk   文件: GraphicComponent.java
/**
 * Create a new GraphicComponent.  start and limit are indices
 * into charLtoV and levels.  charsLtoV and levels may be adopted.
 */
public GraphicComponent(GraphicAttribute graphic,
                        Decoration decorator,
                        int[] charsLtoV,
                        byte[] levels,
                        int start,
                        int limit,
                        AffineTransform baseTx) {

    if (limit <= start) {
        throw new IllegalArgumentException("0 or negative length in GraphicComponent");
    }
    this.graphic = graphic;
    this.graphicAdvance = graphic.getAdvance();
    this.decorator = decorator;
    this.cm = createCoreMetrics(graphic);
    this.baseTx = baseTx;

    initLocalOrdering(charsLtoV, levels, start, limit);
}
 
源代码15 项目: magarena   文件: OracleText.java
public static AttributedString textIconReplace(final String text) {
    final String compacted = text.replaceAll("\\{[^}]+}", "M");
    final AttributedString attrString = new AttributedString(compacted);
    for (int i = 0, j = 0; i < text.length(); i++, j++) {
        char c = text.charAt(i);
        if (c == '{') {
            final int endSymbol = text.indexOf('}', i);
            // get mana-string, substring returns at -1 value
            String iconString = text.substring(i, endSymbol + 1);
            // get related Icon as Image
            Image iconImage = MagicImages.getIcon(iconString).getImage();
            // define replacement icon
            ImageGraphicAttribute icon = new ImageGraphicAttribute(iconImage, GraphicAttribute.BOTTOM_ALIGNMENT);
            // replace M with icon
            attrString.addAttribute(
                TextAttribute.CHAR_REPLACEMENT,
                icon,
                j,
                j + 1
            );
            // advance i to the end of symbol
            i = endSymbol;
        }
    }
    return attrString;
}
 
源代码16 项目: dragonwell8_jdk   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码17 项目: dragonwell8_jdk   文件: CoreMetrics.java
public final float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码18 项目: TencentKona-8   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码19 项目: TencentKona-8   文件: CoreMetrics.java
public final float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码20 项目: jdk8u60   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码21 项目: jdk8u60   文件: CoreMetrics.java
public final float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码22 项目: openjdk-jdk8u   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码23 项目: openjdk-jdk8u   文件: CoreMetrics.java
public final float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码24 项目: openjdk-jdk8u-backup   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码25 项目: openjdk-jdk8u-backup   文件: CoreMetrics.java
public final float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码26 项目: Bytecoder   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码27 项目: Bytecoder   文件: CoreMetrics.java
public float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码28 项目: openjdk-jdk9   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
源代码29 项目: openjdk-jdk9   文件: CoreMetrics.java
public float effectiveBaselineOffset(float[] fullOffsets) {
    switch (baselineIndex) {
    case GraphicAttribute.TOP_ALIGNMENT:
        return fullOffsets[4] + ascent;
    case GraphicAttribute.BOTTOM_ALIGNMENT:
        return fullOffsets[3] - descent;
    default:
        return fullOffsets[baselineIndex];
    }
}
 
源代码30 项目: jdk8u-jdk   文件: GraphicComponent.java
public static CoreMetrics createCoreMetrics(GraphicAttribute graphic) {
    return new CoreMetrics(graphic.getAscent(),
                           graphic.getDescent(),
                           GRAPHIC_LEADING,
                           graphic.getAscent() + graphic.getDescent() + GRAPHIC_LEADING,
                           graphic.getAlignment(),
                           new float[] { 0, -graphic.getAscent() / 2, -graphic.getAscent() },
                           -graphic.getAscent() / 2,
                           graphic.getAscent() / 12,
                           graphic.getDescent() / 3,
                           graphic.getAscent() / 12,
                           0, // ss offset
                           0); // italic angle -- need api for this
}
 
 类所在包
 同包方法