/[classpath]/classpath/javax/swing/event/HyperlinkEvent.java
ViewVC logotype

Diff of /classpath/javax/swing/event/HyperlinkEvent.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by mkoch, Sun Jun 8 12:14:56 2003 UTC revision 1.4 by mkoch, Tue Jun 24 19:09:41 2003 UTC
# Line 43  import java.util.EventObject; Line 43  import java.util.EventObject;
43  import javax.swing.text.Element;  import javax.swing.text.Element;
44    
45  /**  /**
  * HyperlinkEvent  
46   * @author Andrew Selkirk   * @author Andrew Selkirk
47   * @author Ronald Veldema   * @author Ronald Veldema
48   */   */
49  public class HyperlinkEvent extends EventObject  public class HyperlinkEvent extends EventObject
50  {  {
51      public static final class EventType
52          //-------------------------------------------------------------    {
53          // Classes ----------------------------------------------------      public static final EventType ENTERED = new EventType("ENTERED"); // TODO
54          //-------------------------------------------------------------      public static final EventType EXITED = new EventType("EXITED"); // TODO
55        public static final EventType ACTIVATED = new EventType("ACTIVATED"); // TODO
56          /**      
57           * EventType      private String type;
58           */  
59          public static final class EventType {      /**
60         * Creates a new Event type.
61                  //-------------------------------------------------------------       *
62                  // Variables --------------------------------------------------       * @param type String representing the event type.
63                  //-------------------------------------------------------------       */
64        private EventType(String type)
65                  /**      {
66                   * ENTERED        this.type = type;
67                   */      }
68                  public static final EventType ENTERED = new EventType("ENTERED"); // TODO  
69        /**
70                  /**       * Returns a <code>String</code> of this object.
71                   * EXITED       */
72                   */      public String toString()
73                  public static final EventType EXITED = new EventType("EXITED"); // TODO      {
74          return type;
75                  /**      }
76                   * ACTIVATED    }
77                   */  
78                  public static final EventType ACTIVATED = new EventType("ACTIVATED"); // TODO    private static final long serialVersionUID = -8168964465779154277L;
79      
80                  /**    private EventType type;
81                   * type    private URL url;
82                   */    private String description;
83                  private String type;    private Element element;
84    
85      /**
86                  //-------------------------------------------------------------     * Creates a new <code>HyperlinkEvent</code> with the given arguments.
87                  // Initialization ---------------------------------------------     *
88                  //-------------------------------------------------------------     * @param source The object this link is associated to.
89       * @param type The type of event.
90                  /**     * @param url The URL this link pointing too.
91                   * Constructor EventType     */
92                   * @param type TODO    public HyperlinkEvent(Object source, EventType type, URL url)
93                   */    {
94                  private EventType(String type) {      this (source, type, url, null, null);
95                          this.type = type;    }
96                  } // EventType()  
97      /**
98       * Creates a new <code>HyperlinkEvent</code> with the given arguments.
99                  //-------------------------------------------------------------     *
100                  // Methods ----------------------------------------------------     * @param source The object this link is associated to.
101                  //-------------------------------------------------------------     * @param type The type of event.
102       * @param url The URL this link pointing too.
103                  /**     * @param description The description for this link.
104                   * toString     */
105                   * @returns String    public HyperlinkEvent(Object source, EventType type, URL url, String description)
106                   */    {
107                  public String toString() {      this (source, type, url, description, null);
108                          return type; // TODO    }
109                  } // toString()    
110      /**
111       * Creates a new <code>HyperlinkEvent</code> with the given arguments.
112          } // EventType     *
113       * @param source The object this link is associated to.
114       * @param type The type of event.
115          //-------------------------------------------------------------     * @param url The URL this link pointing too.
116          // Variables --------------------------------------------------     * @param description The description for this link.
117          //-------------------------------------------------------------     * @param element The element in the document representing the anchor.
118       */
119          /**    public HyperlinkEvent(Object source, EventType type, URL url, String description)
120           * type    {
121           */      super(source);
122          private EventType type;      this.type = type;
123        this.url = url;
124          /**      this.description = description;
125           * url      this.element = element;
126           */    }
127          private URL url;  
128      /**
129          /**     * Returns the element of the document repesenting this anchor.
130           * description     */
131           */    public Element getSourceElement()
132          private String description;    {
133        return element;
134      }
135          //-------------------------------------------------------------    
136          // Initialization ---------------------------------------------    /**
137          //-------------------------------------------------------------     * Returns the URL of this event.
138       */
139          /**    public URL getURL()
140           * Constructor HyperlinkEvent    {
141           * @param source TODO      return url;
142           * @param type TODO    }
143           * @param url TODO  
144           */    /**
145          public HyperlinkEvent(Object source, EventType type, URL url) {     * Returns the type of this event.
146                  super(source);     */
147                  this.type = type;    public EventType getEventType()
148                  this.url = url;    {
149                  this.description = null;      return type;
150          } // HyperlinkEvent()    }
151    
152          /**    /**
153           * Constructor HyperlinkEvent     * Returns the description of this event.
154           * @param source TODO     */
155           * @param type TODO    public String getDescription()
156           * @param url TODO    {
157           * @param description TODO      return description;
158           */    }
159          public HyperlinkEvent(Object source, EventType type, URL url, String description) {  }
                 super(source);  
                 this.type = type;  
                 this.url = url;  
                 this.description = null;  
         } // HyperlinkEvent()  
   
   
         //-------------------------------------------------------------  
         // Methods ----------------------------------------------------  
         //-------------------------------------------------------------  
   
         /**  
          * getURL  
          * @returns URL  
          */  
         public URL getURL() {  
                 return url;  
         } // getURL()  
   
         /**  
          * getEventType  
          * @returns EventType  
          */  
         public EventType getEventType() {  
                 return type;  
         } // getEventType()  
   
         /**  
          * getDescription  
          * @returns String  
          */  
         public String getDescription() {  
                 return description;  
         } // getDescription()  
   
   
 } // HyperlinkEvent  

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26