This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
API patch
- From: Michael Koch <konqueror at gmx dot de>
- To: java at gcc dot gnu dot org
- Date: Wed, 6 Nov 2002 13:42:32 +0100
- Subject: API patch
Hello list,
Please review the attached patch which fixes the API of several
classes.
Michael
--
Homepage: http://www.worldforge.org/
GPG-key: http://konqueror.dyndns.org/~mkoch/michael.gpg
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1507
diff -u -r1.1507 ChangeLog
--- ChangeLog 5 Nov 2002 04:12:04 -0000 1.1507
+++ ChangeLog 6 Nov 2002 12:32:14 -0000
@@ -1,3 +1,32 @@
+2002-11-05 Michael Koch <konqueror@gmx.de>
+
+ * java/awt/color/ICC_Profile.java:
+ Added missing constants.
+ * java/awt/color/ICC_ColorSpace.java
+ (getMinValue): Added dummy implementation.
+ (getMaxValue): Added dummy implementation.
+ * java/awt/datatransfer/DataFlavor.java
+ (imageFlavor): Added.
+ (isMimeTypeEqual): Must be final.
+ (getDefaultRepresentationClass): Must be non-static.
+ (getDefaultRepresentationClassAsString): Must be non-static.
+ * java/awt/dnd/DragSourceContext.java
+ (dragExit): Corrected argument.
+ (dragDropEnd): Corrected argument.
+ * java/awt/dnd/DragSourceListener.java.java
+ (dragExit): Corrected argument.
+ (dragDropEnd): Corrected argument.
+ * java/awt/font/TextHitInfo.java
+ (toString): Added stubbed implementation.
+ * java/awt/geom/PathIterator.java:
+ The constants must be static.
+ * java/awt/image/VolatileImage.java
+ (IMAGE_INCOMPATIBLE): Fixed typo.
+ * java/awt/image/renderable/RenderableImage.java
+ (HINTS_OBSERVED): Must be static.
+ * java/beans/BeanInfo.java:
+ Constants must be final.
+
2002-11-04 R. A. Rivas Diaz <rivasdiaz@yahoo.com>
* gnu/java/security/provider/SHA.java (engineGetDigestLength):
Index: java/awt/color/ICC_ColorSpace.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/color/ICC_ColorSpace.java,v
retrieving revision 1.4
diff -u -r1.4 ICC_ColorSpace.java
--- java/awt/color/ICC_ColorSpace.java 22 Jan 2002 22:40:06 -0000 1.4
+++ java/awt/color/ICC_ColorSpace.java 6 Nov 2002 12:32:15 -0000
@@ -78,4 +78,28 @@
// FIXME: Not implemented
throw new UnsupportedOperationException();
}
+
+ /**
+ * @param component The index of the color component
+ *
+ * @exception IllegalArgumentException If <code>component<code> is less
+ * then 0 or greater then <code>numComponents - 1</code>
+ */
+ public float getMinValue (int component)
+ {
+ // FIXME: Not implemented
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @param component The index of the color component
+ *
+ * @exception IllegalArgumentException If <code>component<code> is less
+ * then 0 or greater then <code>numComponents - 1</code>
+ */
+ public float getMaxValue (int component)
+ {
+ // FIXME: Not implemented
+ throw new UnsupportedOperationException();
+ }
}
Index: java/awt/color/ICC_Profile.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/color/ICC_Profile.java,v
retrieving revision 1.5
diff -u -r1.5 ICC_Profile.java
--- java/awt/color/ICC_Profile.java 22 Jan 2002 22:40:06 -0000 1.5
+++ java/awt/color/ICC_Profile.java 6 Nov 2002 12:32:15 -0000
@@ -43,6 +43,118 @@
*/
public class ICC_Profile
{
+ public static final int CLASS_ABSTRACT = 5;
+ public static final int CLASS_COLORSPACECONVERSION = 4;
+ public static final int CLASS_DEVICELINK = 3;
+ public static final int CLASS_DISPLAY = 1;
+ public static final int CLASS_INPUT = 0;
+ public static final int CLASS_NAMEDCOLOR = 6;
+ public static final int CLASS_OUTPUT = 2;
+
+ public static final int icAbsoluteColorimetric = 3;
+ public static final int icCurveCount = 8;
+ public static final int icCurveData = 12;
+ public static final int icHdrAttributes = 56;
+ public static final int icHdrCmmId = 4;
+ public static final int icHdrColorSpace = 16;
+ public static final int icHdrCreator = 80;
+ public static final int icHdrDate = 24;
+ public static final int icHdrDeviceClass = 12;
+ public static final int icHdrFlags = 44;
+ public static final int icHdrIlluminant = 68;
+ public static final int icHdrMagic = 36;
+ public static final int icHdrManufacturer = 48;
+ public static final int icHdrModel = 52;
+ public static final int icHdrPcs = 20;
+ public static final int icHdrPlatform = 40;
+ public static final int icHdrRenderingIntent = 64;
+ public static final int icHdrSize = 0;
+ public static final int icHdrVersion = 8;
+ public static final int icPerceptual = 0;
+ public static final int icRelativeColorimetric = 1;
+ public static final int icSaturation = 2;
+ public static final int icSigAbstractClass = 1633842036;
+ public static final int icSigAToB0Tag = 1093812784;
+ public static final int icSigAToB1Tag = 1093812785;
+ public static final int icSigAToB2Tag = 1093812786;
+ public static final int icSigBlueColorantTag = 1649957210;
+ public static final int icSigBlueTRCTag = 1649693251;
+ public static final int icSigBToA0Tag = 1110589744;
+ public static final int icSigBToA1Tag = 1110589745;
+ public static final int icSigBToA2Tag = 1110589746;
+ public static final int icSigCalibrationDateTimeTag = 1667329140;
+ 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 icSigCrdInfoTag = 1668441193;
+ public static final int icSigDeviceMfgDescTag = 1684893284;
+ public static final int icSigDeviceModelDescTag = 1684890724;
+ public static final int icSigDeviceSettingsTag = 1684371059;
+ public static final int icSigDisplayClass = 1835955314;
+ public static final int icSigGamutTag = 1734438260;
+ public static final int icSigGrayData = 1196573017;
+ public static final int icSigGrayTRCTag = 1800688195;
+ public static final int icSigGreenColorantTag = 1733;
+ 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 icSigLuvData = 1282766368;
+ public static final int icSigMeasurementTag = 1835360627;
+ public static final int icSigMediaBlackPointTag = 1651208308;
+ public static final int icSigMediaWhitePointTag = 2004119668;
+ 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 icSigPreview0Tag = 1886545200;
+ public static final int icSigPreview1Tag = 1886545201;
+ public static final int icSigPreview2Tag = 1886545202;
+ public static final int icSigProfileDescriptionTag = 1684370275;
+ public static final int icSigProfileSequenceDescTag = 1886610801;
+ public static final int icSigPs2CRD0Tag = 1886610480;
+ public static final int icSigPs2CRD1Tag = 1886610481;
+ public static final int icSigPs2CRD2Tag = 1886610482;
+ public static final int icSigPs2CRD3Tag = 1886610483;
+ public static final int icSigPs2CSATag = 1886597747;
+ public static final int icSigPs2RenderingIntentTag = 1886597737;
+ public static final int icSigRedColorantTag = 1918392666;
+ public static final int icSigRedTRCTag = 1918128707;
+ public static final int icSigRgbData = 1380401696;
+ public static final int icSigScreeningDescTag = 1935897188;
+ 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 icSigUcrBgTag = 1650877472;
+ public static final int icSigViewingCondDescTag = 1987405156;
+ public static final int icSigViewingConditionsTag = 1986618743;
+ public static final int icSigXYZData = 1482250784;
+ public static final int icSigYCbCrData = 1497588338;
+ public static final int icSigYxyData = 1501067552;
+ public static final int icTagReserved = 4;
+ public static final int icTagType = 0;
+ public static final int icXYZNumberX = 8;
+
long profileID; // why long?
ICC_Profile(long profileID)
Index: java/awt/datatransfer/DataFlavor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/datatransfer/DataFlavor.java,v
retrieving revision 1.1
diff -u -r1.1 DataFlavor.java
--- java/awt/datatransfer/DataFlavor.java 24 Jan 2002 06:31:02 -0000 1.1
+++ java/awt/datatransfer/DataFlavor.java 6 Nov 2002 12:32:15 -0000
@@ -87,6 +87,8 @@
*/
public static final DataFlavor javaFileListFlavor;
+public static final DataFlavor imageFlavor;
+
/**
* This is the MIME type used for transferring a serialized object.
* The representation class is the type of object be deserialized.
@@ -125,6 +127,10 @@
"Java File List");
// javaFileListFlavor.mimeType = "application/x-java-file-list";
+
+ imageFlavor
+ = new DataFlavor(java.awt.Image.class,
+ "Java Image");
}
/*************************************************************************/
@@ -498,7 +504,7 @@
* @return <code>true</code> if the MIME type is equal to this object's
* MIME type, <code>false</code> otherwise.
*/
-public boolean
+public final boolean
isMimeTypeEqual(String mimeType)
{
// FIXME: Need to handle default attributes and parameters
@@ -861,7 +867,7 @@
*
* @since 1.3
*/
-public static final Class
+public final Class
getDefaultRepresentationClass()
{
return(java.io.InputStream.class);
@@ -871,7 +877,7 @@
/**
* XXX - Currently returns <code>java.io.InputStream</code>.
*/
-public static final String
+public final String
getDefaultRepresentationClassAsString()
{
return(getDefaultRepresentationClass().getName());
Index: java/awt/dnd/DragSourceContext.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/dnd/DragSourceContext.java,v
retrieving revision 1.1
diff -u -r1.1 DragSourceContext.java
--- java/awt/dnd/DragSourceContext.java 9 Aug 2002 04:26:15 -0000 1.1
+++ java/awt/dnd/DragSourceContext.java 6 Nov 2002 12:32:15 -0000
@@ -111,7 +111,7 @@
{
}
- public void dragExit(DragSourceDragEvent e)
+ public void dragExit(DragSourceEvent e)
{
}
@@ -119,7 +119,7 @@
{
}
- public void dragDropEnd(DragSourceDragEvent e)
+ public void dragDropEnd(DragSourceDropEvent e)
{
}
Index: java/awt/dnd/DragSourceListener.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/dnd/DragSourceListener.java,v
retrieving revision 1.1
diff -u -r1.1 DragSourceListener.java
--- java/awt/dnd/DragSourceListener.java 9 Aug 2002 04:26:15 -0000 1.1
+++ java/awt/dnd/DragSourceListener.java 6 Nov 2002 12:32:15 -0000
@@ -83,7 +83,7 @@
*
* @param e the drag source drag event
*/
- void dragExit(DragSourceDragEvent e);
+ void dragExit(DragSourceEvent e);
/**
* Called when the drag and drop operation is complete. After this event,
@@ -93,5 +93,5 @@
*
* @param e the drag source drag event
*/
- void dragDropEnd(DragSourceDragEvent e);
+ void dragDropEnd(DragSourceDropEvent e);
} // interface DragSourceListener
Index: java/awt/font/TextHitInfo.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/font/TextHitInfo.java,v
retrieving revision 1.1
diff -u -r1.1 TextHitInfo.java
--- java/awt/font/TextHitInfo.java 9 Aug 2002 04:26:15 -0000 1.1
+++ java/awt/font/TextHitInfo.java 6 Nov 2002 12:32:15 -0000
@@ -107,4 +107,8 @@
return new TextHitInfo();
}
+ public String toString()
+ {
+ return "";
+ }
}
Index: java/awt/geom/PathIterator.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/geom/PathIterator.java,v
retrieving revision 1.4
diff -u -r1.4 PathIterator.java
--- java/awt/geom/PathIterator.java 9 Aug 2002 04:26:16 -0000 1.4
+++ java/awt/geom/PathIterator.java 6 Nov 2002 12:32:15 -0000
@@ -59,24 +59,24 @@
* from the point to infinity (in any direction) crosses an odd number of
* segments.
*/
- int WIND_EVEN_ODD = 0;
+ static final int WIND_EVEN_ODD = 0;
/**
* The non-zero winding mode: a point is internal to the shape if a ray
* from the point to infinity (in any direction) crosses a different number
* of segments headed clockwise than those headed counterclockwise.
*/
- int WIND_NON_ZERO = 1;
+ static final int WIND_NON_ZERO = 1;
/**
* Starts a new subpath. There is no segment from the previous vertex.
*/
- int SEG_MOVETO = 0;
+ static final int SEG_MOVETO = 0;
/**
* The current segment is a line.
*/
- int SEG_LINETO = 1;
+ static final int SEG_LINETO = 1;
/**
* The current segment is a quadratic parametric curve. It is interpolated
@@ -91,7 +91,7 @@
* = n! / (m! * (n-m)!)
* </pre>
*/
- int SEG_QUADTO = 2;
+ static final int SEG_QUADTO = 2;
/**
* The current segment is a cubic parametric curve (more commonly known as
@@ -107,13 +107,13 @@
* = n! / (m! * (n-m)!)
* </pre>
*/
- int SEG_CUBICTO = 3;
+ static final int SEG_CUBICTO = 3;
/**
* The current segment closes a loop by an implicit line to the previous
* SEG_MOVETO coordinate.
*/
- int SEG_CLOSE = 4;
+ static final int SEG_CLOSE = 4;
/**
* Returns the winding rule to determine which points are inside this path.
Index: java/awt/image/VolatileImage.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/VolatileImage.java,v
retrieving revision 1.1
diff -u -r1.1 VolatileImage.java
--- java/awt/image/VolatileImage.java 9 Aug 2002 04:26:16 -0000 1.1
+++ java/awt/image/VolatileImage.java 6 Nov 2002 12:32:15 -0000
@@ -49,7 +49,7 @@
{
public static final int IMAGE_OK = 0;
public static final int IMAGE_RESTORED = 1;
- public static final int IMAGE_INCOMPLETE = 2;
+ public static final int IMAGE_INCOMPATIBLE = 2;
public VolatileImage()
{
}
Index: java/awt/image/renderable/RenderableImage.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/renderable/RenderableImage.java,v
retrieving revision 1.1
diff -u -r1.1 RenderableImage.java
--- java/awt/image/renderable/RenderableImage.java 9 Aug 2002 04:29:59 -0000 1.1
+++ java/awt/image/renderable/RenderableImage.java 6 Nov 2002 12:32:15 -0000
@@ -44,7 +44,7 @@
public interface RenderableImage
{
- String HINTS_OBSERVED = "HINTS_OBSERVED";
+ static final String HINTS_OBSERVED = "HINTS_OBSERVED";
Vector getSources();
Object getProperty(String name);
String[] getPropertyNames();
Index: java/beans/BeanInfo.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/beans/BeanInfo.java,v
retrieving revision 1.2
diff -u -r1.2 BeanInfo.java
--- java/beans/BeanInfo.java 22 Jan 2002 22:40:11 -0000 1.2
+++ java/beans/BeanInfo.java 6 Nov 2002 12:32:15 -0000
@@ -74,13 +74,13 @@
public interface BeanInfo {
/** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/
- public static int ICON_COLOR_16x16 = 1;
+ public static final int ICON_COLOR_16x16 = 1;
/** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/
- public static int ICON_COLOR_32x32 = 2;
+ public static final int ICON_COLOR_32x32 = 2;
/** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/
- public static int ICON_MONO_16x16 = 3;
+ public static final int ICON_MONO_16x16 = 3;
/** Use this as a parameter for the getIcon() command to retrieve a certain type of icon. **/
- public static int ICON_MONO_32x32 = 4;
+ public static final int ICON_MONO_32x32 = 4;
/** Get the general description of this Bean type.
** @return the BeanDescriptor for the Bean, or null if