home *** CD-ROM | disk | FTP | other *** search
- package java.awt;
-
- import java.io.Serializable;
-
- public class Cursor implements Serializable {
- public static final int DEFAULT_CURSOR = 0;
- public static final int CROSSHAIR_CURSOR = 1;
- public static final int TEXT_CURSOR = 2;
- public static final int WAIT_CURSOR = 3;
- public static final int SW_RESIZE_CURSOR = 4;
- public static final int SE_RESIZE_CURSOR = 5;
- public static final int NW_RESIZE_CURSOR = 6;
- public static final int NE_RESIZE_CURSOR = 7;
- public static final int N_RESIZE_CURSOR = 8;
- public static final int S_RESIZE_CURSOR = 9;
- public static final int W_RESIZE_CURSOR = 10;
- public static final int E_RESIZE_CURSOR = 11;
- public static final int HAND_CURSOR = 12;
- public static final int MOVE_CURSOR = 13;
- protected static Cursor[] predefined = new Cursor[14];
- int type = 0;
- private static final long serialVersionUID = 8028237497568985504L;
-
- public static Cursor getPredefinedCursor(int var0) {
- if (var0 >= 0 && var0 <= 13) {
- if (predefined[var0] == null) {
- predefined[var0] = new Cursor(var0);
- }
-
- return predefined[var0];
- } else {
- throw new IllegalArgumentException("illegal cursor type");
- }
- }
-
- public static Cursor getDefaultCursor() {
- return getPredefinedCursor(0);
- }
-
- public Cursor(int var1) {
- if (var1 >= 0 && var1 <= 13) {
- this.type = var1;
- } else {
- throw new IllegalArgumentException("illegal cursor type");
- }
- }
-
- public int getType() {
- return this.type;
- }
- }
-