Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

FontScheme.java 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /**
  17. * Defines the font scheme to which this font belongs.
  18. * When a font definition is part of a theme definition, then the font is categorized as either a major or minor font scheme component.
  19. * When a new theme is chosen, every font that is part of a theme definition is updated to use the new major or minor font definition for that
  20. * theme.
  21. * Usually major fonts are used for styles like headings, and minor fonts are used for body & paragraph text.
  22. *
  23. * @author Gisella Bronzetti
  24. */
  25. public enum FontScheme {
  26. NONE(1),
  27. MAJOR(2),
  28. MINOR(3);
  29. private int value;
  30. private FontScheme(int val) {
  31. value = val;
  32. }
  33. public int getValue() {
  34. return value;
  35. }
  36. private static FontScheme[] _table = new FontScheme[4];
  37. static {
  38. for (FontScheme c : values()) {
  39. _table[c.getValue()] = c;
  40. }
  41. }
  42. public static FontScheme valueOf(int value){
  43. return _table[value];
  44. }
  45. }