001    // ===========================================================================
002    // Copyright (c) 1996 Mort Bay Consulting Pty. Ltd. All rights reserved.
003    // $Id: Link.java,v 1.1 2004/03/23 13:59:49 laurent Exp $
004    // ---------------------------------------------------------------------------
005    
006    package org.objectweb.jac.aspects.gui.web.html;
007    
008    
009    /* -------------------------------------------------------------------- */
010    /** HTML Link Block.
011     * This is a HTML reference (not a CSS Link).
012     * @see StyleLink
013     */
014    public class Link extends Block
015    {
016    
017        /* ----------------------------------------------------------------- */
018        /** Construct Link.
019         * @param href The target URL of the link
020         */
021        public Link(String href)
022        {
023            super("a");
024            attribute("href",href);
025        }
026    
027        /* ----------------------------------------------------------------- */
028        /** Construct Link.
029         * @param href The target URL of the link
030         * @param link Link Element
031         */
032        public Link(String href,Object link)
033        {
034            this(href);
035            add(link);
036        }
037        
038        /* ----------------------------------------------------------------- */
039        /** Set the link target frame.
040         */
041        public Link target(String t)
042        {
043            if (t!=null && t.length()>0)
044                attribute("target",t);
045            return this;
046        }    
047    }
048    
049    
050    
051