1 package org.opentrafficsim.draw.core; 2 3 import java.awt.font.TextAttribute; 4 5 /** 6 * Weight of the text font in the explanation. 7 * <p> 8 * Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 9 * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>. 10 * </p> 11 * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, 12 * initial version Dec 11, 2016 <br> 13 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a> 14 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 15 * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a> 16 */ 17 public enum TextWeight 18 { 19 /** The lightest predefined weight. */ 20 WEIGHT_EXTRA_LIGHT(TextAttribute.WEIGHT_EXTRA_LIGHT), 21 22 /** The standard light weight. */ 23 WEIGHT_LIGHT(TextAttribute.WEIGHT_LIGHT), 24 25 /** An intermediate weight between WEIGHT_LIGHT and WEIGHT_STANDARD. */ 26 WEIGHT_DEMILIGHT(TextAttribute.WEIGHT_DEMILIGHT), 27 28 /** The standard weight. */ 29 WEIGHT_REGULAR(TextAttribute.WEIGHT_REGULAR), 30 31 /** A moderately heavier weight than WEIGHT_REGULAR. */ 32 WEIGHT_SEMIBOLD(TextAttribute.WEIGHT_SEMIBOLD), 33 34 /** An intermediate weight between WEIGHT_REGULAR and WEIGHT_BOLD. */ 35 WEIGHT_MEDIUM(TextAttribute.WEIGHT_MEDIUM), 36 37 /** A moderately lighter weight than WEIGHT_BOLD. */ 38 WEIGHT_DEMIBOLD(TextAttribute.WEIGHT_DEMIBOLD), 39 40 /** The standard bold weight. */ 41 WEIGHT_BOLD(TextAttribute.WEIGHT_BOLD), 42 43 /** A moderately heavier weight than WEIGHT_BOLD. */ 44 WEIGHT_HEAVY(TextAttribute.WEIGHT_HEAVY), 45 46 /** An extra heavy weight. */ 47 WEIGHT_EXTRABOLD(TextAttribute.WEIGHT_EXTRABOLD), 48 49 /** The heaviest predefined weight. */ 50 WEIGHT_ULTRABOLD(TextAttribute.WEIGHT_ULTRABOLD); 51 52 /** the corresponding TextAttribute constant. */ 53 private final Number value; 54 55 /** 56 * @param value Number; the corresponding TextAttribute constant 57 */ 58 TextWeight(final Number value) 59 { 60 this.value = value; 61 } 62 63 /** 64 * @return value the corresponding TextAttribute constant 65 */ 66 protected final Number getValue() 67 { 68 return this.value; 69 } 70 71 }