KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > web > html > Link


1 // ===========================================================================
2
// Copyright (c) 1996 Mort Bay Consulting Pty. Ltd. All rights reserved.
3
// $Id: Link.java,v 1.2 2004/04/30 01:16:55 laurent Exp $
4
// ---------------------------------------------------------------------------
5

6 package org.objectweb.jac.aspects.gui.web.html;
7
8
9 /* -------------------------------------------------------------------- */
10 /** HTML Link Block.
11  * This is a HTML reference (not a CSS Link).
12  * @see org.mortbay.html.StyleLink
13  */

14 public class Link extends Block
15 {
16
17     /* ----------------------------------------------------------------- */
18     /** Construct Link.
19      * @param href The target URL of the link
20      */

21     public Link(String JavaDoc href)
22     {
23         super("a");
24         attribute("href",href);
25     }
26
27     /* ----------------------------------------------------------------- */
28     /** Construct Link.
29      * @param href The target URL of the link
30      * @param link Link Element
31      */

32     public Link(String JavaDoc href,Object JavaDoc link)
33     {
34         this(href);
35         add(link);
36     }
37     
38     /* ----------------------------------------------------------------- */
39     /** Set the link target frame.
40      */

41     public Link target(String JavaDoc t)
42     {
43         if (t!=null && t.length()>0)
44             attribute("target",t);
45         return this;
46     }
47 }
48
49
50
51
52
Popular Tags