Commit f7aa343f by Tom Tromey Committed by Tom Tromey

Applet.java, [...]: New versions from Classpath.

	* java/applet/Applet.java, java/applet/AppletContext.java,
	java/applet/AppletStub.java, java/applet/AudioClip.java,
	java/awt/CardLayout.java,
	java/awt/ContainerOrderFocusTraversalPolicy.java,
	java/awt/Cursor.java, java/awt/Event.java, java/awt/Frame.java,
	java/awt/GridBagConstraints.java, java/awt/GridBagLayout.java,
	java/awt/GridLayout.java, java/awt/color/ColorSpace.java,
	java/awt/color/ICC_ColorSpace.java,
	java/awt/color/ICC_Profile.java,
	java/awt/color/ICC_ProfileGray.java,
	java/awt/color/ICC_ProfileRGB.java,
	java/awt/datatransfer/DataFlavor.java,
	java/awt/dnd/DragSourceContext.java, java/awt/dnd/DropTarget.java,
	java/awt/dnd/DropTargetContext.java, java/awt/event/KeyEvent.java:
	New versions from Classpath.
	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added ICC_ProfileGray and
	ICC_ProfileRGB.

From-SVN: r58964
parent adf94cac
2002-11-09 Tom Tromey <tromey@redhat.com> 2002-11-09 Tom Tromey <tromey@redhat.com>
* java/applet/Applet.java, java/applet/AppletContext.java,
java/applet/AppletStub.java, java/applet/AudioClip.java,
java/awt/CardLayout.java,
java/awt/ContainerOrderFocusTraversalPolicy.java,
java/awt/Cursor.java, java/awt/Event.java, java/awt/Frame.java,
java/awt/GridBagConstraints.java, java/awt/GridBagLayout.java,
java/awt/GridLayout.java, java/awt/color/ColorSpace.java,
java/awt/color/ICC_ColorSpace.java,
java/awt/color/ICC_Profile.java,
java/awt/color/ICC_ProfileGray.java,
java/awt/color/ICC_ProfileRGB.java,
java/awt/datatransfer/DataFlavor.java,
java/awt/dnd/DragSourceContext.java, java/awt/dnd/DropTarget.java,
java/awt/dnd/DropTargetContext.java, java/awt/event/KeyEvent.java:
New versions from Classpath.
* Makefile.in: Rebuilt.
* Makefile.am (awt_java_source_files): Added ICC_ProfileGray and
ICC_ProfileRGB.
* java/awt/ScrollPane.java (ScrollPane): Fixed test for valid * java/awt/ScrollPane.java (ScrollPane): Fixed test for valid
display policy. display policy.
......
...@@ -678,6 +678,8 @@ java/awt/Window.java \ ...@@ -678,6 +678,8 @@ java/awt/Window.java \
java/awt/color/ColorSpace.java \ java/awt/color/ColorSpace.java \
java/awt/color/ICC_ColorSpace.java \ java/awt/color/ICC_ColorSpace.java \
java/awt/color/ICC_Profile.java \ java/awt/color/ICC_Profile.java \
java/awt/color/ICC_ProfileGray.java \
java/awt/color/ICC_ProfileRGB.java \
java/awt/color/CMMException.java \ java/awt/color/CMMException.java \
java/awt/color/ProfileDataException.java \ java/awt/color/ProfileDataException.java \
java/awt/datatransfer/Clipboard.java \ java/awt/datatransfer/Clipboard.java \
......
...@@ -435,6 +435,8 @@ java/awt/Window.java \ ...@@ -435,6 +435,8 @@ java/awt/Window.java \
java/awt/color/ColorSpace.java \ java/awt/color/ColorSpace.java \
java/awt/color/ICC_ColorSpace.java \ java/awt/color/ICC_ColorSpace.java \
java/awt/color/ICC_Profile.java \ java/awt/color/ICC_Profile.java \
java/awt/color/ICC_ProfileGray.java \
java/awt/color/ICC_ProfileRGB.java \
java/awt/color/CMMException.java \ java/awt/color/CMMException.java \
java/awt/color/ProfileDataException.java \ java/awt/color/ProfileDataException.java \
java/awt/datatransfer/Clipboard.java \ java/awt/datatransfer/Clipboard.java \
...@@ -2614,6 +2616,8 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \ ...@@ -2614,6 +2616,8 @@ DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
.deps/java/awt/Window.P .deps/java/awt/color/CMMException.P \ .deps/java/awt/Window.P .deps/java/awt/color/CMMException.P \
.deps/java/awt/color/ColorSpace.P .deps/java/awt/color/ICC_ColorSpace.P \ .deps/java/awt/color/ColorSpace.P .deps/java/awt/color/ICC_ColorSpace.P \
.deps/java/awt/color/ICC_Profile.P \ .deps/java/awt/color/ICC_Profile.P \
.deps/java/awt/color/ICC_ProfileGray.P \
.deps/java/awt/color/ICC_ProfileRGB.P \
.deps/java/awt/color/ProfileDataException.P \ .deps/java/awt/color/ProfileDataException.P \
.deps/java/awt/datatransfer/Clipboard.P \ .deps/java/awt/datatransfer/Clipboard.P \
.deps/java/awt/datatransfer/ClipboardOwner.P \ .deps/java/awt/datatransfer/ClipboardOwner.P \
......
/* Applet.java -- Java base applet class /* Applet.java -- Java base applet class
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
You should have received a copy of the GNU General Public License 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 along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. 02111-1307 USA.
Linking this library statically or dynamically with other modules is Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole conditions of the GNU General Public License cover the whole
...@@ -39,269 +39,469 @@ exception statement from your version. */ ...@@ -39,269 +39,469 @@ exception statement from your version. */
package java.applet; package java.applet;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.GraphicsEnvironment;
import java.awt.HeadlessException;
import java.awt.Image; import java.awt.Image;
import java.awt.Panel;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.util.Locale; import java.util.Locale;
import javax.accessibility.AccessibleContext;
import javax.accessibility.AccessibleRole;
import javax.accessibility.AccessibleState;
import javax.accessibility.AccessibleStateSet;
/** /**
* This is the base applet class. An applet is a Java program that * This is the base applet class. An applet is a Java program that
* runs inside a web browser or other applet viewer in a restricted * runs inside a web browser or other applet viewer in a restricted
* environment. * environment.
* *
* @author Aaron M. Renn (arenn@urbanophile.com) * <p>To be useful, a subclass should override at least start(). Also useful
*/ * are init, stop, and destroy for control purposes, and getAppletInfo and
public class Applet extends java.awt.Panel implements java.io.Serializable * getParameterInfo for descriptive purposes.
*
* @author Aaron M. Renn <arenn@urbanophile.com>
* @author Eric Blake <ebb9@email.byu.edu>
* @since 1.0
* @status updated to 1.4
*/
public class Applet extends Panel
{ {
// The applet stub for this applet /**
private AppletStub stub; * Compatible with JDK 1.0+.
*/
private static final long serialVersionUID = -5836846270535785031L;
/** The applet stub for this applet. */
private transient AppletStub stub;
/**
* The accessibility context for this applet.
*
* @serial the accessibleContext for this
* @since 1.2
*/
private AccessibleContext accessibleContext;
/**
* Default constructor for subclasses.
*
* @throws HeadlessException if in a headless environment
*/
public Applet()
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException();
}
/**
* The browser calls this method to set the applet's stub, which is the
* low level interface to the browser. Manually setting this to null is
* asking for problems down the road.
*
* @param stub the applet stub for this applet
*/
public final void setStub(AppletStub stub)
{
this.stub = stub;
}
/** /**
* Default constructor for subclasses. * Tests whether or not this applet is currently active. An applet is active
*/ * just before the browser invokes start(), and becomes inactive just
public Applet() {} * before the browser invokes stop().
*
* @return <code>true</code> if this applet is active
*/
public boolean isActive()
{
return stub.isActive();
}
/** /**
* Returns the URL of the document this applet is embedded in. * Returns the basename URL of the document this applet is embedded in. This
* * is everything up to the final '/'.
* @return The URL of the document this applet is embedded in. *
*/ * @return the URL of the document this applet is embedded in
* @see #getCodeBase()
*/
public URL getDocumentBase() public URL getDocumentBase()
{ {
return (stub.getDocumentBase ()); return stub.getDocumentBase();
} }
/** /**
* Returns the URL of the code base for this applet. * Returns the URL of the code base for this applet.
* *
* @return The URL of the code base for this applet. * @return the URL of the code base for this applet
*/ */
public URL getCodeBase() public URL getCodeBase()
{ {
return (stub.getCodeBase ()); return stub.getCodeBase();
} }
/** /**
* Returns the value of the specified parameter that was specified in * Returns the value of the specified parameter that was specified in
* the &lt;APPLET&gt; tag for this applet. * the <code>&lt;APPLET&gt;</code> tag for this applet.
* *
* @param name The parameter name. * @param name the parameter name
* * @return the parameter value, or null if the parameter does not exist
* @param value The parameter value, or <code>null</code> if the parameter * @throws NullPointerException if name is null
* does not exist. */
*/
public String getParameter(String name) public String getParameter(String name)
{ {
return (stub.getParameter (name)); return stub.getParameter(name);
} }
/** /**
* Returns the applet context for this applet. * Returns the applet context for this applet.
* *
* @return The applet context for this applet. * @return the applet context for this applet
*/ */
public AppletContext getAppletContext() public AppletContext getAppletContext()
{ {
return (stub.getAppletContext ()); return stub.getAppletContext();
} }
/** /**
* Tests whether or not this applet is currently active. * Requests that the applet window for this applet be resized.
* *
* @return <code>true</code> if this applet is active, <code>false</code> * @param width the new width in pixels
* otherwise. * @param height the new height in pixels
*/ */
public boolean isActive() public void resize(int width, int height)
{ {
return (stub.isActive ()); stub.appletResize(width, height);
} }
/** /**
* Requests that the applet window for this applet be resized. * Requests that the applet window for this applet be resized.
* *
* @param width The new width in pixels. * @param dim the requested dimensions
* @param height The new height in pixels. * @throws NullPointerException if dim is null
*/ */
public void resize(int width, int height) public void resize(Dimension dim)
{ {
stub.appletResize (width, height); resize(dim.width, dim.height);
} }
/** /**
* Requests that the applet window for this applet be resized. * Displays the specified message in the status window if that window
* * exists.
* @param dim The <code>Dimension</code> object with the requested *
* width and height. * @param message the status message, may be null
*/ */
public void resize(Dimension dim) public void showStatus(String message)
{
getAppletContext().showStatus(message);
}
/**
* Returns an image from the specified URL. Note that the image is not
* actually retrieved until the applet attempts to display it, so this
* method returns immediately.
*
* @param url the URL of the image
* @return the retrieved image
* @throws NullPointerException if url is null
*/
public Image getImage(URL url)
{ {
resize (dim.width, dim.height); return getAppletContext().getImage(url);
} }
/** /**
* Returns an audio clip from the specified URL. * Returns an image from the specified absolute URL, and relative path
* * from that URL. Note that the image is not actually retrieved until the
* @param url The URL of the audio clip. * applet attempts to display it, so this method returns immediately.
* * This calls <code>getImage(new URL(url, name))</code>, but if building
* @return The retrieved audio clip. * the new URL fails, this returns null.
*/ *
* @param url the base URL of the image
* @param name the name of the image relative to the URL
* @return the retrieved image, or null on failure
* @see #getImage(URL)
*/
public Image getImage(URL url, String name)
{
try
{
return getImage(new URL(url, name));
}
catch (MalformedURLException e)
{
return null;
}
}
/**
* Returns an audio clip from the specified URL. This clip is not tied to
* any particular applet.
*
* XXX Classpath does not yet implement this.
*
* @param url the URL of the audio clip
* @return the retrieved audio clip
* @throws NullPointerException if url is null
* @see #getAudioClip(URL)
* @since 1.2
*/
public static final AudioClip newAudioClip(URL url)
{
// This requires an implementation of AudioClip in gnu.java.applet.
throw new Error("Not implemented");
}
/**
* Returns an audio clip from the specified URL. Note that the clip is not
* actually retrieved until the applet attempts to play it, so this method
* returns immediately.
*
* @param url the URL of the audio clip
* @return the retrieved audio clip
* @throws NullPointerException if url is null
*/
public AudioClip getAudioClip(URL url) public AudioClip getAudioClip(URL url)
{ {
return (getAppletContext ().getAudioClip (url)); return getAppletContext().getAudioClip(url);
} }
/** /**
* Returns an audio clip from the specified URL and name * Returns an audio clip from the specified absolute URL, and relative path
* * from that URL. Note that the clip is not actually retrieved until the
* @param url The base URL of the audio clip. * applet attempts to play it, so this method returns immediately. This
* @param name The name of the clip relative to the URL. * calls <code>getAudioClip(new URL(url, name))</code>, but if building
* * the new URL fails, this returns null.
* @return The retrieved audio clip. *
*/ * @param url the base URL of the audio clip
* @param name the name of the clip relative to the URL
* @return the retrieved audio clip, or null on failure
* @see #getAudioClip(URL)
*/
public AudioClip getAudioClip(URL url, String name) public AudioClip getAudioClip(URL url, String name)
{ {
try try
{ {
return (getAppletContext ().getAudioClip (new URL (url.toExternalForm() return getAudioClip(new URL(url, name));
+ name)));
} }
catch(Exception e) catch (MalformedURLException e)
{ {
return (getAudioClip (url)); return null;
} }
} }
/** /**
* Loads and plays the audio clip pointed to by the specified URL. * Returns a descriptive string with applet defined information. The
* * implementation in this class returns <code>null</code>, so subclasses
* @param The URL of the audio clip. * must override to return information.
*/ *
public void play (URL url) * @return a string describing the author, version, and applet copyright
*/
public String getAppletInfo()
{ {
getAudioClip (url).play (); return null;
} }
/** /**
* Loads and plays the audio clip pointed to by the specified URL. * Returns the locale for this applet, if it has been set. If no applet
* * specific locale has been set, the default locale is returned.
* @param The base URL of the audio clip. *
* @param name The name of the audio clip relative to the URL. * @return the locale for this applet
*/ * @see Component#setLocale(Locale)
public void play (URL url, String name) * @since 1.1
*/
public Locale getLocale()
{ {
getAudioClip (url, name).play (); return super.getLocale();
} }
/** /**
* Returns an image from the specified URL. Note that the image is not * Returns a list of parameters this applet supports. Each element of
* actually retrieved until the applet attempts to display it, so this * the outer array is an array of three strings with the name of the
* method returns immediately. * parameter, the data type or valid values, and a description. This
* * method is optional and the default implementation returns null.
* @param url The URL of the image. *
* * @return the list of parameters supported by this applet
* @return The retrieved image. */
*/ public String[][] getParameterInfo()
public Image getImage(URL url)
{ {
return (getAppletContext ().getImage (url)); return null;
} }
/** /**
* Returns an image from the specified URL. Note that the image is not * Loads and plays the audio clip pointed to by the specified URL. This does
* actually retrieved until the applet attempts to display it, so this * nothing if the URL does not point to a valid audio clip.
* method returns immediately. *
* * @param url the URL of the audio clip
* @param url The base URL of the image. * @throws NullPointerException if url is null
* @param name The name of the image relative to the URL. * @see #getAudioClip(URL)
* */
* @return The retrieved image. public void play(URL url)
*/
public Image getImage(URL url, String name)
{ {
AudioClip ac = getAudioClip(url);
try try
{ {
return (getAppletContext ().getImage (new URL (url.toExternalForm() ac.play();
+ name)));
} }
catch(Exception e) catch (Exception ignored)
{ {
return (getImage (url));
} }
} }
/** /**
* Returns the locale for this applet, if it has been set. If no applet * Loads and plays the audio clip pointed to by the specified absolute URL,
* specific locale has been set, the default locale is returned. * and relative path from that URL. This does nothing if the URL cannot be
* * constructed, or if it does not point to a valid audio clip.
* @return The locale for this applet. *
*/ * @param url the base URL of the audio clip
public Locale getLocale() * @param name the name of the audio clip relative to the URL
* @see #getAudioClip(URL, String)
* @see #play(URL)
*/
public void play(URL url, String name)
{ {
return (super.getLocale ()); try
{
getAudioClip(url, name).play();
}
catch (Exception ignored)
{
}
} }
/** /**
* Returns a descriptive string with applet defined information. The * This method is called when the applet is first loaded, before start().
* implementation in this class returns <code>null</code>. Applets who * The default implementation does nothing; override to do any one-time
* wish to return this information should override. * initialization.
* *
* @return A string describing the applet. * @see #start()
*/ * @see #stop()
public String getAppletInfo() * @see #destroy()
*/
public void init()
{ {
return (null);
} }
/** /**
* Returns a list of parameters this applet supports. Each element of * This method is called when the applet should start running. This is
* the array is a list of three strings with the name of the parameter, * normally each time a web page containing it is loaded. The default
* the data type or valid values, and a description. This method is * implemention does nothing; override for your applet to be useful.
* optional and the default implementation returns <code>null</code>. *
* * @see #init()
* @return The list of parameters supported by this applet. * @see #stop()
*/ * @see #destroy()
public String[][] getParameterInfo() */
public void start()
{ {
return (null);
} }
/** /**
* This method is called when the applet is first loaded. The default * This method is called when the applet should stop running. This is
* implementation does nothing. Applets that wish to do one time * normally when the next web page is loaded. The default implementation
* initialization should override. * does nothing; override for your applet to stop using resources when
*/ * it is no longer visible, but may be restarted soon.
public void init() {} *
* @see #init()
* @see #start()
* @see #destroy()
*/
public void stop()
{
}
/** /**
* This method is called when the applet is being unloaded. The default * This method is called when the applet is being unloaded. The default
* implementation does nothing. Applets that need to clean up resources * implementation does nothing; override for your applet to clean up
* on exit should override. * resources on exit.
*/ *
public void destroy() {} * @see #init()
* @see #start()
* @see #stop()
*/
public void destroy()
{
}
/** /**
* This method is called when the applet should start running. This is * Gets the AccessibleContext associated with this applet, creating one if
* normally each time a web page containing it is loaded. The default * necessary. This always returns an instance of {@link AccessibleApplet}.
* implemention does nothing. Subclasses should override. *
*/ * @return the accessibility context of this applet
public void start() {} * @since 1.3
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleApplet();
return accessibleContext;
}
/** /**
* This method is called when the applet should stop running. This is * Read an applet from an object stream. This checks for a headless
* normally when the next web page is loaded. The default implementation * environment, then does the normal read.
* does nothing. *
*/ * @param s the stream to read from
public void stop() {} * @throws ClassNotFoundException if a class is not found
* @throws IOException if deserialization fails
* @throws HeadlessException if this is a headless environment
* @see GraphicsEnvironment#isHeadless()
* @since 1.4
*/
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException
{
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException();
s.defaultReadObject();
}
/** /**
* The browser calls this method to set the applet's stub, which is the * This class provides accessibility support for Applets, and is the
* low level interface to the browser. * runtime type returned by {@link #getAccessibleContext()}.
* *
* @param stub The applet stub for this applet. * @author Eric Blake <ebb9@email.byu.edu>
*/ * @since 1.3
public final void setStub (AppletStub stub) */
protected class AccessibleApplet extends AccessibleAWTPanel
{ {
this.stub = stub; /**
} * Compatible with JDK 1.4+.
*/
private static final long serialVersionUID = 8127374778187708896L;
} // class Applet /**
* The default constructor.
*/
protected AccessibleApplet()
{
}
/**
* Get the role of this accessible object, a frame.
*
* @return the role of the object
* @see AccessibleRole#FRAME
*/
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.FRAME;
}
/**
* Get the state set of this accessible object. In addition to the default
* states of a Component, the applet can also be active.
*
* @return the role of the object
* @see AccessibleState
*/
public AccessibleStateSet getAccessibleStateSet()
{
AccessibleStateSet s = super.getAccessibleStateSet();
if (isActive())
s.add(AccessibleState.ACTIVE);
return s;
}
} // class AccessibleApplet
} // class Applet
/* AppletContext.java -- Access the applet's runtime environment. /* AppletContext.java -- access the applet's runtime environment
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
You should have received a copy of the GNU General Public License 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 along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. 02111-1307 USA.
Linking this library statically or dynamically with other modules is Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole conditions of the GNU General Public License cover the whole
...@@ -39,81 +39,116 @@ exception statement from your version. */ ...@@ -39,81 +39,116 @@ exception statement from your version. */
package java.applet; package java.applet;
import java.awt.Image; import java.awt.Image;
import java.io.InputStream;
import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Iterator;
/** /**
* This interface allows an applet access to the browser to retrieve * This interface allows an applet access to the browser to retrieve
* additional data files and display documents. It also allows the * additional data files and display documents. It also allows the
* applet to find out other applets in the same document. * applet to find out other applets in the same document.
* *
* @author Aaron M. Renn (arenn@urbanophile.com) * @author Aaron M. Renn (arenn@urbanophile.com)
*/ * @since 1.0
* @status updated to 1.4
*/
public interface AppletContext public interface AppletContext
{ {
/** /**
* Returns an audio clip from the specified URL. * Returns an audio clip from the specified URL.
* *
* @param url The URL of the audio clip. * @param url the URL of the audio clip
* * @return the retrieved audio clip
* @return The retrieved audio clip // FIXME: What happens on error? * @throws NullPointerException if url is null
*/ */
AudioClip getAudioClip(URL url); AudioClip getAudioClip(URL url);
/** /**
* Returns an image from the specified URL. Note that the image is not * Returns an image from the specified URL. Note that the image is not
* actually retrieved until the applet attempts to display it, so this * actually retrieved until the applet attempts to display it, so this
* method returns immediately. * method returns immediately.
* *
* @param url The URL of the image. * @param url the absolute URL of the image
* * @return the retrieved image
* @return The retrieved image. // FIXME: What happens on eror? * @throws NullPointerException if url is null
*/ */
Image getImage(URL url); Image getImage(URL url);
/** /**
* Returns the applet in the document for this object that has the * Returns the applet in the document for this object that has the
* specified name. * specified name.
* *
* @param name The applet name. * @param name the applet name
* * @return the requested applet, or <code>null</code> if not found
* @return The requested applet, or <code>null</code> if an applet with */
* the requested name cannot be found.
*/
Applet getApplet(String name); Applet getApplet(String name);
/** /**
* Returns a list of all the applets in the document for this object. * Returns a list of all the applets in the document for this object.
* *
* @return A list of all the applets in the document for this object. * @return a list of all the applets
*/ */
Enumeration getApplets(); Enumeration getApplets();
/** /**
* Displays the web page pointed to by the specified URL in the window * Displays the web page pointed to by the specified URL in the window
* for this object. This page replaces the document that is currently * for this object. This page replaces the document that is currently
* there. * there.
* *
* @param url The URL of the web page to load. * @param url the URL of the web page to load; unspecified on an error
*/ */
void showDocument(URL url); void showDocument(URL url);
/** /**
* Displays the web page pointed to be the sepcified URL in the window * Displays the web page pointed to be the sepcified URL in the window
* with the specified name. The standard names "_top", "_blank", * with the specified name. The standard names "_top", "_blank",
* "_parent", and "_self" are allowed. * "_parent", and "_self" are allowed. An applet viewer may disregard
* * this request.
* @param url The URL of the web page to load. *
* @param target The target window. * @param url the URL of the web page to load
*/ * @param target the target window
*/
void showDocument(URL url, String target); void showDocument(URL url, String target);
/** /**
* Displays the specified message in the status window if that window * Displays the specified message in the status window if that window
* exists. * exists.
* *
* @param message The status message. * @param message the status message, may be null
*/ */
void showStatus(String message); void showStatus(String message);
/**
* Associate a stream to a key for this applet context, possibly replacing
* the old value. Stream associations are local to the applet context, for
* security purposes.
*
* @param key the key to associate with
* @param stream the stream value to tie to the key, or null to remove
* @throws IOException if the stream is too large
* @since 1.4
*/
public void setStream(String key, InputStream stream) throws IOException;
/**
* Return the stream associated with a given key in this applet context, or
* null if nothing is associated. Stream associations are local to the
* applet context, for security purposes.
*
* @param key the key to look up
* @return the associated stream, or null
* @since 1.4
*/
public InputStream getStream(String key);
/**
* Iterate over all keys that have associated streams. Sttream associated
* are local to the applet context, for security purposes.
*
* @return an iterator over the association keys
* @since 1.4
*/
public Iterator getStreamKeys();
} // interface AppletContext } // interface AppletContext
/* AppletStub.java -- Low level interface to the browser. /* AppletStub.java -- low level interface to the browser
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
You should have received a copy of the GNU General Public License 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 along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. 02111-1307 USA.
Linking this library statically or dynamically with other modules is Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole conditions of the GNU General Public License cover the whole
...@@ -40,60 +40,63 @@ package java.applet; ...@@ -40,60 +40,63 @@ package java.applet;
import java.net.URL; import java.net.URL;
/** /**
* This interface is the low level interface between the applet and the * This interface is the low level interface between the applet and the
* browser. * browser.
* *
* @author Aaron M. Renn (arenn@urbanophile.com) * @author Aaron M. Renn (arenn@urbanophile.com)
*/ * @see Applet#setStub(AppletStub)
* @since 1.0
* @status updated to 1.4
*/
public interface AppletStub public interface AppletStub
{ {
/** /**
* Returns the URL of the document this applet is embedded in. * Tests whether or not this applet is currently active. An applet is active
* * just before the browser invokes start(), and becomes inactive just
* @return The URL of the document this applet is embedded in. * before the browser invokes stop().
*/ *
* @return <code>true</code> if this applet is active
*/
boolean isActive();
/**
* Returns the basename URL of the document this applet is embedded in. This
* is everything up to the final '/'.
*
* @return the URL of the document this applet is embedded in
* @see #getCodeBase()
*/
URL getDocumentBase(); URL getDocumentBase();
/** /**
* Returns the URL of the code base for this applet. * Returns the URL of the code base for this applet.
* *
* @return The URL of the code base for this applet. * @return the URL of the code base for this applet
*/ */
URL getCodeBase(); URL getCodeBase();
/** /**
* Returns the value of the specified parameter that was specified in * Returns the value of the specified parameter that was specified in
* the &lt;APPLET&gt; tag for this applet. * the <code>&lt;APPLET&gt;</code> tag for this applet.
* *
* @param name The parameter name. * @param name the parameter name
* * @return the parameter value, or null if the parameter does not exist
* @param value The parameter value, or <code>null</code> if the parameter * @throws NullPointerException if name is null
* does not exist. */
*/
String getParameter(String name); String getParameter(String name);
/** /**
* Returns the applet context for this applet. * Returns the applet context for this applet.
* *
* @return The applet context for this applet. * @return the applet context for this applet
*/ */
AppletContext getAppletContext(); AppletContext getAppletContext();
/** /**
* Tests whether or not this applet is currently active. * Requests that the applet window for this applet be resized.
* *
* @return <code>true</code> if this applet is active, <code>false</code> * @param width the new width in pixels
* otherwise. * @param height the new height in pixels
*/ */
boolean isActive();
/**
* Requests that the applet window for this applet be resized.
*
* @param width The new width in pixels.
* @param height The new height in pixels.
*/
void appletResize(int width, int height); void appletResize(int width, int height);
} // interface AppletStub } // interface AppletStub
/* AudioClip.java -- Play an audio clip. /* AudioClip.java -- play an audio clip in an applet
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
You should have received a copy of the GNU General Public License 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 along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. 02111-1307 USA.
Linking this library statically or dynamically with other modules is Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole conditions of the GNU General Public License cover the whole
...@@ -39,26 +39,29 @@ exception statement from your version. */ ...@@ -39,26 +39,29 @@ exception statement from your version. */
package java.applet; package java.applet;
/** /**
* This interface provides a simple mechanism for playing audio clips. * This interface provides a simple mechanism for playing audio clips.
* * If multiple clips are played at once, the browser combines them into a
* @author Aaron M. Renn (arenn@urbanophile.com) * composite clip.
*/ *
* @author Aaron M. Renn (arenn@urbanophile.com)
* @since 1.0
* @status updated to 1.4
*/
public interface AudioClip public interface AudioClip
{ {
/** /**
* Plays the audio clip starting from the beginning. * Plays the audio clip starting from the beginning.
*/ */
void play(); void play();
/** /**
* Stops playing this audio clip. There is no mechanism for restarting * Stops playing this audio clip. There is no mechanism for restarting
* at the point where the clip is stopped. * at the point where the clip is stopped.
*/ */
void stop(); void stop();
/** /**
* Plays this audio clip in a continuous loop. * Plays this audio clip in a continuous loop.
*/ */
void loop(); void loop();
} // interface AudioClip } // interface AudioClip
...@@ -53,6 +53,8 @@ import java.io.Serializable; ...@@ -53,6 +53,8 @@ import java.io.Serializable;
*/ */
public class CardLayout implements LayoutManager2, Serializable public class CardLayout implements LayoutManager2, Serializable
{ {
static final long serialVersionUID = -4328196481005934313L;
/** /**
* Initializes a new instance of <code>CardLayout</code> with horizontal * Initializes a new instance of <code>CardLayout</code> with horizontal
* and vertical gaps of 0. * and vertical gaps of 0.
......
...@@ -46,6 +46,8 @@ import java.io.Serializable; ...@@ -46,6 +46,8 @@ import java.io.Serializable;
public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
implements Serializable implements Serializable
{ {
static final long serialVersionUID = 486933713763926351L;
private boolean downCycle = true; private boolean downCycle = true;
public ContainerOrderFocusTraversalPolicy() public ContainerOrderFocusTraversalPolicy()
......
...@@ -44,6 +44,8 @@ package java.awt; ...@@ -44,6 +44,8 @@ package java.awt;
*/ */
public class Cursor implements java.io.Serializable public class Cursor implements java.io.Serializable
{ {
static final long serialVersionUID = 8028237497568985504L;
/** /**
* Constant for the system default cursor type * Constant for the system default cursor type
*/ */
......
...@@ -45,71 +45,73 @@ package java.awt; ...@@ -45,71 +45,73 @@ package java.awt;
public class Event implements java.io.Serializable public class Event implements java.io.Serializable
{ {
public static final int SHIFT_MASK = 1, static final long serialVersionUID = 5488922509400504703L;
CTRL_MASK = 2,
META_MASK = 4, public static final int SHIFT_MASK = 1;
ALT_MASK = 8; public static final int CTRL_MASK = 2;
public static final int META_MASK = 4;
public static final int ACTION_EVENT = 1001, public static final int ALT_MASK = 8;
BACK_SPACE = 8,
CAPS_LOCK = 1022, public static final int ACTION_EVENT = 1001;
DELETE = 127, public static final int BACK_SPACE = 8;
DOWN = 1005, public static final int CAPS_LOCK = 1022;
END = 1001, public static final int DELETE = 127;
ENTER = 10, public static final int DOWN = 1005;
ESCAPE = 27, public static final int END = 1001;
F1 = 1008, public static final int ENTER = 10;
F10 = 1017, public static final int ESCAPE = 27;
F11 = 1018, public static final int F1 = 1008;
F12 = 1019, public static final int F10 = 1017;
F2 = 1009, public static final int F11 = 1018;
F3 = 1010, public static final int F12 = 1019;
F4 = 1011, public static final int F2 = 1009;
F5 = 1012, public static final int F3 = 1010;
F6 = 1013, public static final int F4 = 1011;
F7 = 1014, public static final int F5 = 1012;
F8 = 1015, public static final int F6 = 1013;
F9 = 1016, public static final int F7 = 1014;
GOT_FOCUS = 1004, public static final int F8 = 1015;
HOME = 1000, public static final int F9 = 1016;
INSERT = 1025, public static final int GOT_FOCUS = 1004;
KEY_ACTION = 403, public static final int HOME = 1000;
KEY_ACTION_RELEASE = 404, public static final int INSERT = 1025;
KEY_PRESS = 401, public static final int KEY_ACTION = 403;
KEY_RELEASE = 402, public static final int KEY_ACTION_RELEASE = 404;
LEFT = 1006, public static final int KEY_PRESS = 401;
LIST_DESELECT = 702, public static final int KEY_RELEASE = 402;
LIST_SELECT = 701, public static final int LEFT = 1006;
LOAD_FILE = 1002, public static final int LIST_DESELECT = 702;
LOST_FOCUS = 1005, public static final int LIST_SELECT = 701;
MOUSE_DOWN = 501, public static final int LOAD_FILE = 1002;
MOUSE_DRAG = 506, public static final int LOST_FOCUS = 1005;
MOUSE_ENTER = 504, public static final int MOUSE_DOWN = 501;
MOUSE_EXIT = 505, public static final int MOUSE_DRAG = 506;
MOUSE_MOVE = 503, public static final int MOUSE_ENTER = 504;
MOUSE_UP = 502, public static final int MOUSE_EXIT = 505;
NUM_LOCK = 1023, public static final int MOUSE_MOVE = 503;
PAUSE = 1024, public static final int MOUSE_UP = 502;
PGDN = 1003, public static final int NUM_LOCK = 1023;
PGUP = 1002, public static final int PAUSE = 1024;
PRINT_SCREEN = 1020, public static final int PGDN = 1003;
RIGHT = 1007, public static final int PGUP = 1002;
SAVE_FILE = 1003, public static final int PRINT_SCREEN = 1020;
SCROLL_ABSOLUTE = 605, public static final int RIGHT = 1007;
SCROLL_BEGIN = 606, public static final int SAVE_FILE = 1003;
SCROLL_END = 607, public static final int SCROLL_ABSOLUTE = 605;
SCROLL_LINE_DOWN = 602, public static final int SCROLL_BEGIN = 606;
SCROLL_LINE_UP = 601, public static final int SCROLL_END = 607;
SCROLL_LOCK = 1021, public static final int SCROLL_LINE_DOWN = 602;
SCROLL_PAGE_DOWN = 604, public static final int SCROLL_LINE_UP = 601;
SCROLL_PAGE_UP = 603, public static final int SCROLL_LOCK = 1021;
TAB = 9, public static final int SCROLL_PAGE_DOWN = 604;
UP = 1004, public static final int SCROLL_PAGE_UP = 603;
WINDOW_DEICONIFY = 204, public static final int TAB = 9;
WINDOW_DESTROY = 201, public static final int UP = 1004;
WINDOW_EXPOSE = 202, public static final int WINDOW_DEICONIFY = 204;
WINDOW_ICONIFY = 203, public static final int WINDOW_DESTROY = 201;
WINDOW_MOVED = 205; public static final int WINDOW_EXPOSE = 202;
public static final int WINDOW_ICONIFY = 203;
public static final int WINDOW_MOVED = 205;
public Object arg; public Object arg;
public int clickCount; public int clickCount;
......
...@@ -60,6 +60,12 @@ public class Frame extends Window implements MenuContainer, Serializable ...@@ -60,6 +60,12 @@ public class Frame extends Window implements MenuContainer, Serializable
*/ */
/** /**
* Constant for the default cursor.
* Deprecated. replaced by <code>Cursor.DEFAULT_CURSOR</code> instead.
*/
public static final int DEFAULT_CURSOR = Cursor.DEFAULT_CURSOR;
/**
* Constant for a cross-hair cursor. * Constant for a cross-hair cursor.
* @deprecated Use <code>Cursor.CROSSHAIR_CURSOR</code> instead. * @deprecated Use <code>Cursor.CROSSHAIR_CURSOR</code> instead.
*/ */
...@@ -137,6 +143,12 @@ public static final int HAND_CURSOR = Cursor.HAND_CURSOR; ...@@ -137,6 +143,12 @@ public static final int HAND_CURSOR = Cursor.HAND_CURSOR;
*/ */
public static final int MOVE_CURSOR = Cursor.MOVE_CURSOR; public static final int MOVE_CURSOR = Cursor.MOVE_CURSOR;
public static final int ICONIFIED = 1;
public static final int MAXIMIZED_BOTH = 6;
public static final int MAXIMIZED_HORIZ = 2;
public static final int MAXIMIZED_VERT = 4;
public static final int NORMAL = 0;
// Serialization version constant // Serialization version constant
private static final long serialVersionUID = 2673458971256075116L; private static final long serialVersionUID = 2673458971256075116L;
......
...@@ -45,6 +45,8 @@ import java.io.Serializable; ...@@ -45,6 +45,8 @@ import java.io.Serializable;
* GridBagLayout layout manager. */ * GridBagLayout layout manager. */
public class GridBagConstraints implements Cloneable, Serializable public class GridBagConstraints implements Cloneable, Serializable
{ {
static final long serialVersionUID = -1000070633030801713L;
/** Fill in both directions. */ /** Fill in both directions. */
public static final int BOTH = 1; public static final int BOTH = 1;
/** Don't fill. */ /** Don't fill. */
......
...@@ -45,6 +45,8 @@ import java.io.Serializable; ...@@ -45,6 +45,8 @@ import java.io.Serializable;
public class GridBagLayout public class GridBagLayout
implements Serializable, LayoutManager2 implements Serializable, LayoutManager2
{ {
static final long serialVersionUID = 8838754796412211005L;
public void addLayoutComponent(String name, Component component) public void addLayoutComponent(String name, Component component)
{ {
} }
......
...@@ -58,6 +58,8 @@ import java.io.Serializable; ...@@ -58,6 +58,8 @@ import java.io.Serializable;
*/ */
public class GridLayout implements LayoutManager, Serializable public class GridLayout implements LayoutManager, Serializable
{ {
static final long serialVersionUID = -7411804673224730901L;
/** Add a new component to the layout. This particular implementation /** Add a new component to the layout. This particular implementation
* does nothing. * does nothing.
* @param name The name of the component to add. * @param name The name of the component to add.
......
/* Copyright (C) 2000, 2002 Free Software Foundation /* ColorSpace.java -- transforms between color spaces
Copyright (C) 2000, 2002 Free Software Foundation
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -34,25 +35,36 @@ this exception to your version of the library, but you are not ...@@ -34,25 +35,36 @@ 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 obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package java.awt.color; package java.awt.color;
import java.io.Serializable;
/** /**
* NEEDS DOCUMENTATION
*
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no> * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
* @since 1.2
*/ */
public abstract class ColorSpace public abstract class ColorSpace
{ {
public static final int TYPE_XYZ = 0; /**
public static final int TYPE_Lab = 1; * Compatible with JDK 1.2+.
public static final int TYPE_Luv = 2; */
private static final long serialVersionUID = -409452704308689724L;
public static final int TYPE_XYZ = 0;
public static final int TYPE_Lab = 1;
public static final int TYPE_Luv = 2;
public static final int TYPE_YCbCr = 3; public static final int TYPE_YCbCr = 3;
public static final int TYPE_Yxy = 4; public static final int TYPE_Yxy = 4;
public static final int TYPE_RGB = 5; public static final int TYPE_RGB = 5;
public static final int TYPE_GRAY = 6; public static final int TYPE_GRAY = 6;
public static final int TYPE_HSV = 7; public static final int TYPE_HSV = 7;
public static final int TYPE_HLS = 8; public static final int TYPE_HLS = 8;
public static final int TYPE_CMYK = 9; public static final int TYPE_CMYK = 9;
// mysterious gap in the enumeration sequenece // mysterious gap in the enumeration sequenece
public static final int TYPE_CMY = 11; public static final int TYPE_CMY = 11;
public static final int TYPE_2CLR = 12; public static final int TYPE_2CLR = 12;
public static final int TYPE_3CLR = 13; public static final int TYPE_3CLR = 13;
public static final int TYPE_4CLR = 14; public static final int TYPE_4CLR = 14;
...@@ -67,54 +79,64 @@ public abstract class ColorSpace ...@@ -67,54 +79,64 @@ public abstract class ColorSpace
public static final int TYPE_DCLR = 23; public static final int TYPE_DCLR = 23;
public static final int TYPE_ECLR = 24; public static final int TYPE_ECLR = 24;
public static final int TYPE_FCLR = 25; public static final int TYPE_FCLR = 25;
public static final int CS_sRGB = 1000; public static final int CS_sRGB = 1000;
public static final int CS_CIEXYZ = 1001;
public static final int CS_PYCC = 1002;
public static final int CS_GRAY = 1003;
public static final int CS_LINEAR_RGB = 1004; public static final int CS_LINEAR_RGB = 1004;
public static final int CS_CIEXYZ = 1001;
private static final int CS_BASE = CS_sRGB; public static final int CS_PYCC = 1002;
private static final int CS_END = CS_LINEAR_RGB+1; public static final int CS_GRAY = 1003;
private static final int CS_BASE = CS_sRGB;
private static final int CS_END = CS_LINEAR_RGB + 1;
private static final int CS_COUNT = CS_END - CS_BASE; private static final int CS_COUNT = CS_END - CS_BASE;
// Instances are lazily instantiated // Instances are lazily instantiated
private static final ColorSpace[] INSTANCES = new ColorSpace[CS_COUNT]; private static final ColorSpace[] INSTANCES = new ColorSpace[CS_COUNT];
private int type; /**
private int numcomponents; * @serial
*/
// Visible in subclass.
final int type;
/**
* @serial
*/
// Visible in subclass.
final int numComponents;
protected ColorSpace(int type, int numcomponents) protected ColorSpace(int type, int numcomponents)
{ {
this.type = type; this.type = type;
this.numcomponents = numcomponents; numComponents = numcomponents;
} }
public static ColorSpace getInstance(int colorspace) public static ColorSpace getInstance(int colorspace)
{ {
if ((colorspace >= CS_BASE) && (colorspace < CS_END)) if ((colorspace >= CS_BASE) && (colorspace < CS_END))
{ {
int instanceIndex = colorspace - CS_BASE; int instanceIndex = colorspace - CS_BASE;
if (INSTANCES[instanceIndex] == null) if (INSTANCES[instanceIndex] == null)
{ {
ICC_Profile profile = new ICC_Profile(colorspace); ICC_Profile profile = new ICC_Profile(colorspace);
INSTANCES[instanceIndex] = new ICC_ColorSpace(profile); INSTANCES[instanceIndex] = new ICC_ColorSpace(profile);
} }
return INSTANCES[instanceIndex]; return INSTANCES[instanceIndex];
} }
throw new IllegalArgumentException("unknown/unsupported colorspace"); throw new IllegalArgumentException("unknown/unsupported colorspace");
} }
public boolean isCS_sRGB() public boolean isCS_sRGB()
{ {
return false; return false;
} }
public abstract float[] toRGB(float[] colorvalue); public abstract float[] toRGB(float[] colorvalue);
public abstract float[] fromRGB(float[] rgbvalue); public abstract float[] fromRGB(float[] rgbvalue);
public abstract float[] toCIEXYZ(float[] colorvalue); public abstract float[] toCIEXYZ(float[] colorvalue);
public abstract float[] fromCIEXYZ(float[] colorvalue); public abstract float[] fromCIEXYZ(float[] colorvalue);
public int getType() public int getType()
...@@ -124,16 +146,31 @@ public abstract class ColorSpace ...@@ -124,16 +146,31 @@ public abstract class ColorSpace
public int getNumComponents() public int getNumComponents()
{ {
return numcomponents; return numComponents;
} }
public String getName(int idx) public String getName(int idx)
{ {
return "type " + type; return "type " + type;
} }
public String toString() /**
* @since 1.4
*/
public float getMinValue(int idx)
{
if (idx < 0 || idx >= numComponents)
throw new IllegalArgumentException();
return 0;
}
/**
* @since 1.4
*/
public float getMaxValue(int idx)
{ {
return getClass().getName() + "[type=" + type + "]"; if (idx < 0 || idx >= numComponents)
throw new IllegalArgumentException();
return 1;
} }
} } // class ColorSpace
/* Copyright (C) 2000, 2002 Free Software Foundation /* ICC_ColorSpace.java -- the canonical color space implementation
Copyright (C) 2000, 2002 Free Software Foundation
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -34,25 +35,61 @@ this exception to your version of the library, but you are not ...@@ -34,25 +35,61 @@ 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 obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package java.awt.color; package java.awt.color;
/** /**
* NEEDS DOCUMENTATION
*
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no> * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
* @since 1.2
*/ */
public class ICC_ColorSpace extends ColorSpace public class ICC_ColorSpace extends ColorSpace
{ {
private ICC_Profile profile; /**
* Compatible with JDK 1.2+.
*/
private static final long serialVersionUID = 3455889114070431483L;
/**
* @serial
*/
private ICC_Profile thisProfile;
/**
* @serial
*/
private float[] minVal;
/**
* @serial
*/
private float[] maxVal;
/**
* @serial
*/
private float[] diffMinMax;
/**
* @serial
*/
private float[] invDiffMinMax;
/**
* @serial
*/
private boolean needScaleInit;
public ICC_ColorSpace(ICC_Profile profile) public ICC_ColorSpace(ICC_Profile profile)
{ {
super(CS_sRGB, profile.getNumComponents()); super(CS_sRGB, profile.getNumComponents());
thisProfile = profile;
this.profile = profile;
} }
public ICC_Profile getProfile() public ICC_Profile getProfile()
{ {
return profile; return thisProfile;
} }
public float[] toRGB(float[] colorvalue) public float[] toRGB(float[] colorvalue)
...@@ -80,26 +117,33 @@ public class ICC_ColorSpace extends ColorSpace ...@@ -80,26 +117,33 @@ public class ICC_ColorSpace extends ColorSpace
} }
/** /**
* @param component The index of the color component * @since 1.4
*
* @exception IllegalArgumentException If <code>component<code> is less
* then 0 or greater then <code>numComponents - 1</code>
*/ */
public float getMinValue (int component) public float getMinValue(int idx)
{ {
// FIXME: Not implemented if (type == TYPE_Lab && (idx == 1 || idx == 2))
throw new UnsupportedOperationException(); return -128;
if (idx < 0 || idx >= numComponents)
throw new IllegalArgumentException();
return 0;
} }
/** /**
* @param component The index of the color component * @since 1.4
*
* @exception IllegalArgumentException If <code>component<code> is less
* then 0 or greater then <code>numComponents - 1</code>
*/ */
public float getMaxValue (int component) public float getMaxValue(int idx)
{ {
// FIXME: Not implemented if (type == TYPE_XYZ && idx >= 0 && idx <= 2)
throw new UnsupportedOperationException(); return 1 + 32767 / 32768f;
else if (type == TYPE_Lab)
{
if (idx == 0)
return 100;
if (idx == 1 || idx == 2)
return 127;
}
if (idx < 0 || idx >= numComponents)
throw new IllegalArgumentException();
return 1;
} }
} } // class ICC_ColorSpace
/* Copyright (C) 2000, 2002 Free Software Foundation /* ICC_Profile.java -- color space profiling
Copyright (C) 2000, 2002 Free Software Foundation
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -34,46 +35,79 @@ this exception to your version of the library, but you are not ...@@ -34,46 +35,79 @@ 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 obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package java.awt.color; package java.awt.color;
// Currently just a stub. import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamException;
import java.io.OutputStream;
import java.io.Serializable;
/** /**
* STUBBED
* @author Rolf W. Rasmussen <rolfwr@ii.uib.no> * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
* @since 1.2
*/ */
public class ICC_Profile public class ICC_Profile implements Serializable
{ {
public static final int CLASS_ABSTRACT = 5; /**
public static final int CLASS_COLORSPACECONVERSION = 4; * Compatible with JDK 1.2+.
public static final int CLASS_DEVICELINK = 3; */
public static final int CLASS_DISPLAY = 1; private static final long serialVersionUID = -3938515861990936766L;
public static final int CLASS_INPUT = 0; public static final int CLASS_INPUT = 0;
public static final int CLASS_NAMEDCOLOR = 6; public static final int CLASS_DISPLAY = 1;
public static final int CLASS_OUTPUT = 2; public static final int CLASS_OUTPUT = 2;
public static final int CLASS_DEVICELINK = 3;
public static final int icAbsoluteColorimetric = 3; public static final int CLASS_COLORSPACECONVERSION = 4;
public static final int icCurveCount = 8; public static final int CLASS_ABSTRACT = 5;
public static final int icCurveData = 12; public static final int CLASS_NAMEDCOLOR = 6;
public static final int icHdrAttributes = 56;
public static final int icHdrCmmId = 4; public static final int icSigXYZData = 1482250784;
public static final int icHdrColorSpace = 16; public static final int icSigLabData = 1281450528;
public static final int icHdrCreator = 80; public static final int icSigLuvData = 1282766368;
public static final int icHdrDate = 24; public static final int icSigYCbCrData = 1497588338;
public static final int icHdrDeviceClass = 12; public static final int icSigYxyData = 1501067552;
public static final int icHdrFlags = 44; public static final int icSigRgbData = 1380401696;
public static final int icHdrIlluminant = 68; public static final int icSigGrayData = 1196573017;
public static final int icHdrMagic = 36; public static final int icSigHsvData = 1213421088;
public static final int icHdrManufacturer = 48; public static final int icSigHlsData = 1212961568;
public static final int icHdrModel = 52; public static final int icSigCmykData = 1129142603;
public static final int icHdrPcs = 20; public static final int icSigCmyData = 1129142560;
public static final int icHdrPlatform = 40; public static final int icSigSpace2CLR = 843271250;
public static final int icHdrRenderingIntent = 64; public static final int icSigSpace3CLR = 860048466;
public static final int icHdrSize = 0; public static final int icSigSpace4CLR = 876825682;
public static final int icHdrVersion = 8; public static final int icSigSpace5CLR = 893602898;
public static final int icSigSpace6CLR = 910380114;
public static final int icSigSpace7CLR = 927157330;
public static final int icSigSpace8CLR = 943934546;
public static final int icSigSpace9CLR = 960711762;
public static final int icSigSpaceACLR = 1094929490;
public static final int icSigSpaceBCLR = 1111706706;
public static final int icSigSpaceCCLR = 1128483922;
public static final int icSigSpaceDCLR = 1145261138;
public static final int icSigSpaceECLR = 1162038354;
public static final int icSigSpaceFCLR = 1178815570;
public static final int icSigInputClass = 1935896178;
public static final int icSigDisplayClass = 1835955314;
public static final int icSigOutputClass = 1886549106;
public static final int icSigLinkClass = 1818848875;
public static final int icSigAbstractClass = 1633842036;
public static final int icSigColorSpaceClass = 1936744803;
public static final int icSigNamedColorClass = 1852662636;
public static final int icPerceptual = 0; public static final int icPerceptual = 0;
public static final int icRelativeColorimetric = 1; public static final int icRelativeColorimetric = 1;
public static final int icSaturation = 2; public static final int icSaturation = 2;
public static final int icSigAbstractClass = 1633842036; public static final int icAbsoluteColorimetric = 3;
public static final int icSigHead = 1751474532;
public static final int icSigAToB0Tag = 1093812784; public static final int icSigAToB0Tag = 1093812784;
public static final int icSigAToB1Tag = 1093812785; public static final int icSigAToB1Tag = 1093812785;
public static final int icSigAToB2Tag = 1093812786; public static final int icSigAToB2Tag = 1093812786;
...@@ -84,35 +118,20 @@ public class ICC_Profile ...@@ -84,35 +118,20 @@ public class ICC_Profile
public static final int icSigBToA2Tag = 1110589746; public static final int icSigBToA2Tag = 1110589746;
public static final int icSigCalibrationDateTimeTag = 1667329140; public static final int icSigCalibrationDateTimeTag = 1667329140;
public static final int icSigCharTargetTag = 1952543335; public static final int icSigCharTargetTag = 1952543335;
public static final int icSigChromaticityTag = 1667789421;
public static final int icSigCmyData = 1129142560;
public static final int icSigCmykData = 1129142603;
public static final int icSigColorSpaceClass = 1936744803;
public static final int icSigCopyrightTag = 1668313716; public static final int icSigCopyrightTag = 1668313716;
public static final int icSigCrdInfoTag = 1668441193; public static final int icSigCrdInfoTag = 1668441193;
public static final int icSigDeviceMfgDescTag = 1684893284; public static final int icSigDeviceMfgDescTag = 1684893284;
public static final int icSigDeviceModelDescTag = 1684890724; public static final int icSigDeviceModelDescTag = 1684890724;
public static final int icSigDeviceSettingsTag = 1684371059; public static final int icSigDeviceSettingsTag = 1684371059;
public static final int icSigDisplayClass = 1835955314;
public static final int icSigGamutTag = 1734438260; public static final int icSigGamutTag = 1734438260;
public static final int icSigGrayData = 1196573017;
public static final int icSigGrayTRCTag = 1800688195; public static final int icSigGrayTRCTag = 1800688195;
public static final int icSigGreenColorantTag = 1733; public static final int icSigGreenColorantTag = 1733843290;
public static final int icSigGreenTRCTag = 1733579331; public static final int icSigGreenTRCTag = 1733579331;
public static final int icSigHead = 1751474532;
public static final int icSigHlsData = 1212961568;
public static final int icSigHsvData = 1213421088;
public static final int icSigInputClass = 1935896178;
public static final int icSigLabData = 1281450528;
public static final int icSigLinkClass = 1818848875;
public static final int icSigLuminanceTag = 1819635049; public static final int icSigLuminanceTag = 1819635049;
public static final int icSigLuvData = 1282766368;
public static final int icSigMeasurementTag = 1835360627; public static final int icSigMeasurementTag = 1835360627;
public static final int icSigMediaBlackPointTag = 1651208308; public static final int icSigMediaBlackPointTag = 1651208308;
public static final int icSigMediaWhitePointTag = 2004119668; public static final int icSigMediaWhitePointTag = 2004119668;
public static final int icSigNamedColor2Tag = 1852009522; public static final int icSigNamedColor2Tag = 1852009522;
public static final int icSigNamedColorClass = 1852662636;
public static final int icSigOutputClass = 1886549106;
public static final int icSigOutputResponseTag = 1919251312; public static final int icSigOutputResponseTag = 1919251312;
public static final int icSigPreview0Tag = 1886545200; public static final int icSigPreview0Tag = 1886545200;
public static final int icSigPreview1Tag = 1886545201; public static final int icSigPreview1Tag = 1886545201;
...@@ -127,44 +146,128 @@ public class ICC_Profile ...@@ -127,44 +146,128 @@ public class ICC_Profile
public static final int icSigPs2RenderingIntentTag = 1886597737; public static final int icSigPs2RenderingIntentTag = 1886597737;
public static final int icSigRedColorantTag = 1918392666; public static final int icSigRedColorantTag = 1918392666;
public static final int icSigRedTRCTag = 1918128707; public static final int icSigRedTRCTag = 1918128707;
public static final int icSigRgbData = 1380401696;
public static final int icSigScreeningDescTag = 1935897188; public static final int icSigScreeningDescTag = 1935897188;
public static final int icSigScreeningTag = 1935897198; public static final int icSigScreeningTag = 1935897198;
public static final int icSigSpace2CLR = 843271250;
public static final int icSigSpace3CLR = 860048466;
public static final int icSigSpace4CLR = 876825682;
public static final int icSigSpace5CLR = 893602898;
public static final int icSigSpace6CLR = 910380114;
public static final int icSigSpace7CLR = 927157330;
public static final int icSigSpace8CLR = 943934546;
public static final int icSigSpace9CLR = 960711762;
public static final int icSigSpaceACLR = 1094929490;
public static final int icSigSpaceBCLR = 1111706706;
public static final int icSigSpaceCCLR = 1128483922;
public static final int icSigSpaceDCLR = 1145261138;
public static final int icSigSpaceECLR = 1162038354;
public static final int icSigSpaceFCLR = 1178815570;
public static final int icSigTechnologyTag = 1952801640; public static final int icSigTechnologyTag = 1952801640;
public static final int icSigUcrBgTag = 1650877472; public static final int icSigUcrBgTag = 1650877472;
public static final int icSigViewingCondDescTag = 1987405156; public static final int icSigViewingCondDescTag = 1987405156;
public static final int icSigViewingConditionsTag = 1986618743; public static final int icSigViewingConditionsTag = 1986618743;
public static final int icSigXYZData = 1482250784; public static final int icSigChromaticityTag = 1667789421;
public static final int icSigYCbCrData = 1497588338;
public static final int icSigYxyData = 1501067552; public static final int icHdrSize = 0;
public static final int icTagReserved = 4; public static final int icHdrCmmId = 4;
public static final int icHdrVersion = 8;
public static final int icHdrDeviceClass = 12;
public static final int icHdrColorSpace = 16;
public static final int icHdrPcs = 20;
public static final int icHdrDate = 24;
public static final int icHdrMagic = 36;
public static final int icHdrPlatform = 40;
public static final int icHdrFlags = 44;
public static final int icHdrManufacturer = 48;
public static final int icHdrModel = 52;
public static final int icHdrAttributes = 56;
public static final int icHdrRenderingIntent = 64;
public static final int icHdrIlluminant = 68;
public static final int icHdrCreator = 80;
public static final int icTagType = 0; public static final int icTagType = 0;
public static final int icTagReserved = 4;
public static final int icCurveCount = 8;
public static final int icCurveData = 12;
public static final int icXYZNumberX = 8; public static final int icXYZNumberX = 8;
long profileID; // why long? /**
* @serial
ICC_Profile(long profileID) */
final int iccProfileSerializedDataVersion = 1;
transient int profileID;
ICC_Profile(int profileID)
{ {
this.profileID = profileID; this.profileID = profileID;
} }
protected void finalize()
{
// XXX What resources should we free?
}
public static ICC_Profile getInstance(byte[] data)
{
throw new Error("not implemented");
}
public static ICC_Profile getInstance(int cspace)
{
return new ICC_Profile(cspace);
}
public static ICC_Profile getInstance(String filename) throws IOException
{
return getInstance(new FileInputStream(filename));
}
public static ICC_Profile getInstance(InputStream in) throws IOException
{
throw new Error("not implemented");
}
public int getMajorVersion()
{
throw new Error("not implemented");
}
public int getMinorVersion()
{
throw new Error("not implemented");
}
public int getProfileClass()
{
throw new Error("not implemented");
}
public int getColorSpaceType()
{
throw new Error("not implemented");
}
public int getPCSType()
{
throw new Error("not implemented");
}
public void write(String filename) throws IOException
{
write(new FileOutputStream(filename));
}
public void write(OutputStream out)
{
throw new Error("not implemented");
}
public byte[] getData()
{
throw new Error("not implemented");
}
public byte[] getData(int tagSignature)
{
throw new Error("not implemented");
}
public void setData(int tagSignature, byte[] data)
{
throw new Error("not implemented");
}
public int getNumComponents() public int getNumComponents()
{ {
switch ((int) profileID) switch (profileID)
{ {
case ColorSpace.CS_sRGB: case ColorSpace.CS_sRGB:
case ColorSpace.CS_LINEAR_RGB: case ColorSpace.CS_LINEAR_RGB:
...@@ -172,9 +275,25 @@ public class ICC_Profile ...@@ -172,9 +275,25 @@ public class ICC_Profile
return 3; return 3;
case ColorSpace.CS_GRAY: case ColorSpace.CS_GRAY:
return 1; return 1;
case ColorSpace.CS_PYCC: // have no clue about this one case ColorSpace.CS_PYCC: // have no clue about this one
default: default:
throw new UnsupportedOperationException("profile not implemented"); throw new UnsupportedOperationException("profile not implemented");
} }
} }
}
protected Object readResolve() throws ObjectStreamException
{
throw new Error("not implemented");
}
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
throw new Error("not implemented");
}
private void writeObject(ObjectOutputStream s) throws IOException
{
throw new Error("not implemented");
}
} // class ICC_Profile
/* ICC_ProfileGray.java -- the ICC profile for a Gray colorspace
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.awt.color;
/**
* STUBBED
* @since 1.2
*/
public class ICC_ProfileGray extends ICC_Profile
{
/**
* Compatible with JDK 1.2+.
*/
private static final long serialVersionUID = -1124721290732002649L;
ICC_ProfileGray()
{
super(ColorSpace.CS_GRAY);
}
public float[] getMediaWhitePoint()
{
return null;
}
public float getGamma()
{
return 0;
}
public short[] getTRC()
{
return null;
}
} // class ICC_ProfileGray
/* ICC_ProfileRGB.java -- the ICC profile for a RGB colorspace
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.awt.color;
/**
* STUBBED
* @since 1.2
*/
public class ICC_ProfileRGB extends ICC_Profile
{
/**
* Compatible with JDK 1.2+.
*/
private static final long serialVersionUID = 8505067385152579334L;
public static final int REDCOMPONENT = 0;
public static final int GREENCOMPONENT = 1;
public static final int BLUECOMPONENT = 2;
ICC_ProfileRGB()
{
super(ColorSpace.CS_sRGB);
}
public float[] getMediaWhitePoint()
{
return null;
}
public float[][] getMatrix()
{
return null;
}
public float getGamma(int component)
{
return 0;
}
public short[] getTRC(int component)
{
return null;
}
} // class ICC_ProfileRGB
...@@ -56,6 +56,7 @@ import java.io.UnsupportedEncodingException; ...@@ -56,6 +56,7 @@ import java.io.UnsupportedEncodingException;
*/ */
public class DataFlavor implements java.io.Externalizable, Cloneable public class DataFlavor implements java.io.Externalizable, Cloneable
{ {
static final long serialVersionUID = 8367026044764648243L;
// FIXME: Serialization: Need to write methods for. // FIXME: Serialization: Need to write methods for.
......
...@@ -50,6 +50,8 @@ import java.util.TooManyListenersException; ...@@ -50,6 +50,8 @@ import java.util.TooManyListenersException;
public class DragSourceContext public class DragSourceContext
implements DragSourceListener, DragSourceMotionListener, Serializable implements DragSourceListener, DragSourceMotionListener, Serializable
{ {
static final long serialVersionUID = -115407898692194719L;
protected static final int DEFAULT = 0; protected static final int DEFAULT = 0;
protected static final int ENTER = 1; protected static final int ENTER = 1;
protected static final int OVER = 2; protected static final int OVER = 2;
......
...@@ -44,6 +44,7 @@ import java.awt.event.ActionEvent; ...@@ -44,6 +44,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.TooManyListenersException; import java.util.TooManyListenersException;
/** STUB CLASS ONLY */
public class DropTarget public class DropTarget
{ {
protected static class DropTargetAutoScroller protected static class DropTargetAutoScroller
......
...@@ -48,6 +48,8 @@ import java.util.List; ...@@ -48,6 +48,8 @@ import java.util.List;
public class DropTargetContext implements Serializable public class DropTargetContext implements Serializable
{ {
static final long serialVersionUID = -634158968993743371L;
protected class TransferableProxy implements Transferable protected class TransferableProxy implements Transferable
{ {
protected boolean isLocal; protected boolean isLocal;
......
...@@ -754,18 +754,18 @@ public class KeyEvent extends InputEvent ...@@ -754,18 +754,18 @@ public class KeyEvent extends InputEvent
public static final int VK_EURO_SIGN = 516; public static final int VK_EURO_SIGN = 516;
/** /**
* The virtual key VK_EXCLAMATION_POINT. * The virtual key VK_EXCLAMATION_MARK.
* *
* @since 1.2 * @since 1.2
*/ */
public static final int VK_EXCLAMATION_POINT = 517; public static final int VK_EXCLAMATION_MARK = 517;
/** /**
* The virtual key VK_INVERTED_EXCLAMATION_POINT. * The virtual key VK_INVERTED_EXCLAMATION_MARK.
* *
* @since 1.2 * @since 1.2
*/ */
public static final int VK_INVERTED_EXCLAMATION_POINT = 518; public static final int VK_INVERTED_EXCLAMATION_MARK = 518;
/** /**
* The virtual key VK_LEFT_PARENTHESIS. * The virtual key VK_LEFT_PARENTHESIS.
...@@ -1410,9 +1410,9 @@ public class KeyEvent extends InputEvent ...@@ -1410,9 +1410,9 @@ public class KeyEvent extends InputEvent
return "Dollar"; return "Dollar";
case VK_EURO_SIGN: case VK_EURO_SIGN:
return "Euro"; return "Euro";
case VK_EXCLAMATION_POINT: case VK_EXCLAMATION_MARK:
return "Exclamation Mark"; return "Exclamation Mark";
case VK_INVERTED_EXCLAMATION_POINT: case VK_INVERTED_EXCLAMATION_MARK:
return "Inverted Exclamation Mark"; return "Inverted Exclamation Mark";
case VK_LEFT_PARENTHESIS: case VK_LEFT_PARENTHESIS:
return "Left Parenthesis"; return "Left Parenthesis";
......
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