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 button that displays a "delete" image.
011     *
012     * <p>&copy; Copyright 2007 Sans Pareil Technologies, Inc.</p>
013     * @author Rakesh Vidyadharan 2007-05-05
014     * @version $Id: Delete.java 3334 2007-06-08 16:25:49Z rakesh $
015     */
016    public class Delete extends General
017    {
018      /**
019       * The tooltip text to display for the logo.
020       *
021       * {@value}
022       */
023      private static final String TOOL_TIP = "Delete";
024    
025      /**
026       * The width of the logo image.
027       */
028      private static final Extent WIDTH = Extent.getInstance( 20, Extent.PX );
029    
030      /**
031       * The height of the logo image.
032       */
033      private static final Extent HEIGHT = Extent.getInstance( 20, Extent.PX );
034    
035      /**
036       * The URL at which the logo image resides.
037       *
038       * {@value}
039       */
040      public static final String URL =
041        "http://www.sptci.com/images/icons/remove.png";
042    
043      /**
044       * The logo image that is to be displayed.
045       */
046      public static final ImageReference LOGO =
047        new HttpImageReference( URL, WIDTH, HEIGHT );
048    
049    
050      /**
051       * Initialise the style properties.  Over-ridden to add style properties 
052       * for image.
053       */
054      @Override
055      protected void init()
056      {
057        super.init();
058    
059        setProperty( Button.PROPERTY_BORDER,
060            new Border( 0, Background.getInstance(), Border.STYLE_NONE ) );
061        setProperty( Button.PROPERTY_ICON, LOGO ); 
062        setProperty( Button.PROPERTY_TOOL_TIP_TEXT, TOOL_TIP );
063      }
064    }