View Javadoc
1   package org.opentrafficsim.draw;
2   
3   import java.awt.font.TextAttribute;
4   
5   /**
6    * Width of the text font in the explanation.
7    * <p>
8    * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
9    * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
10   * </p>
11   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
12   * @author <a href="https://tudelft.nl/staff/p.knoppers-1">Peter Knoppers</a>
13   * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
14   */
15  public enum TextWidth
16  {
17      /** condensed font. */
18      WIDTH_CONDENSED(TextAttribute.WIDTH_CONDENSED),
19  
20      /** moderately condensed font. */
21      WIDTH_SEMI_CONDENSED(TextAttribute.WIDTH_SEMI_CONDENSED),
22  
23      /** regular font. */
24      WIDTH_REGULAR(TextAttribute.WIDTH_REGULAR),
25  
26      /** moderately extended font. */
27      WIDTH_SEMI_EXTENDED(TextAttribute.WIDTH_SEMI_EXTENDED),
28  
29      /** extended font. */
30      WIDTH_EXTENDED(TextAttribute.WIDTH_EXTENDED);
31  
32      /** the corresponding TextAttribute constant. */
33      private final Number value;
34  
35      /**
36       * @param value Number; the corresponding TextAttribute constant
37       */
38      TextWidth(final Number value)
39      {
40          this.value = value;
41      }
42  
43      /**
44       * @return value the corresponding TextAttribute constant
45       */
46      protected final Number getValue()
47      {
48          return this.value;
49      }
50  
51  }