001    package com.sptci.echo2.style;
002    
003    import nextapp.echo2.app.Border;
004    import nextapp.echo2.app.Button;
005    import nextapp.echo2.app.Color;
006    import nextapp.echo2.app.HttpImageReference;
007    import nextapp.echo2.app.ImageReference;
008    
009    /**
010     * The style class for the SPT logo.
011     *
012     * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
013     * @author Rakesh Vidyadharan 2006-12-27
014     * @version $Id: Logo.java 3334 2007-06-08 16:25:49Z rakesh $
015     */
016    public class Logo extends General
017    {
018      /**
019       * The tooltip text to display for the logo.
020       *
021       * {@value}
022       */
023      private static final String TOOL_TIP =
024        "Developed by Sans Pareil Technologies, Inc.";
025    
026      /**
027       * The width of the logo image.
028       */
029      private static final Extent WIDTH = Extent.getInstance( 200, Extent.PX );
030    
031      /**
032       * The height of the logo image.
033       */
034      private static final Extent HEIGHT = Extent.getInstance( 68, Extent.PX );
035    
036      /**
037       * The URL at which the logo image resides.
038       *
039       * {@value}
040       */
041      public static final String URL =
042        "http://www.sptci.com/images/spt-logo-white-on-red.gif";
043    
044      /**
045       * The logo image that is to be displayed.
046       */
047      public static final ImageReference LOGO =
048        new HttpImageReference( URL, WIDTH, HEIGHT );
049    
050    
051      /**
052       * Initialise the style properties.  Over-ridden to add style properties 
053       * for image.
054       */
055      @Override
056      protected void init()
057      {
058        super.init();
059    
060        setProperty( Button.PROPERTY_BACKGROUND, Background.getInstance() );
061        setProperty( Button.PROPERTY_BORDER,
062            new Border( 0, Background.getInstance(), Border.STYLE_NONE ) );
063        setProperty( Button.PROPERTY_ICON, LOGO ); 
064        setProperty( Button.PROPERTY_TOOL_TIP_TEXT, TOOL_TIP );
065      }
066    }