Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/voytechs/html/event/Event.java


1   /*
2    * File: Event.java
3    * Auth: Mark Bednarczyk
4    * Date: DATE
5    *   Id: $Id: Event.java,v 1.1.1.1 2002/01/23 23:52:47 voytechs Exp $
6    ********************************************
7    * $Log: Event.java,v $
8    * Revision 1.1.1.1  2002/01/23 23:52:47  voytechs
9    * Initial public release, BETA 1.0 - voytechs
10   *
11   */
12  package com.voytechs.html.event;
13  
14  import java.lang.*;
15  import java.util.*;
16  
17  /**
18   * 
19   */
20  public class Event {
21    /* Internal attributes */
22  
23    private int type = 0x0000;
24    private int id = 0x0000;
25    private Object eventSource = null;
26  
27    /**
28     *
29     * @param
30     * @exception
31     */
32    public Event(int type, int id) {
33      this.type = type;
34      this.id = id;
35    }
36  
37    /**
38     * Accessor to get Event Type ID. Not the same as Event ID.
39     * @return ID of this event type.
40     */
41    public int getType() {
42      return(type);
43    }
44  
45    /**
46     * Accessor to get Event ID. Not the sae as Event type ID.
47     * @return ID of this event.
48     */
49    public int getId() {
50      return(id);
51    }
52  
53    /**
54     * Set the target object. That is the object that caused this event.
55     */
56    void setEventSource(Object eventSource) {
57      this.eventSource = eventSource;
58    }
59  
60    /**
61     * Get the source of that caused this event.
62     */
63    public Object getEventSource() {
64      return(eventSource);
65    }
66  
67    /**
68     *
69     */
70    public String toString() {
71      String s = "";
72  
73      s += "[";
74      s += "eventType=" + type;
75      s += ",eventId=" + id;
76      s += "]";
77  
78      return(s);
79    }
80  
81    /**
82     * Test function for Event
83     * @param args command line arguments
84     */
85    public static void main(String [] args) {
86    }
87  
88  } /* END OF: Event */