/* * [TimestampToken.java] * * Summary: Describes token containing one timestamp, used in displaying manifests. * * Copyright: (c) 2005-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2010-02-10 initial version */ package com.mindprod.jtokens.mf; import com.mindprod.jtokens.Token; import java.awt.Color; import java.awt.Font; import static com.mindprod.jtokens.TokenColourScheme.MFT_FOREGROUND_FOR_TIMESTAMP; import static com.mindprod.jtokens.TokenFonts.MONO_FONTS; import static com.mindprod.jtokens.TokenFonts.NORMAL_FONT_SIZE_IN_POINTS; /** * Describes token containing one timestamp, used in displaying manifests. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2010-02-10 initial version * @since 2010-02-10 */ public final class TimestampToken extends Token { /** * version number for the class */ static final long serialVersionUID = 1L; /** * Font to render this token */ @SuppressWarnings( { "ConstantNamingConvention" } ) private static final Font propValueFont = bestFont( MONO_FONTS, Font.PLAIN, NORMAL_FONT_SIZE_IN_POINTS ); /** * Constructor * * @param text that is a bat file command -- normal command line text */ public TimestampToken( String text ) { super( text ); } /** * font to render this token. * * @return Font, in the correct size. */ public Font getFont() { return propValueFont; } /** * foreground color to render this token. * * @return Color object. */ public Color getForeground() { return MFT_FOREGROUND_FOR_TIMESTAMP; } /** * get the text surrounded by CSS html * * @return decorated HTML in a " + getRawHTML() + ""; } }