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-2023 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://dittlab.tudelft.nl">Wouter Schakel</a>
14 */
15 public enum TextWeight
16 {
17 /** The lightest predefined weight. */
18 WEIGHT_EXTRA_LIGHT(TextAttribute.WEIGHT_EXTRA_LIGHT),
19
20 /** The standard light weight. */
21 WEIGHT_LIGHT(TextAttribute.WEIGHT_LIGHT),
22
23 /** An intermediate weight between WEIGHT_LIGHT and WEIGHT_STANDARD. */
24 WEIGHT_DEMILIGHT(TextAttribute.WEIGHT_DEMILIGHT),
25
26 /** The standard weight. */
27 WEIGHT_REGULAR(TextAttribute.WEIGHT_REGULAR),
28
29 /** A moderately heavier weight than WEIGHT_REGULAR. */
30 WEIGHT_SEMIBOLD(TextAttribute.WEIGHT_SEMIBOLD),
31
32 /** An intermediate weight between WEIGHT_REGULAR and WEIGHT_BOLD. */
33 WEIGHT_MEDIUM(TextAttribute.WEIGHT_MEDIUM),
34
35 /** A moderately lighter weight than WEIGHT_BOLD. */
36 WEIGHT_DEMIBOLD(TextAttribute.WEIGHT_DEMIBOLD),
37
38 /** The standard bold weight. */
39 WEIGHT_BOLD(TextAttribute.WEIGHT_BOLD),
40
41 /** A moderately heavier weight than WEIGHT_BOLD. */
42 WEIGHT_HEAVY(TextAttribute.WEIGHT_HEAVY),
43
44 /** An extra heavy weight. */
45 WEIGHT_EXTRABOLD(TextAttribute.WEIGHT_EXTRABOLD),
46
47 /** The heaviest predefined weight. */
48 WEIGHT_ULTRABOLD(TextAttribute.WEIGHT_ULTRABOLD);
49
50 /** the corresponding TextAttribute constant. */
51 private final Number value;
52
53 /**
54 * @param value Number; the corresponding TextAttribute constant
55 */
56 TextWeight(final Number value)
57 {
58 this.value = value;
59 }
60
61 /**
62 * @return value the corresponding TextAttribute constant
63 */
64 protected final Number getValue()
65 {
66 return this.value;
67 }
68
69 }