You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FontCharset.java 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.ss.usermodel;
  16. import org.apache.poi.util.Removal;
  17. /**
  18. * Charset represents the basic set of characters associated with a font (that it can display), and
  19. * corresponds to the ANSI codepage (8-bit or DBCS) of that character set used by a given language.
  20. *
  21. * @deprecated enum will be replaced by common version org.apache.poi.common.usermodel.FontCharset
  22. */
  23. @Removal(version="4.0")
  24. @Deprecated
  25. public enum FontCharset {
  26. ANSI(0),
  27. DEFAULT(1),
  28. SYMBOL(2),
  29. MAC(77),
  30. SHIFTJIS(128),
  31. HANGEUL(129),
  32. JOHAB(130),
  33. GB2312(134),
  34. CHINESEBIG5(136),
  35. GREEK(161),
  36. TURKISH(162),
  37. VIETNAMESE(163),
  38. HEBREW(177),
  39. ARABIC(178),
  40. BALTIC(186),
  41. RUSSIAN(204),
  42. THAI(222),
  43. EASTEUROPE(238),
  44. OEM(255);
  45. private int charset;
  46. private FontCharset(int value){
  47. charset = value;
  48. }
  49. /**
  50. * Returns value of this charset
  51. *
  52. * @return value of this charset
  53. */
  54. public int getValue(){
  55. return charset;
  56. }
  57. private static FontCharset[] _table = new FontCharset[256];
  58. static {
  59. for (FontCharset c : values()) {
  60. _table[c.getValue()] = c;
  61. }
  62. }
  63. public static FontCharset valueOf(int value){
  64. if(value >= _table.length)
  65. return null;
  66. return _table[value];
  67. }
  68. }