01: // FramEvent.java
02: // $Id: FrameEvent.java,v 1.2 2000/08/16 21:37:53 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1997.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.tools.resources.event;
07:
08: import org.w3c.tools.resources.Resource;
09: import org.w3c.tools.resources.ResourceFrame;
10:
11: public class FrameEvent extends ResourceEvent {
12:
13: public String toString() {
14: String ssource = ((Resource) getSource()).getIdentifier();
15: String stype = null;
16: switch (id) {
17: case Events.FRAME_ADDED:
18: stype = "FRAME_ADDED";
19: break;
20: case Events.FRAME_MODIFIED:
21: stype = "FRAME_MODIFIED";
22: break;
23: case Events.FRAME_REMOVED:
24: stype = "FRAME_REMOVED";
25: break;
26: default:
27: stype = "UNKNOWN";
28: }
29: return "FrameEvent : [" + ssource + " : " + stype + "]";
30: }
31:
32: /**
33: * Create the Frame event.
34: * @param source The frame emitting the event.
35: * @param type The kind of event being emitted.
36: */
37: public FrameEvent(ResourceFrame frame, int type) {
38: super(frame, type);
39: }
40:
41: }
|