jdk/src/share/classes/sun/font/StandardTextSource.java
author vadim
Wed, 23 Oct 2013 08:56:56 +0400
changeset 21235 38393a2aaf88
parent 5506 202f599c92aa
child 23010 6dadb192ad81
permissions -rw-r--r--
8001173: [findbugs] Evaluate FindBug output for sun.font.CompositeFont, sun.font.CompositeFontDescriptor Reviewed-by: prr, bae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
package sun.font;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import java.awt.Font;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import java.awt.font.FontRenderContext;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import java.awt.font.LineMetrics;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
public class StandardTextSource extends TextSource {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
  char[] chars;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  int start;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
  int len;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
  int cstart;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
  int clen;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
  int level; // assumed all uniform
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  int flags; // see GlyphVector.java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  Font font;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  FontRenderContext frc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
  CoreMetrics cm;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
  /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
   * Create a simple implementation of a TextSource.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
   * Chars is an array containing clen chars in the context, in
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
   * logical order, contiguously starting at cstart.  Start and len
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
   * represent that portion of the context representing the true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
   * source; start, like cstart, is relative to the start of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
   * character array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
   *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
   * Level is the bidi level (0-63 for the entire context. Flags is
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
   * the layout flags. Font is the font, frc is the render context,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
   * and lm is the line metrics for the entire source text, but not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
   * necessarily the context.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
   */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
  public StandardTextSource(char[] chars,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
                            int start,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
                            int len,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
                            int cstart,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
                            int clen,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
                            int level,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
                            int flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
                            Font font,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
                            FontRenderContext frc,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
                            CoreMetrics cm) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    if (chars == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
      throw new IllegalArgumentException("bad chars: null");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
    if (cstart < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
      throw new IllegalArgumentException("bad cstart: " + cstart);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
    if (start < cstart) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
      throw new IllegalArgumentException("bad start: " + start + " for cstart: " + cstart);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
    if (clen < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
      throw new IllegalArgumentException("bad clen: " + clen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    if (cstart + clen > chars.length) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
      throw new IllegalArgumentException("bad clen: " + clen + " cstart: " + cstart + " for array len: " + chars.length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    if (len < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
      throw new IllegalArgumentException("bad len: " + len);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    if ((start + len) > (cstart + clen)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
      throw new IllegalArgumentException("bad len: " + len + " start: " + start + " for cstart: " + cstart + " clen: " + clen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    if (font == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
      throw new IllegalArgumentException("bad font: null");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    if (frc == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
      throw new IllegalArgumentException("bad frc: null");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
21235
38393a2aaf88 8001173: [findbugs] Evaluate FindBug output for sun.font.CompositeFont, sun.font.CompositeFontDescriptor
vadim
parents: 5506
diff changeset
   100
    this.chars = chars.clone();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    this.start = start;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    this.len = len;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    this.cstart = cstart;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    this.clen = clen;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
    this.level = level;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    this.flags = flags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    this.font = font;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    this.frc = frc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    if (cm != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        this.cm = cm;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
        LineMetrics metrics = font.getLineMetrics(chars, cstart, clen, frc);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        this.cm = ((FontLineMetrics)metrics).cm;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
  /** Create a StandardTextSource whose context is coextensive with the source. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
  public StandardTextSource(char[] chars,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
                            int start,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
                            int len,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
                            int level,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
                            int flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
                            Font font,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
                            FontRenderContext frc,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
                            CoreMetrics cm) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    this(chars, start, len, start, len, level, flags, font, frc, cm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
  /** Create a StandardTextSource whose context and source are coextensive with the entire char array. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
  public StandardTextSource(char[] chars,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
                            int level,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
                            int flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
                            Font font,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
                            FontRenderContext frc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    this(chars, 0, chars.length, 0, chars.length, level, flags, font, frc, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
  /** Create a StandardTextSource whose context and source are all the text in the String. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
  public StandardTextSource(String str,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
                            int level,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
                            int flags,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
                            Font font,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
                            FontRenderContext frc) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    this(str.toCharArray(), 0, str.length(), 0, str.length(), level, flags, font, frc, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
  // TextSource API
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
  public char[] getChars() {
21235
38393a2aaf88 8001173: [findbugs] Evaluate FindBug output for sun.font.CompositeFont, sun.font.CompositeFontDescriptor
vadim
parents: 5506
diff changeset
   151
    return chars.clone();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
  public int getStart() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    return start;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
  public int getLength() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    return len;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
  public int getContextStart() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    return cstart;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
  public int getContextLength() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    return clen;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
  public int getLayoutFlags() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    return flags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  public int getBidiLevel() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    return level;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  public Font getFont() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    return font;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
  public FontRenderContext getFRC() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    return frc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
  public CoreMetrics getCoreMetrics() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    return cm;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
  public TextSource getSubSource(int start, int length, int dir) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    if (start < 0 || length < 0 || (start + length) > len) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
      throw new IllegalArgumentException("bad start (" + start + ") or length (" + length + ")");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    int level = this.level;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    if (dir != TextLineComponent.UNCHANGED) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        boolean ltr = (flags & 0x8) == 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        if (!(dir == TextLineComponent.LEFT_TO_RIGHT && ltr) &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                !(dir == TextLineComponent.RIGHT_TO_LEFT && !ltr)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
            throw new IllegalArgumentException("direction flag is invalid");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        level = ltr? 0 : 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    return new StandardTextSource(chars, this.start + start, length, cstart, clen, level, flags, font, frc, cm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
  public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    return toString(WITH_CONTEXT);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  public String toString(boolean withContext) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    StringBuffer buf = new StringBuffer(super.toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    buf.append("[start:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    buf.append(start);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    buf.append(", len:" );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    buf.append(len);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    buf.append(", cstart:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    buf.append(cstart);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    buf.append(", clen:" );
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    buf.append(clen);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    buf.append(", chars:\"");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    int chStart, chLimit;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    if (withContext == WITH_CONTEXT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
        chStart = cstart;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        chLimit = cstart + clen;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        chStart = start;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        chLimit = start + len;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    for (int i = chStart; i < chLimit; ++i) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
      if (i > chStart) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        buf.append(" ");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
      }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
      buf.append(Integer.toHexString(chars[i]));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
    buf.append("\"");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
    buf.append(", level:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    buf.append(level);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
    buf.append(", flags:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    buf.append(flags);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
    buf.append(", font:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    buf.append(font);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    buf.append(", frc:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    buf.append(frc);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    buf.append(", cm:");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
    buf.append(cm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
    buf.append("]");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
    return buf.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
}