01: package jimm.datavision.gui;
02:
03: /**
04: * A simple clipboard class. Use <code>instance</code> to get the single
05: * global clipboard instance.
06: *
07: * @author Jim Menard, <a href="mailto:jimm@io.com">jimm@io.com</a>
08: */
09: public class Clipboard {
10:
11: protected static Clipboard clipboard = new Clipboard();
12:
13: protected Object contents;
14:
15: public static Clipboard instance() {
16: return clipboard;
17: }
18:
19: protected Clipboard() {
20: }
21:
22: public void setContents(Object obj) {
23: contents = obj;
24: }
25:
26: public Object getContents() {
27: return contents;
28: }
29:
30: public boolean isEmpty() {
31: return contents == null;
32: }
33:
34: }
|