001 package com.sptci.echo2.style;
002
003 import nextapp.echo2.app.Color;
004
005 /**
006 * A singleton used to ensure a consistent background colour across
007 * the application. Uses {@link #HEX_VALUE} as the default value.
008 *
009 * <p><b>Note:</b> It is recommended that you use the {@link #getInstance}
010 * factory method to fetch instances of this class and not create new instances
011 * using the {@link Background} constructor.</p>
012 *
013 * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
014 * @author Rakesh Vidyadharan 2007-01-05
015 * @version $Id: Background.java 3332 2007-06-08 12:17:03Z rakesh $
016 */
017 public class Background extends Color
018 {
019 /**
020 * The default hex value for the background used across the application.
021 * This is colour that is used on the SPT website.
022 */
023 public static final int HEX_VALUE = 0xcd2519;
024
025 /**
026 * The singleton instance of the background class.
027 */
028 private static final Color singleton = new Background();
029
030 /**
031 * Create a new instance of the background.
032 *
033 * @deprecated Use {@link #getInstance} instead.
034 */
035 @Deprecated public Background()
036 {
037 super( HEX_VALUE );
038 }
039
040 /**
041 * Return the {@link #singleton} instance.
042 *
043 * @return The default background colour to use.
044 */
045 public static final Color getInstance()
046 {
047 return singleton;
048 }
049 }