gcc/libjava/java/awt/Cursor.java
Tom Tromey 5472d1951a MenuContainer.java: Fixed typo.
* java/awt/MenuContainer.java: Fixed typo.

	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added SystemColor.java.
	* java/awt/SystemColor.java: New file.

	* java/awt/Color.java (rgba): Now package-private.

	* java/awt/event/InputEvent.java (isAltGraphDown): New method.

	* java/awt/event/ContainerEvent.java (getContainer): Renamed from
	getComponent.

	* java/awt/MenuItem.java (addNotify): New method.
	(MenuItem(String,MenuShortcut)): New constructor.
	(setLabel): Notify peer of change.
	(setEnabled): Likewise.

	* java/awt/GridLayout.java (toString): New method.

	* java/awt/FlowLayout.java (LEADING, TRAILING): New constants.
	(FlowLayout): Check for LEADING and TRAILING.
	(setAlignment): Likewise.
	(layoutContainer): Handle component orientation.

	* java/awt/Component.java (orientatin): New field.
	(setComponentOrientation): Wrote.
	(getComponentOrientation): Wrote.

	* java/awt/Event.java (Event): Implements Serializable.
	(consumed): New field for serialization.
	* java/awt/Dimension.java (Dimension): Implements Serializable.
	* java/awt/Cursor.java (Cursor): Implements Serializable.
	* java/awt/Container.java (Container): No longer abstract.

	* java/awt/Choice.java: Wrote.
	* java/awt/Checkbox.java: Wrote.
	* java/awt/ItemSelectable.java: Documented.
	* java/awt/CheckboxGroup.java: Wrote.

	* java/awt/CardLayout.java (layoutContainer): Directly use fields
	in other classes.
	(getSize): Likewise.

From-SVN: r38486
2000-12-26 00:25:13 +00:00

88 lines
1.8 KiB
Java

/* 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 implements java.io.Serializable
{
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() + "]");
}
}