2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gnu / gcj / xlib / XEvent.java
blob75f602a82d272dc69b63b2e1c6e1d323abe634bc
1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7 details. */
9 package gnu.gcj.xlib;
11 import gnu.gcj.RawData;
13 /**
14 * Base class for interpreters of specific X event types. For methods
15 * concerning all X events, see XAnyEvent.
17 * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
19 public class XEvent
21 public XEvent(XAnyEvent event)
23 this.event = event;
26 public XEvent(int type, Display display)
28 this(new XAnyEvent(display));
29 event.setType(type);
32 XAnyEvent event;
34 public XAnyEvent getXAnyEvent()
36 return event;
39 public String toString()
41 if (event == null)
42 return super.toString();
43 return event.toString();