source: trunk/gcc/libjava/gnu/gcj/xlib/XID.java

Last change on this file was 2, checked in by bird, 22 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.1 KB
Line 
1/* Copyright (C) 2000 Free Software Foundation
2
3 This file is part of libgcj.
4
5This software is copyrighted work licensed under the terms of the
6Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7details. */
8
9package gnu.gcj.xlib;
10
11/**
12 * Common base class for all resources that are stored on the server
13 * and refered to on the client side using XIDs.
14 *
15 * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
16 */
17public class XID
18{
19 public XID(Display display, int xid)
20 {
21 this.display = display;
22 this.xid = xid;
23 }
24
25 public final int getXID()
26 {
27 return xid;
28 }
29
30 public final Display getDisplay()
31 {
32 return display;
33 }
34
35 protected Display display;
36 protected int xid;
37
38 private Object clientData;
39 public final Object getClientData()
40 {
41 return clientData;
42 }
43 public final void setClientData(Object clientData)
44 {
45 this.clientData = clientData;
46 }
47
48 protected String params()
49 {
50 return "display=" + display + ",xid=" + Integer.toHexString(xid);
51 }
52
53 public String toString()
54 {
55 return getClass().getName() +
56 "[" + params() + "]";
57 }
58}
Note: See TracBrowser for help on using the repository browser.