View Javadoc
1   package org.opentrafficsim.draw.core;
2   
3   import java.awt.font.TextAttribute;
4   
5   /**
6    * Width 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 TextWidth
18  {
19      /** condensed font. */
20      WIDTH_CONDENSED(TextAttribute.WIDTH_CONDENSED),
21  
22      /** moderately condensed font. */
23      WIDTH_SEMI_CONDENSED(TextAttribute.WIDTH_SEMI_CONDENSED),
24  
25      /** regular font. */
26      WIDTH_REGULAR(TextAttribute.WIDTH_REGULAR),
27  
28      /** moderately extended font. */
29      WIDTH_SEMI_EXTENDED(TextAttribute.WIDTH_SEMI_EXTENDED),
30  
31      /** extended font. */
32      WIDTH_EXTENDED(TextAttribute.WIDTH_EXTENDED);
33  
34      /** the corresponding TextAttribute constant. */
35      private final Number value;
36  
37      /**
38       * @param value Number; the corresponding TextAttribute constant
39       */
40      TextWidth(final Number value)
41      {
42          this.value = value;
43      }
44  
45      /**
46       * @return value the corresponding TextAttribute constant
47       */
48      protected final Number getValue()
49      {
50          return this.value;
51      }
52  
53  }