Commit 62d2eed6 by Tom Tromey Committed by Tom Tromey

Makefile.in: Rebuilt.

	* Makefile.in: Rebuilt.
	* Makefile.am (rmi_java_source_files): Added RMIClassLoaderSpi.
	* java/awt/AlphaComposite.java, java/awt/BasicStroke.java,
	java/awt/BufferCapabilities.java, java/awt/Button.java,
	java/awt/CheckboxMenuItem.java, java/awt/Choice.java,
	java/awt/Container.java, java/awt/Cursor.java,
	java/awt/EventQueue.java, java/awt/FileDialog.java,
	java/awt/Graphics2D.java, java/awt/Label.java, java/awt/Menu.java,
	java/awt/MenuBar.java, java/awt/MenuComponent.java,
	java/awt/PopupMenu.java, java/awt/ScrollPane.java,
	java/awt/Scrollbar.java, java/awt/TextArea.java,
	java/awt/TextField.java, java/awt/color/CMMException.java,
	java/awt/color/ColorSpace.java, java/awt/color/ICC_Profile.java,
	java/awt/color/ProfileDataException.java,
	java/awt/datatransfer/Clipboard.java,
	java/awt/datatransfer/DataFlavor.java,
	java/awt/datatransfer/FlavorMap.java,
	java/awt/datatransfer/SystemFlavorMap.java,
	java/awt/dnd/DragGestureEvent.java,
	java/awt/dnd/DragGestureRecognizer.java,
	java/awt/dnd/DragSource.java, java/awt/dnd/DropTarget.java,
	java/awt/event/WindowEvent.java, java/awt/geom/PathIterator.java,
	java/awt/im/InputMethodHighlight.java,
	java/io/PipedOutputStream.java, java/io/PipedWriter.java,
	java/rmi/server/RMIClassLoader.java: Merged from Classpath.

	* gnu/awt/j2d/Graphics2DImpl.java (drawImage): Changed type of
	`op' to BufferedImageOp.

From-SVN: r60768
parent 3c32ae1c
2003-01-01 Tom Tromey <tromey@redhat.com>
* Makefile.in: Rebuilt.
* Makefile.am (rmi_java_source_files): Added RMIClassLoaderSpi.
* java/awt/AlphaComposite.java, java/awt/BasicStroke.java,
java/awt/BufferCapabilities.java, java/awt/Button.java,
java/awt/CheckboxMenuItem.java, java/awt/Choice.java,
java/awt/Container.java, java/awt/Cursor.java,
java/awt/EventQueue.java, java/awt/FileDialog.java,
java/awt/Graphics2D.java, java/awt/Label.java, java/awt/Menu.java,
java/awt/MenuBar.java, java/awt/MenuComponent.java,
java/awt/PopupMenu.java, java/awt/ScrollPane.java,
java/awt/Scrollbar.java, java/awt/TextArea.java,
java/awt/TextField.java, java/awt/color/CMMException.java,
java/awt/color/ColorSpace.java, java/awt/color/ICC_Profile.java,
java/awt/color/ProfileDataException.java,
java/awt/datatransfer/Clipboard.java,
java/awt/datatransfer/DataFlavor.java,
java/awt/datatransfer/FlavorMap.java,
java/awt/datatransfer/SystemFlavorMap.java,
java/awt/dnd/DragGestureEvent.java,
java/awt/dnd/DragGestureRecognizer.java,
java/awt/dnd/DragSource.java, java/awt/dnd/DropTarget.java,
java/awt/event/WindowEvent.java, java/awt/geom/PathIterator.java,
java/awt/im/InputMethodHighlight.java,
java/io/PipedOutputStream.java, java/io/PipedWriter.java,
java/rmi/server/RMIClassLoader.java: Merged from Classpath.
* gnu/awt/j2d/Graphics2DImpl.java (drawImage): Changed type of
`op' to BufferedImageOp.
2002-12-31 Tom Tromey <tromey@redhat.com>
Fix for PR libgcj/7416:
......
......@@ -1336,6 +1336,7 @@ java/rmi/server/LogStream.java \
java/rmi/server/ObjID.java \
java/rmi/server/Operation.java \
java/rmi/server/RMIClassLoader.java \
java/rmi/server/RMIClassLoaderSpi.java \
java/rmi/server/RMIClientSocketFactory.java \
java/rmi/server/RMIFailureHandler.java \
java/rmi/server/RMIServerSocketFactory.java \
......
......@@ -1096,6 +1096,7 @@ java/rmi/server/LogStream.java \
java/rmi/server/ObjID.java \
java/rmi/server/Operation.java \
java/rmi/server/RMIClassLoader.java \
java/rmi/server/RMIClassLoaderSpi.java \
java/rmi/server/RMIClientSocketFactory.java \
java/rmi/server/RMIFailureHandler.java \
java/rmi/server/RMIServerSocketFactory.java \
......@@ -3164,6 +3165,7 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/rmi/server/LoaderHandler.P .deps/java/rmi/server/LogStream.P \
.deps/java/rmi/server/ObjID.P .deps/java/rmi/server/Operation.P \
.deps/java/rmi/server/RMIClassLoader.P \
.deps/java/rmi/server/RMIClassLoaderSpi.P \
.deps/java/rmi/server/RMIClientSocketFactory.P \
.deps/java/rmi/server/RMIFailureHandler.P \
.deps/java/rmi/server/RMIServerSocketFactory.P \
......
/* Copyright (C) 2000, 2002 Free Software Foundation
/* Copyright (C) 2000, 2002, 2003 Free Software Foundation
This file is part of libgcj.
......@@ -24,6 +24,7 @@ import java.awt.Stroke;
import java.awt.geom.AffineTransform;
import java.awt.image.ImageObserver;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.RenderedImage;
import java.awt.image.renderable.RenderableImage;
import java.text.AttributedCharacterIterator;
......@@ -459,7 +460,7 @@ public class Graphics2DImpl extends Graphics2D implements Cloneable
throw new UnsupportedOperationException(msg);
}
public void drawImage(BufferedImage image, BufferedImage op, int x, int y)
public void drawImage(BufferedImage image, BufferedImageOp op, int x, int y)
{
throw new UnsupportedOperationException("not implemented yet");
}
......
......@@ -64,6 +64,7 @@ public final class AlphaComposite implements Composite
return size() > MAX_CACHE_SIZE;
}
};
public static final int CLEAR = 1;
public static final int SRC = 2;
public static final int DST = 9;
......@@ -88,6 +89,7 @@ public final class AlphaComposite implements Composite
public static final AlphaComposite SrcAtop = getInstance(SRC_ATOP);
public static final AlphaComposite DstAtop = getInstance(DST_ATOP);
public static final AlphaComposite Xor = getInstance(XOR);
private final int rule;
private final float alpha;
private AlphaComposite(int rule, float alpha)
......@@ -95,10 +97,32 @@ public final class AlphaComposite implements Composite
this.rule = rule;
this.alpha = alpha;
}
/**
* Creates an AlphaComposite object with the specified rule.
*
* @param rule The compositing rule.
*
* @exception IllegalArgumentException If rule is not one of the following:
* CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT,
* SRC_ATOP, DST_ATOP, or XOR.
*/
public static AlphaComposite getInstance(int rule)
{
return getInstance(rule, 1);
}
/**
* Creates an AlphaComposite object with the specified rule and the constant
* alpha to multiply with the alpha of the source. The source is multiplied
* with the specified alpha before being composited with the destination.
*
* @param rule The compositing rule.
*
* @exception IllegalArgumentException If rule is not one of the following:
* CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT,
* SRC_ATOP, DST_ATOP, or XOR.
*/
public static AlphaComposite getInstance(int rule, float alpha)
{
if (rule < CLEAR || rule > XOR || ! (alpha >= 0 && alpha <= 1))
......
/* BasicStroke.java --
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -59,12 +59,31 @@ public class BasicStroke implements Stroke
private final float[] dash;
private final float phase;
/**
* Creates a basic stroke.
*
* @param width May not be negative .
* @param cap May be either CAP_BUTT, CAP_ROUND or CAP_SQUARE.
* @param join May be either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER.
* @param miterlimit the limit to trim the miter join. The miterlimit must be
* greater than or equal to 1.0f.
* @param dash The array representing the dashing pattern.
* @param dash_phase is negative and dash is not null.
*
* @exception IllegalArgumentException If one input parameter doesn't meet
* its needs.
*/
public BasicStroke(float width, int cap, int join, float miterlimit,
float[] dash, float dashPhase)
{
if (width < 0 || miterlimit < 1 || cap < CAP_BUTT || cap > CAP_SQUARE
|| join < JOIN_MITER || join > JOIN_BEVEL)
if (width < 0 ||
miterlimit < 1.0f ||
cap < CAP_BUTT ||
cap > CAP_SQUARE ||
join < JOIN_MITER ||
join > JOIN_BEVEL)
throw new IllegalArgumentException();
this.width = width;
this.cap = cap;
this.join = join;
......@@ -73,21 +92,54 @@ public class BasicStroke implements Stroke
phase = dashPhase;
}
/**
* Creates a basic stroke.
*
* @param width The width of the BasicStroke. May not be negative .
* @param cap May be either CAP_BUTT, CAP_ROUND or CAP_SQUARE.
* @param join May be either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER.
* @param miterlimit the limit to trim the miter join. The miterlimit must be
* greater than or equal to 1.0f.
*
* @exception IllegalArgumentException If one input parameter doesn't meet
* its needs.
*/
public BasicStroke(float width, int cap, int join, float miterlimit)
{
this(width, cap, join, miterlimit, null, 0);
}
/**
* Creates a basic stroke.
*
* @param width The width of the BasicStroke. May not be nehative.
* @param cap May be either CAP_BUTT, CAP_ROUND or CAP_SQUARE.
* @param join May be either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER.
*
* @exception IllegalArgumentException If one input parameter doesn't meet
* its needs.
* @exception IllegalArgumentException FIXME
*/
public BasicStroke(float width, int cap, int join)
{
this(width, cap, join, 10, null, 0);
}
/**
* Creates a basic stroke.
*
* @param width The width of the BasicStroke.
*
* @exception IllegalArgumentException If width is negative.
*/
public BasicStroke(float width)
{
this(width, CAP_SQUARE, JOIN_MITER, 10, null, 0);
}
/**
* Creates a basic stroke.
*/
public BasicStroke()
{
this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0);
......
......@@ -67,6 +67,11 @@ public class BufferCapabilities implements Cloneable
private final ImageCapabilities back;
private final FlipContents flip;
/**
* Creates a buffer capabilities object.
*
* @exception IllegalArgumentException If frontCaps or backCaps are null.
*/
public BufferCapabilities(ImageCapabilities front, ImageCapabilities back,
FlipContents flip)
{
......
......@@ -90,6 +90,9 @@ private transient ActionListener action_listeners;
/**
* Initializes a new instance of <code>Button</code> with no label.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true
*/
public
Button()
......@@ -104,12 +107,18 @@ Button()
* label. The action command name is also initialized to this value.
*
* @param label The label to display on the button.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true
*/
public
Button(String label)
{
this.label = label;
actionCommand = label;
if (GraphicsEnvironment.isHeadless ())
throw new HeadlessException ();
}
/*************************************************************************/
......@@ -211,6 +220,10 @@ removeActionListener(ActionListener listener)
/** Returns all registered EventListers of the given listenerType.
* listenerType must be a subclass of EventListener, or a
* ClassClassException is thrown.
*
* @exception ClassCastException If listenerType doesn't specify a class or
* interface that implements @see java.util.EventListener.
*
* @since 1.3
*/
public EventListener[] getListeners(Class listenerType)
......
......@@ -84,6 +84,9 @@ private transient ItemListener item_listeners;
/**
* Initializes a new instance of <code>CheckboxMenuItem</code> with no
* label and an initial state of off.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true.
*/
public
CheckboxMenuItem()
......@@ -98,6 +101,9 @@ CheckboxMenuItem()
* specified label and an initial state of off.
*
* @param label The label of the menu item.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true.
*/
public
CheckboxMenuItem(String label)
......@@ -114,12 +120,18 @@ CheckboxMenuItem(String label)
* @param label The label of the menu item.
* @param state The initial state of the menu item, where <code>true</code>
* is on, and <code>false</code> is off.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true.
*/
public
CheckboxMenuItem(String label, boolean state)
{
super(label);
this.state = state;
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -85,13 +85,17 @@ private ItemListener item_listeners;
* Constructors
*/
/**
/**
* Initializes a new instance of <code>Choice</code>.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true
*/
public
Choice()
{
}
public Choice()
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......@@ -146,12 +150,16 @@ getItem(int index)
* Adds the specified item to this choice box.
*
* @param item The item to add.
*
* @exception NullPointerException If the item's value is null
*
* @since 1.1
*/
public synchronized void
add(String item)
{
if (item == null)
throw new IllegalArgumentException ("item must be non-null");
throw new NullPointerException ("item must be non-null");
pItems.addElement(item);
......@@ -171,7 +179,12 @@ add(String item)
/**
* Adds the specified item to this choice box.
*
* This method is oboslete since Java 2 platform 1.1. Please use @see add
* instead.
*
* @param item The item to add.
*
* @exception NullPointerException If the item's value is equal to null
*/
public synchronized void
addItem(String item)
......@@ -189,10 +202,15 @@ addItem(String item)
*
* @param item The item to add.
* @param index The index at which the item should be inserted.
*
* @exception IllegalArgumentException If index is less than 0
*/
public synchronized void
insert(String item, int index)
{
if (index < 0)
throw new IllegalArgumentException ("index may not be less then 0");
if (index > getItemCount ())
index = getItemCount ();
......
......@@ -59,7 +59,9 @@ import javax.accessibility.Accessible;
*
* @author original author unknown
* @author Eric Blake <ebb9@email.byu.edu>
*
* @since 1.0
*
* @status still missing 1.4 support
*/
public class Container extends Component
......@@ -78,7 +80,9 @@ public class Container extends Component
Dimension maxSize;
/** @since 1.4 */
/**
* @since 1.4
*/
boolean focusCycleRoot;
int containerSerializedDataVersion;
......@@ -107,6 +111,7 @@ public class Container extends Component
* Returns the number of components in this container.
*
* @return The number of components in this container.
*
* @deprecated use {@link #getComponentCount()} instead
*/
public int countComponents()
......@@ -118,7 +123,9 @@ public class Container extends Component
* Returns the component at the specified index.
*
* @param index The index of the component to retrieve.
*
* @return The requested component.
*
* @throws ArrayIndexOutOfBoundsException If the specified index is invalid
*/
public Component getComponent(int n)
......@@ -127,6 +134,7 @@ public class Container extends Component
{
if (n < 0 || n >= ncomponents)
throw new ArrayIndexOutOfBoundsException("no such component");
return component[n];
}
}
......@@ -141,8 +149,10 @@ public class Container extends Component
synchronized (getTreeLock ())
{
Component[] result = new Component[ncomponents];
if (ncomponents > 0)
System.arraycopy(component, 0, result, 0, ncomponents);
return result;
}
}
......@@ -157,6 +167,7 @@ public class Container extends Component
{
if (peer == null)
return new Insets(0, 0, 0, 0);
return ((ContainerPeer) peer).getInsets();
}
......@@ -177,6 +188,7 @@ public class Container extends Component
* component list.
*
* @param component The component to add to the container.
*
* @return The same component that was added.
*/
public Component add(Component comp)
......@@ -190,7 +202,7 @@ public class Container extends Component
* component list. This method should not be used. Instead, use
* <code>add(Component, Object</code>.
*
* @param name FIXME
* @param name The name of the component to be added.
* @param component The component to be added.
*
* @return The same component that was added.
......@@ -302,6 +314,7 @@ public class Container extends Component
System.arraycopy(component, 0, c, 0, ncomponents);
component = c;
}
if (index == -1)
component[ncomponents++] = comp;
else
......@@ -525,6 +538,7 @@ public class Container extends Component
* Returns the preferred size of this container.
*
* @return The preferred size of this container.
*
* @deprecated use {@link #getPreferredSize()} instead
*/
public Dimension preferredSize()
......@@ -549,6 +563,7 @@ public class Container extends Component
* Returns the minimum size of this container.
*
* @return The minimum size of this container.
*
* @deprecated use {@link #getMinimumSize()} instead
*/
public Dimension minimumSize()
......@@ -709,6 +724,10 @@ public class Container extends Component
}
/**
* Returns an array of all the objects currently registered as FooListeners
* upon this Container. FooListeners are registered using the addFooListener
* method.
*
* @since 1.3
*/
public EventListener[] getListeners(Class listenerType)
......@@ -760,6 +779,7 @@ public class Container extends Component
* AWT 1.0 event processor.
*
* @param event The event that occurred.
*
* @deprecated use {@link #dispatchEvent(AWTEvent)} instead
*/
public void deliverEvent(Event e)
......@@ -813,6 +833,7 @@ public class Container extends Component
*
* @return The component containing the specified point, or <code>null</code>
* if there is no such point.
*
* @deprecated use {@link #getComponentAt(int, int)} instead
*/
public Component locate(int x, int y)
......@@ -975,54 +996,85 @@ public class Container extends Component
public void setFocusTraversalKeys(int id, Set keys)
{
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS)
throw new IllegalArgumentException ();
}
public Set getFocusTraversalKeys(int id)
{
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS)
throw new IllegalArgumentException ();
return null;
}
public boolean areFocusTraversalKeysSet(int id)
{
if (id != KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS &&
id != KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS)
throw new IllegalArgumentException ();
return false;
}
public boolean isFocusCycleRoot(Container c)
{
return false;
}
public void transferFocusBackward()
{
}
public void setFocusTraversalPolicy(FocusTraversalPolicy policy)
{
}
public FocusTraversalPolicy getFocusTraversalPolicy()
{
return null;
}
public boolean isFocusTraversalPolicySet()
{
return false;
}
public void setFocusCycleRoot(boolean focusCycleRoot)
{
}
public boolean isFocusCycleRoot()
{
return false;
}
public void transferFocusDownCycle()
{
}
public void applyComponentOrientation(ComponentOrientation o)
{
if (orientation == null)
throw new NullPointerException ();
}
public void addPropertyChangeListener(PropertyChangeListener l)
{
}
public void addPropertyChangeListener(String name, PropertyChangeListener l)
{
}
// Hidden helper methods.
/**
......@@ -1160,7 +1212,6 @@ public class Container extends Component
}
}
// Nested classes.
/* The following classes are used in concert with the
......@@ -1200,6 +1251,7 @@ public class Container extends Component
* This class provides accessibility support for subclasses of container.
*
* @author Eric Blake <ebb9@email.byu.edu>
*
* @since 1.3
*/
protected class AccessibleAWTContainer extends AccessibleAWTComponent
......@@ -1271,7 +1323,9 @@ public class Container extends Component
* coordinates), if one exists.
*
* @param p the point to look at
*
* @return an accessible object at that point, or null
*
* @throws NullPointerException if p is null
*/
public Accessible getAccessibleAt(Point p)
......@@ -1286,6 +1340,7 @@ public class Container extends Component
* when children are added or removed from the enclosing accessible object.
*
* @author Eric Blake <ebb9@email.byu.edu>
*
* @since 1.3
*/
protected class AccessibleContainerHandler implements ContainerListener
......@@ -1324,7 +1379,6 @@ public class Container extends Component
} // class AccessibleAWTPanel
} // class Container
/**
* Undocumented helper class.
* STUBBED
......@@ -1339,39 +1393,50 @@ class LightweightDispatcher implements Serializable, AWTEventListener
private transient boolean isMouseInNativeContainer;
private Cursor nativeCursor;
private long eventMask;
LightweightDispatcher(Container c)
{
}
void dispose()
{
}
void enableEvents(long l)
{
}
boolean dispatchEvent(AWTEvent e)
{
return true;
}
boolean isMouseGrab(MouseEvent e)
{
return true;
}
boolean processMouseEvent(MouseEvent e)
{
return true;
}
void trackMouseEnterExit(Component c, MouseEvent e)
{
}
void startListeningForOtherDrags()
{
}
void stopListeningForOtherDrags()
{
}
public void eventDispatched(AWTEvent e)
{
}
void retargetMouseEvent(Component c, int i, MouseEvent e)
{
}
......
......@@ -133,11 +133,14 @@ public class Cursor implements java.io.Serializable
* type.
*
* @param type The cursor type.
*
* @exception IllegalArgumentException If the specified cursor type is invalid
*/
public Cursor(int type)
{
if (type < 0 || type >= PREDEFINED_COUNT)
throw new IllegalArgumentException ("invalid cursor " + type);
this.type = type;
// FIXME: lookup and set name?
}
......@@ -171,9 +174,20 @@ public class Cursor implements java.io.Serializable
return predefined[type];
}
/**
* Retrieves the system specific custom Cursor named Cursor names are,
* for example: "Invalid.16x16".
*
* @exception AWTException
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true.
*/
public static Cursor getSystemCustomCursor(String name)
throws AWTException
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
// FIXME
return null;
}
......
......@@ -151,6 +151,8 @@ public class EventQueue
* Posts a new event to the queue.
*
* @param event The event to post to the queue.
*
* @exception NullPointerException If event is null.
*/
public synchronized void postEvent(AWTEvent evt)
{
......@@ -209,7 +211,19 @@ public class EventQueue
notify();
}
/** @since JDK1.2 */
/**
* Causes runnable to have its run method called in the dispatch thread of the
* EventQueue. This will happen after all pending events are processed. The
* call blocks until this has happened. This method will throw an Error if
* called from the event dispatcher thread.
*
* @exception InterruptedException If another thread has interrupted
* this thread.
* @exception InvocationTargetException If an exception is thrown when running
* runnable.
*
* @since 1.2
*/
public static void invokeAndWait(Runnable runnable)
throws InterruptedException, InvocationTargetException
{
......@@ -254,6 +268,8 @@ public class EventQueue
* All pending events are transferred to the new queue. Calls to postEvent,
* getNextEvent, and peekEvent are forwarded to the pushed queue until it
* is removed with a pop().
*
* @exception NullPointerException if newEventQueue is null.
*/
public synchronized void push(EventQueue newEventQueue)
{
......@@ -271,7 +287,11 @@ public class EventQueue
}
/** Transfer any pending events from this queue back to the parent queue that
* was previously push()ed. Event dispatch from this queue is suspended. */
* was previously push()ed. Event dispatch from this queue is suspended.
*
* @exception EmptyStackException If no previous push was made on this
* EventQueue.
*/
protected void pop() throws EmptyStackException
{
if (prev == null)
......@@ -297,6 +317,12 @@ public class EventQueue
}
}
/**
* Dispatches an event. The manner in which the event is dispatched depends
* upon the type of the event and the type of the event's source object.
*
* @exception NullPointerException If event is null.
*/
protected void dispatchEvent(AWTEvent evt)
{
if (evt instanceof ActiveEvent)
......
......@@ -142,16 +142,15 @@ FileDialog(Frame parent, String title)
* @param title The title for this dialog.
* @param mode The mode of the dialog, either <code>LOAD</code> or
* <code>SAVE</code>.
*
* @exception IllegalArgumentException If an illegal file dialog mode
* is supplied.
*/
public
FileDialog(Frame parent, String title, int mode)
{
super(parent, title, true);
if ((mode != LOAD) && (mode != SAVE))
throw new IllegalArgumentException("Bad mode: " + mode);
this.mode = mode;
setMode (mode);
}
/*************************************************************************/
......@@ -180,6 +179,9 @@ getMode()
* peer is created.
*
* @param mode The new mode of this file dialog.
*
* @exception IllegalArgumentException If an illegal file dialog mode
* is supplied.
*/
public void
setMode(int mode)
......
......@@ -38,6 +38,7 @@ package java.awt;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.RenderedImage;
import java.awt.image.ImageObserver;
import java.awt.image.renderable.RenderableImage;
......@@ -74,7 +75,7 @@ public abstract class Graphics2D extends Graphics
ImageObserver obs);
public abstract void drawImage(BufferedImage image,
BufferedImage op,
BufferedImageOp op,
int x,
int y);
......
......@@ -99,6 +99,8 @@ private String text;
/**
* Initializes a new instance of <code>Label</code> with no text.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
Label()
......@@ -113,6 +115,8 @@ Label()
* text that is aligned to the left.
*
* @param text The text of the label.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
Label(String text)
......@@ -130,12 +134,17 @@ Label(String text)
* @param alignment The desired alignment for the text in this label,
* which must be one of <code>LEFT</code>, <code>CENTER</code>, or
* <code>RIGHT</code>.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
Label(String text, int alignment)
{
setAlignment (alignment);
setText (text);
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -95,6 +95,8 @@ static final MenuItem separator = new MenuItem("-");
/**
* Initializes a new instance of <code>Menu</code> with no label and that
* is not a tearoff;
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
Menu()
......@@ -108,6 +110,8 @@ Menu()
* that has the specified label.
*
* @param label The menu label.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
Menu(String label)
......@@ -124,6 +128,8 @@ Menu(String label)
* @param label The label for this menu
* @param isTearOff <code>true</code> if this menu is a tear off menu,
* <code>false</code> otherwise.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
Menu(String label, boolean isTearOff)
......@@ -134,6 +140,9 @@ Menu(String label, boolean isTearOff)
if (label.equals("Help"))
isHelpMenu = true;
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -86,10 +86,14 @@ private Vector menus = new Vector();
/**
* Initializes a new instance of <code>MenuBar</code>.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
MenuBar()
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -92,10 +92,14 @@ private static transient Toolkit toolkit = Toolkit.getDefaultToolkit();
/**
* Default constructor for subclasses.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
protected
MenuComponent()
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -65,6 +65,9 @@ private static final long serialVersionUID = -4620452533522760060L;
/**
* Initializes a new instance of <code>PopupMenu</code>.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true.
*/
public
PopupMenu()
......@@ -78,11 +81,17 @@ PopupMenu()
* label.
*
* @param label The label for this popup menu.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless()
* returns true.
*/
public
PopupMenu(String label)
{
super(label);
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -113,6 +113,8 @@ private Point scrollPosition = new Point(0, 0);
/**
* Initializes a new instance of <code>ScrollPane</code> with a default
* scrollbar policy of <code>SCROLLBARS_AS_NEEDED</code>.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
ScrollPane()
......@@ -128,10 +130,15 @@ ScrollPane()
*
* @param scrollbarDisplayPolicy When to display scrollbars, which must
* be one of the constants defined in this class.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public
ScrollPane(int scrollbarDisplayPolicy)
{
if (GraphicsEnvironment.isHeadless ())
throw new HeadlessException ();
this.scrollbarDisplayPolicy = scrollbarDisplayPolicy;
if (scrollbarDisplayPolicy != SCROLLBARS_ALWAYS
......
/* Scrollbar.java -- AWT Scrollbar widget
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -40,7 +40,6 @@ package java.awt;
import java.awt.peer.ScrollbarPeer;
import java.awt.peer.ComponentPeer;
import java.awt.event.AdjustmentListener;
import java.awt.event.AdjustmentEvent;
......@@ -126,7 +125,9 @@ private AdjustmentListener adjustment_listeners;
/**
* Initializes a new instance of <code>Scrollbar</code> with a
* veritical orientation and default values for all other parameters.
* vertical orientation and default values for all other parameters.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
Scrollbar()
......@@ -145,6 +146,7 @@ Scrollbar()
*
* @param orientation The orientation of this scrollbar.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
* @exception IllegalArgumentException If the orientation value is not valid.
*/
public
......@@ -168,12 +170,16 @@ Scrollbar(int orientation) throws IllegalArgumentException
* @param minimum The minimum value of the scrollbar.
* @param maximum The maximum value of the scrollbar.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
* @exception IllegalArgumentException If the orientation value is not valid.
*/
public
Scrollbar(int orientation, int value, int visibleAmount, int minimum,
int maximum) throws IllegalArgumentException
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
if ((orientation != HORIZONTAL) && (orientation != VERTICAL))
throw new IllegalArgumentException("Bad orientation value: "
+ orientation);
......
......@@ -109,6 +109,8 @@ private int scrollbarVisibility;
* Initialize a new instance of <code>TextArea</code> that is empty
* and is one row and one column. Both horizontal and vertical
* scrollbars will be used.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextArea()
......@@ -124,6 +126,8 @@ TextArea()
* scrollbars will be used.
*
* @param text The text to display in this text area.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextArea(String text)
......@@ -140,6 +144,8 @@ TextArea(String text)
*
* @param rows The number of rows in this text area.
* @param columns The number of columns in this text area.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextArea(int rows, int columns)
......@@ -156,6 +162,8 @@ TextArea(int rows, int columns)
* @param text The text to display in this text area.
* @param rows The number of rows in this text area.
* @param columns The number of columns in this text area.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextArea(String text, int rows, int columns)
......@@ -174,12 +182,17 @@ TextArea(String text, int rows, int columns)
* @param rows The number of rows in this text area.
* @param columns The number of columns in this text area.
* @param scrollbarVisibility Which scrollbars to display.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextArea(String text, int rows, int columns, int scrollbarVisibility)
{
super(text);
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
if ((rows < 1) || (columns < 0))
throw new IllegalArgumentException("Bad row or column value");
......
......@@ -84,9 +84,11 @@ private ActionListener action_listeners;
* Constructors
*/
/*
/**
* Initializes a new instance of <code>TextField</code> that is empty
* and has one column.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextField()
......@@ -102,6 +104,8 @@ TextField()
* length of the text string.
*
* @param text The text to display in the field.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextField(String text)
......@@ -116,6 +120,8 @@ TextField(String text)
* and has the specified number of columns.
*
* @param columns The number of columns in the text field.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextField(int columns)
......@@ -131,12 +137,17 @@ TextField(int columns)
*
* @param text The text to display in the field.
* @param columns The number of columns in the field.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true,
*/
public
TextField(String text, int columns)
{
super(text);
this.columns = columns;
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/*************************************************************************/
......
......@@ -44,7 +44,7 @@ package java.awt.color;
* @author Eric Blake <ebb9@email.byu.edu>
* @status updated to 1.4
*/
public class CMMException extends Exception
public class CMMException extends RuntimeException
{
/**
* Compatible with JDK 1.2+.
......
......@@ -46,7 +46,7 @@ import java.io.Serializable;
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
* @since 1.2
*/
public abstract class ColorSpace
public abstract class ColorSpace implements Serializable
{
/**
* Compatible with JDK 1.2+.
......
......@@ -245,7 +245,7 @@ public class ICC_Profile implements Serializable
write(new FileOutputStream(filename));
}
public void write(OutputStream out)
public void write(OutputStream out) throws IOException
{
throw new Error("not implemented");
}
......
......@@ -45,7 +45,7 @@ package java.awt.color;
* @author Eric Blake <ebb9@email.byu.edu>
* @status updated to 1.4
*/
public class ProfileDataException extends Exception
public class ProfileDataException extends RuntimeException
{
/**
* Compatible with JDK 1.2+.
......
......@@ -103,6 +103,8 @@ getName()
* Returns the contents of the clipboard.
*
* @param requestor The object requesting the contents.
*
* @exception IllegalStateException If the clipboard is currently unavailable
*/
public synchronized Transferable
getContents(Object requestor)
......@@ -120,6 +122,8 @@ getContents(Object requestor)
*
* @param contents The new clipboard contents.
* @param owner The new clipboard owner
*
* @exception IllegalStateException If the clipboard is currently unavailable
*/
public synchronized void
setContents(Transferable contents, ClipboardOwner owner)
......
......@@ -281,6 +281,7 @@ DataFlavor(Class representationClass, String humanPresentableName)
*
* @exception IllegalArgumentException If the representation class
* specified cannot be loaded.
* @exception ClassNotFoundException If the class is not loaded.
*/
public
DataFlavor(String mimeType, String humanPresentableName,
......@@ -504,6 +505,8 @@ setHumanPresentableName(String humanPresentableName)
*
* @return <code>true</code> if the MIME type is equal to this object's
* MIME type, <code>false</code> otherwise.
*
* @exception NullPointerException If mimeType is null.
*/
public final boolean
isMimeTypeEqual(String mimeType)
......@@ -652,6 +655,10 @@ isFlavorJavaFileListType()
* Returns a copy of this object.
*
* @return A copy of this object.
*
* @exception CloneNotSupportedException If the object's class does not support
* the Cloneable interface. Subclasses that override the clone method can also
* throw this exception to indicate that an instance cannot be cloned.
*/
public Object
clone()
......@@ -813,6 +820,8 @@ normalizeMimeType(String type)
* Serialize this class.
*
* @param stream The <code>ObjectOutput</code> stream to serialize to.
*
* @exception IOException If an error occurs.
*/
public void
writeExternal(ObjectOutput stream) throws IOException
......@@ -826,6 +835,10 @@ writeExternal(ObjectOutput stream) throws IOException
* De-serialize this class.
*
* @param stream The <code>ObjectInput</code> stream to deserialize from.
*
* @exception IOException If an error ocurs.
* @exception ClassNotFoundException If the class for an object being restored
* cannot be found.
*/
public void
readExternal(ObjectInput stream) throws IOException, ClassNotFoundException
......@@ -950,6 +963,10 @@ selectBestTextFlavor(DataFlavor[] availableFlavors)
*
* @param transferable The <code>Transferable</code> for which a text
* <code>Reader</code> is requested.
*
* @exception IllegalArgumentException If the representation class is not one
* of the seven listed above or the Transferable has null data.
* @exception NullPointerException If the Transferable is null.
* @exception UnsupportedFlavorException when the transferable doesn't
* support this <code>DataFlavor</code>. Or if the representable class
* isn't a (subclass of) <code>Reader</code>, <code>String</code>,
......
......@@ -47,8 +47,7 @@ import java.util.Map;
*/
public interface FlavorMap
{
/**
/**
* Maps the specified <code>DataFlavor</code> objects to the native
* data type name. The returned <code>Map</code> has keys that are
* the data flavors and values that are strings. The returned map
......@@ -59,12 +58,9 @@ public interface FlavorMap
*
* @return A <code>Map</code> of native data types.
*/
public abstract Map
getNativesForFlavors(DataFlavor[] flavors);
/*************************************************************************/
public abstract Map getNativesForFlavors (DataFlavor[] flavors);
/**
/**
* Maps the specified native type names to <code>DataFlavor</code>'s.
* The returned <code>Map</code> has keys that are strings and values
* that are <code>DataFlavor</code>'s. The returned map may be
......@@ -75,8 +71,5 @@ getNativesForFlavors(DataFlavor[] flavors);
*
* @return A <code>Map</code> of data flavors.
*/
public abstract Map
getFlavorsForNatives(String[] natives);
} // interface FlavorMap
public abstract Map getFlavorsForNatives (String[] natives);
}
......@@ -40,6 +40,7 @@ package java.awt.datatransfer;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
/**
* This class maps between native platform type names and DataFlavors.
......@@ -47,25 +48,24 @@ import java.util.Map;
* XXX - The current implementation does no mapping at all.
*
* @author Mark Wielaard (mark@klomp.org)
*
* @since 1.2
*/
public final class SystemFlavorMap implements FlavorMap
public final class SystemFlavorMap implements FlavorMap, FlavorTable
{
/**
/**
* The default (instance) flavor map.
*/
private static FlavorMap defaultFlavorMap;
private static FlavorMap defaultFlavorMap;
/**
/**
* Private constructor.
*/
private SystemFlavorMap()
{
}
private SystemFlavorMap ()
{
}
/*************************************************************************/
/**
/**
* Maps the specified <code>DataFlavor</code> objects to the native
* data type name. The returned <code>Map</code> has keys that are
* the data flavors and values that are strings. The returned map
......@@ -76,15 +76,12 @@ private SystemFlavorMap()
*
* @return A <code>Map</code> of native data types to data flavors.
*/
public Map
getNativesForFlavors(DataFlavor[] flavors)
{
return(new HashMap());
}
/*************************************************************************/
public Map getNativesForFlavors (DataFlavor[] flavors)
{
return new HashMap();
}
/**
/**
* Maps the specified native type names to <code>DataFlavor</code>'s.
* The returned <code>Map</code> has keys that are strings and values
* that are <code>DataFlavor</code>'s. The returned map may be
......@@ -95,86 +92,78 @@ getNativesForFlavors(DataFlavor[] flavors)
*
* @return A <code>Map</code> of data flavors to native type names.
*/
public Map
getFlavorsForNatives(String[] natives)
{
return(new HashMap());
}
public Map getFlavorsForNatives (String[] natives)
{
return new HashMap();
}
/*************************************************************************/
/**
/**
* Returns the default (instance) (System)FlavorMap.
*/
public static FlavorMap
getDefaultFlavorMap()
{
public static FlavorMap getDefaultFlavorMap ()
{
if (defaultFlavorMap == null)
defaultFlavorMap = new SystemFlavorMap();
return(defaultFlavorMap);
}
defaultFlavorMap = new SystemFlavorMap ();
/*************************************************************************/
return defaultFlavorMap;
}
/**
/**
* Returns the native type name for the given java mime type.
*/
public static String
encodeJavaMIMEType(String mime)
{
public static String encodeJavaMIMEType (String mime)
{
return null;
}
}
/*************************************************************************/
/**
/**
* Returns the native type name for the given data flavor.
*/
public static String
encodeDataFlavor(DataFlavor df)
{
public static String encodeDataFlavor (DataFlavor df)
{
return null;
}
}
/*************************************************************************/
/**
/**
* Returns true if the native type name can be represented as
* a java mime type.
*/
public static boolean
isJavaMIMEType(String name)
{
return(false);
}
/*************************************************************************/
public static boolean isJavaMIMEType (String name)
{
return false;
}
/**
/**
* Returns the java mime type for the given the native type name.
*/
public static String
decodeJavaMIMEType(String name)
{
public static String decodeJavaMIMEType (String name)
{
return null;
}
}
/*************************************************************************/
/**
/**
* Returns the data flavor given the native type name
* or null when no such data flavor exists.
*/
public static DataFlavor
decodeDataFlavor(String name) throws ClassNotFoundException
{
String javaMIMEType = decodeJavaMIMEType(name);
public static DataFlavor decodeDataFlavor (String name)
throws ClassNotFoundException
{
String javaMIMEType = decodeJavaMIMEType (name);
if (javaMIMEType != null)
return(new DataFlavor(javaMIMEType));
return new DataFlavor (javaMIMEType);
else
return(null);
}
return null;
}
} // class SystemFlavorMap
public List getFlavorsForNative (String nat)
{
throw new Error ("Not implemented");
}
public List getNativesForFlavor (DataFlavor flav)
{
throw new Error ("Not implemented");
}
} // class SystemFlavorMap
......@@ -113,15 +113,42 @@ public class DragGestureEvent extends EventObject
{
return null;
}
/**
* Starts the drag given the initial Cursor to display, the Transferable
* object, and the DragSourceListener to use.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(Cursor dragCursor, Transferable trans)
{
startDrag(dragCursor, null, null, trans, null);
}
/**
* Starts the drag given the initial Cursor to display, the Transferable
* object, and the DragSourceListener to use.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(Cursor dragCursor, Transferable trans,
DragSourceListener l)
{
startDrag(dragCursor, null, null, trans, l);
}
/**
* Starts the drag given the initial Cursor to display, the Transferable
* object, and the DragSourceListener to use.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset,
Transferable trans, DragSourceListener l)
{
......
......@@ -130,6 +130,12 @@ public abstract class DragGestureRecognizer implements Serializable
throw new Error("not implemented");
}
/**
* Register a new DragGestureListener.
*
* @exception TooManyListenersException If a DragGestureListener has already
* been added.
*/
public void addDragGestureListener(DragGestureListener dgl)
throws TooManyListenersException
{
......
......@@ -40,6 +40,8 @@ package java.awt.dnd;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.Image;
import java.awt.Point;
import java.awt.datatransfer.FlavorMap;
......@@ -62,10 +64,20 @@ public class DragSource implements Serializable
public static final Cursor DefaultMoveNoDrop = null;
public static final Cursor DefaultLinkNoDrop = null;
/**
* Initializes the drag source.
*
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public DragSource()
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException ();
}
/**
* @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
*/
public static DragSource getDefaultDragSource()
{
return null;
......@@ -76,6 +88,13 @@ public class DragSource implements Serializable
return false;
}
/**
* Start a drag, given the DragGestureEvent that initiated the drag.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Image dragImage, Point imageOffset,
Transferable trans, DragSourceListener dsl,
......@@ -83,6 +102,13 @@ public class DragSource implements Serializable
{
}
/**
* Start a drag, given the DragGestureEvent that initiated the drag.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Transferable trans, DragSourceListener dsl,
FlavorMap map)
......@@ -90,6 +116,13 @@ public class DragSource implements Serializable
startDrag(trigger, dragCursor, null, null, trans, dsl, map);
}
/**
* Start a drag, given the DragGestureEvent that initiated the drag.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Image dragImage, Point imageOffset,
Transferable trans, DragSourceListener dsl)
......@@ -97,12 +130,25 @@ public class DragSource implements Serializable
startDrag(trigger, dragCursor, dragImage, imageOffset, trans, dsl, null);
}
/**
* Start a drag, given the DragGestureEvent that initiated the drag.
*
* @exception InvalidDnDOperationException If the Drag and Drop system is
* unable to initiate a drag operation, or if the user attempts to start
* a drag while an existing drag operation is still executing.
*/
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Transferable trans, DragSourceListener dsl)
{
startDrag(trigger, dragCursor, null, null, trans, dsl, null);
}
/**
* Creates the DragSourceContext to handle this drag.
*
* @exception IllegalArgumentException FIXME
* @exception NullPointerException If dscp, dgl, dragImage or t is null.
*/
protected DragSourceContext
createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge,
Cursor cursor, Image image, Point offset,
......
......@@ -42,10 +42,13 @@ import java.awt.Component;
import java.awt.datatransfer.FlavorMap;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.Serializable;
import java.util.EventListener;
import java.util.TooManyListenersException;
/** STUB CLASS ONLY */
public class DropTarget
implements DropTargetListener, EventListener, Serializable
{
protected static class DropTargetAutoScroller
implements ActionListener
......@@ -67,6 +70,9 @@ public class DropTarget
}
}
// FIXME: check the correctness of default value.
private boolean isActive = false;
/**
* FIXME
*
......@@ -133,11 +139,12 @@ public class DropTarget
public void setActive(boolean isActive)
{
this.isActive = isActive;
}
public boolean isActive()
{
return false;
return this.isActive;
}
/**
......
......@@ -109,7 +109,7 @@ public class WindowEvent extends ComponentEvent
public static final int WINDOW_STATE_CHANGED = 209;
/** This is the last id in the range of event ids used by this class. */
public static final int WINDOW_LAST = 207;
public static final int WINDOW_LAST = 209;
/**
* The other Window involved in a focus or activation change. For
......
......@@ -84,7 +84,7 @@ public interface PathIterator
* (P1), and final interpolated control point (P2):
* <pre>
* P(t) = B(2,0)*CP + B(2,1)*P1 + B(2,2)*P2
* 0 <= t <= 1
* 0 &lt;= t &lt;= 1
* B(n,m) = mth coefficient of nth degree Bernstein polynomial
* = C(n,m) * t^(m) * (1 - t)^(n-m)
* C(n,m) = Combinations of n things, taken m at a time
......@@ -100,7 +100,7 @@ public interface PathIterator
* (P2), and final interpolated control point (P3):
* <pre>
* P(t) = B(3,0)*CP + B(3,1)*P1 + B(3,2)*P2 + B(3,3)*P3
* 0 <= t <= 1
* 0 &lt;= t &lt;= 1
* B(n,m) = mth coefficient of nth degree Bernstein polynomial
* = C(n,m) * t^(m) * (1 - t)^(n-m)
* C(n,m) = Combinations of n things, taken m at a time
......
......@@ -178,7 +178,7 @@ public class InputMethodHighlight
* @return the style map
* @since 1.3
*/
public Map getSytle()
public Map getStyle()
{
return style;
}
......
......@@ -97,7 +97,7 @@ public class PipedOutputStream extends OutputStream
*/
public void connect(PipedInputStream sink) throws IOException
{
if (sink != null)
if (this.sink != null || sink.source != null)
throw new IOException ("Already connected");
sink.connect(this);
}
......
......@@ -100,7 +100,7 @@ public class PipedWriter extends Writer
*/
public void connect(PipedReader sink) throws IOException
{
if (sink != null)
if (this.sink != null || sink.source != null)
throw new IOException ("Already connected");
sink.connect(this);
}
......
......@@ -172,7 +172,7 @@ public class RMIClassLoader
}
}
return loader != null ? loader.loadClass(name) : Class.forName(name);
return loader.loadClass(name);
}
public static String getClassAnnotation(Class cl)
......
/* RMIClassLoaderSpi.java
Copyright (c) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.rmi.server;
import java.net.MalformedURLException;
/**
* @author Michael Koch
* @since 1.4
*/
public abstract class RMIClassLoaderSpi
{
public RMIClassLoaderSpi()
{
}
public abstract Class loadClass (String codeBase, String name,
ClassLoader defaultLoader)
throws MalformedURLException, ClassNotFoundException;
public abstract Class loadProxyClass (String codeBase, String[] interfaces,
ClassLoader defaultLoader)
throws MalformedURLException, ClassNotFoundException;
public abstract ClassLoader getClassLoader (String codebase)
throws MalformedURLException;
public abstract String getClassAnnotation (Class cl);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment