org.opentrafficsim.draw.TextWidth Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ots-draw Show documentation
Show all versions of ots-draw Show documentation
OTS drawing classes that can paint themselves using data objects
The newest version!
package org.opentrafficsim.draw;
import java.awt.font.TextAttribute;
/**
* Width of the text font in the explanation.
*
* Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See OpenTrafficSim License.
*
* @author Alexander Verbraeck
* @author Peter Knoppers
* @author Wouter Schakel
*/
public enum TextWidth
{
/** condensed font. */
WIDTH_CONDENSED(TextAttribute.WIDTH_CONDENSED),
/** moderately condensed font. */
WIDTH_SEMI_CONDENSED(TextAttribute.WIDTH_SEMI_CONDENSED),
/** regular font. */
WIDTH_REGULAR(TextAttribute.WIDTH_REGULAR),
/** moderately extended font. */
WIDTH_SEMI_EXTENDED(TextAttribute.WIDTH_SEMI_EXTENDED),
/** extended font. */
WIDTH_EXTENDED(TextAttribute.WIDTH_EXTENDED);
/** the corresponding TextAttribute constant. */
private final Number value;
/**
* @param value Number; the corresponding TextAttribute constant
*/
TextWidth(final Number value)
{
this.value = value;
}
/**
* @return value the corresponding TextAttribute constant
*/
protected final Number getValue()
{
return this.value;
}
}