source: trunk/src/gcc/libjava/java/awt/event/ContainerEvent.java@ 2

Last change on this file since 2 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1/* Copyright (C) 2000, 2001 Free Software Foundation
2
3 This file is part of libjava.
4
5This software is copyrighted work licensed under the terms of the
6Libjava License. Please consult the file "LIBJAVA_LICENSE" for
7details. */
8
9package java.awt.event;
10import java.awt.*;
11
12/**
13 * @author Tom Tromey <[email protected]>
14 * @date April 8, 2000
15 */
16
17/* Status: Believed complete and correct to JDK 1.2. */
18
19public class ContainerEvent extends ComponentEvent
20{
21 public static final int COMPONENT_ADDED = 300;
22 public static final int COMPONENT_REMOVED = 301;
23 public static final int CONTAINER_FIRST = 300;
24 public static final int CONTAINER_LAST = 301;
25
26 /** @specnote In JDK1.2 and 1.3, source is a Component. */
27 public ContainerEvent (Component source, int id, Component child)
28 {
29 super (source, id);
30 this.child = child;
31 }
32
33 public Component getChild ()
34 {
35 return child;
36 }
37
38 public Container getContainer ()
39 {
40 return (Container) source;
41 }
42
43 public String paramString ()
44 {
45 String r;
46 switch (id)
47 {
48 case COMPONENT_ADDED:
49 r = "COMPONENT_ADDED";
50 break;
51 case COMPONENT_REMOVED:
52 r = "COMPONENT_REMOVED";
53 break;
54 default:
55 r = "unknown id";
56 break;
57
58 }
59 r += ",child=" + child;
60 return r;
61 }
62
63 private Component child;
64}
Note: See TracBrowser for help on using the repository browser.