KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > swing > text > html > HTMLFrameHyperlinkEvent


1 /*
2  * @(#)HTMLFrameHyperlinkEvent.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7 package javax.swing.text.html;
8
9 import javax.swing.text.*;
10 import javax.swing.event.HyperlinkEvent JavaDoc;
11 import java.net.URL JavaDoc;
12
13 /**
14  * HTMLFrameHyperlinkEvent is used to notify interested
15  * parties that link was activated in a frame.
16  *
17  * @author Sunita Mani
18  * @version 1.9, 12/19/03
19  */

20
21 public class HTMLFrameHyperlinkEvent extends HyperlinkEvent JavaDoc {
22
23     /**
24      * Creates a new object representing a html frame
25      * hypertext link event.
26      *
27      * @param source the object responsible for the event
28      * @param type the event type
29      * @param targetURL the affected URL
30      * @param targetFrame the Frame to display the document in
31      */

32     public HTMLFrameHyperlinkEvent(Object JavaDoc source, EventType type, URL JavaDoc targetURL,
33                    String JavaDoc targetFrame) {
34         super(source, type, targetURL);
35     this.targetFrame = targetFrame;
36     }
37
38
39     /**
40      * Creates a new object representing a hypertext link event.
41      *
42      * @param source the object responsible for the event
43      * @param type the event type
44      * @param targetURL the affected URL
45      * @param desc a description
46      * @param targetFrame the Frame to display the document in
47      */

48     public HTMLFrameHyperlinkEvent(Object JavaDoc source, EventType type, URL JavaDoc targetURL, String JavaDoc desc,
49                    String JavaDoc targetFrame) {
50         super(source, type, targetURL, desc);
51     this.targetFrame = targetFrame;
52     }
53
54     /**
55      * Creates a new object representing a hypertext link event.
56      *
57      * @param source the object responsible for the event
58      * @param type the event type
59      * @param targetURL the affected URL
60      * @param sourceElement the element that corresponds to the source
61      * of the event
62      * @param targetFrame the Frame to display the document in
63      */

64     public HTMLFrameHyperlinkEvent(Object JavaDoc source, EventType type, URL JavaDoc targetURL,
65                    Element sourceElement, String JavaDoc targetFrame) {
66         super(source, type, targetURL, null, sourceElement);
67     this.targetFrame = targetFrame;
68     }
69
70
71     /**
72      * Creates a new object representing a hypertext link event.
73      *
74      * @param source the object responsible for the event
75      * @param type the event type
76      * @param targetURL the affected URL
77      * @param desc a desription
78      * @param sourceElement the element that corresponds to the source
79      * of the event
80      * @param targetFrame the Frame to display the document in
81      */

82     public HTMLFrameHyperlinkEvent(Object JavaDoc source, EventType type, URL JavaDoc targetURL, String JavaDoc desc,
83                    Element sourceElement, String JavaDoc targetFrame) {
84         super(source, type, targetURL, desc, sourceElement);
85     this.targetFrame = targetFrame;
86     }
87
88     /**
89      * returns the target for the link.
90      */

91     public String JavaDoc getTarget() {
92     return targetFrame;
93     }
94
95     private String JavaDoc targetFrame;
96 }
97
Popular Tags