jdk/src/share/classes/java/awt/font/NumericShaper.java
changeset 25385 2c53e38b77aa
parent 23010 6dadb192ad81
equal deleted inserted replaced
25225:f161e8748e8d 25385:2c53e38b77aa
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    29 import java.io.ObjectOutputStream;
    29 import java.io.ObjectOutputStream;
    30 import java.util.Arrays;
    30 import java.util.Arrays;
    31 import java.util.Comparator;
    31 import java.util.Comparator;
    32 import java.util.EnumSet;
    32 import java.util.EnumSet;
    33 import java.util.Set;
    33 import java.util.Set;
       
    34 import sun.misc.SharedSecrets;
    34 
    35 
    35 /**
    36 /**
    36  * The <code>NumericShaper</code> class is used to convert Latin-1 (European)
    37  * The <code>NumericShaper</code> class is used to convert Latin-1 (European)
    37  * digits to other Unicode decimal digits.  Users of this class will
    38  * digits to other Unicode decimal digits.  Users of this class will
    38  * primarily be people who wish to present data using
    39  * primarily be people who wish to present data using
   132  *
   133  *
   133  * @since 1.4
   134  * @since 1.4
   134  */
   135  */
   135 
   136 
   136 public final class NumericShaper implements java.io.Serializable {
   137 public final class NumericShaper implements java.io.Serializable {
       
   138 
       
   139     // For access from java.text.Bidi
       
   140     static {
       
   141         if (SharedSecrets.getJavaAWTFontAccess() == null) {
       
   142             SharedSecrets.setJavaAWTFontAccess(new JavaAWTFontAccessImpl());
       
   143         }
       
   144     }
       
   145 
   137     /**
   146     /**
   138      * A {@code NumericShaper.Range} represents a Unicode range of a
   147      * A {@code NumericShaper.Range} represents a Unicode range of a
   139      * script having its own decimal digits. For example, the {@link
   148      * script having its own decimal digits. For example, the {@link
   140      * NumericShaper.Range#THAI} range has the Thai digits, THAI DIGIT
   149      * NumericShaper.Range#THAI} range has the Thai digits, THAI DIGIT
   141      * ZERO (U+0E50) to THAI DIGIT NINE (U+0E59).
   150      * ZERO (U+0E50) to THAI DIGIT NINE (U+0E59).