diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2000-07-12 03:32:07 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2000-07-12 04:32:07 +0100 |
commit | c7a136d3ef16cf20fcd5314036508e31870b4849 (patch) | |
tree | d9865dd4f3595d22c9fd5c93cc63eb0b226278d6 /libjava/java/awt/Cursor.java | |
parent | 406a65d0db1eb80f45a7a3bf8c85f534e1a3960a (diff) | |
download | gcc-c7a136d3ef16cf20fcd5314036508e31870b4849.zip gcc-c7a136d3ef16cf20fcd5314036508e31870b4849.tar.gz gcc-c7a136d3ef16cf20fcd5314036508e31870b4849.tar.bz2 |
Big AWT patch.
From-SVN: r34976
Diffstat (limited to 'libjava/java/awt/Cursor.java')
-rw-r--r-- | libjava/java/awt/Cursor.java | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/libjava/java/awt/Cursor.java b/libjava/java/awt/Cursor.java new file mode 100644 index 0000000..96d36e7 --- /dev/null +++ b/libjava/java/awt/Cursor.java @@ -0,0 +1,87 @@ +/* Copyright (C) 2000 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +package java.awt; + +/* A somewhat incomplete placeholder. */ + +public class Cursor +{ + public static final int DEFAULT_CURSOR = 0, + CROSSHAIR_CURSOR = 1, + TEXT_CURSOR = 2, + WAIT_CURSOR = 3, + SW_RESIZE_CURSOR = 4, + SE_RESIZE_CURSOR = 5, + NW_RESIZE_CURSOR = 6, + NE_RESIZE_CURSOR = 7, + N_RESIZE_CURSOR = 8, + S_RESIZE_CURSOR = 9, + W_RESIZE_CURSOR = 10, + E_RESIZE_CURSOR = 11, + HAND_CURSOR = 12, + MOVE_CURSOR = 13, + CUSTOM_CURSOR = 0xFFFFFFFF; + + private static final int PREDEFINED_COUNT = 14; + + protected static Cursor[] predefined = new Cursor[PREDEFINED_COUNT]; + protected String name; + int type; + + public Cursor(int type) + { + this.type = type; + // FIXME: lookup and set name? + } + + /** This constructor is used internally only. + * Application code should call Toolkit.createCustomCursor(). + */ + protected Cursor(String name) + { + this.name = name; + // FIXME + } + + public static Cursor getPredefinedCursor(int type) + { + if (type >= PREDEFINED_COUNT) + return null; + if (predefined[type] == null) + predefined[type] = new Cursor(type); + return predefined[type]; + } + + public static Cursor getSystemCustomCursor(String name) + throws AWTException + { + // FIXME + return null; + } + + public static Cursor getDefaultCursor() + { + return getPredefinedCursor(0); + } + + public int getType() + { + return type; + } + + public String getName() + { + return name; + } + + public String toString() + { + return (this.getClass() + "[" + getName() + "]"); + } +} |