[commit-cp] classpath java/net/MulticastSocket.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/25 00:45:42 Modified files: java/net : MulticastSocket.java . : ChangeLog Log message: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * java/net/MulticastSocket.java: (setNetworkInterface): Rewritten. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/net/MulticastSocket.java?cvsroot=classpathr1=1.27r2=1.28 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8724r2=1.8725
Sockets and the RI
Hi, I still have trouble with the Sockets First I found out that certain Sockets which do not succeed in establishing a connection (a wanted scenario in the mauve test) do not get properly closed. I took some time until I found the simple answer: These sockets do their connect() attempt inside the constructor. When connect() throws an exception the caller will not get an instance on which it can call close(). I therefore added some exception handling code and thought: Yeah, now those spurious BindExceptions in every quick second test run will be fixed. However this is not the case. :( A little googling about 'unbinding' a socket revealed that this is achieved by closing it (fine I thought). However it also tells that a closed socket remains busy for 60 seconds on most systems. Ok this looks exactly like the problem I faced. But WTF? Running the tests quickly after on the RI does not cause those BindExceptions? What is this? Magic? I felt lost and so put out strace to see what the RI is doing with my operating system. I saw no special system calls and to my surprise not a single failing bind() call. However there is one very odd thing which I dont understand: new Socket(127.0.0.1, 10008) will do bind call with AF_INET6 and :: as the address on the RI. Could this have anything to do with the bind problems I am seeing? If not, what could I do trick the 60 second timeout? Wikipedia tells 127.0.0.1 is ::1 in IPv6. What is :: then? I hope one can enlighten me. :) Regards Robert signature.asc Description: OpenPGP digital signature
Signals, sockets and threads
Hi all, the title looks like fun, eh? :) In an attempt to get gnu/testlet/java/net/ServerSocket/ReturnOnClose to succeed on Cacao with the new an shiny VMChannel implementation I found out the Cacao's Thread.interrupt() does not cause blocking system calls to be interrupted. A short glimpse a GCJ's code (where the above testcase runs fine) revealed that I needed to add a pthread_kill (and an obligatory sigaction) to get things working. With that in place I tried to implement a correct VMChannel.accept. The interesting part looks like this: do { ret = cpnio_accept (fd, (struct sockaddr *) addr, alen); tmp_errno = errno; /* Check if interrupted by Thread.interrupt(). If not then some * other unrelated signal interrupted the system function and * we should start over again. */ if (tmp_errno == EINTR JCL_thread_interrupted(env, clazz)) { JCL_ThrowException (env, java/net/SocketException, strerror (tmp_errno)); return -1; } } while (ret == -1); if (ret == -1) { if (EWOULDBLOCK != tmp_errno EAGAIN != tmp_errno) JCL_ThrowException (env, java/net/SocketException, strerror (tmp_errno)); } return ret; tmp_errno is an int which is set to 0 in the beginning. The special bit is JCL_thread_interrupted which calls back into the VM to ask it whether the current thread has its interrupted flag set. My idea is that a delibarate Thread.interrupt() from inside the VM should stop VMChannel.accept() while a user running: killall -SIGUSR1 cacao from the console should not. Is that implementation OK. If not please give me some pointers to make it better. cya Robert signature.asc Description: PGP signature signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: fix for wrong JNI code in gnu_java_net_VMPlainSocketImpl.c
Hi, somehow conversion of a jstring into a char * was missing in the JNI code below making the those functions unusuable. ChangeLog: 2006-10-09 Robert Schuster [EMAIL PROTECTED] * native/jni/java-net/gnu_java_net/VMPlainSocketImpl.c: (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): Properly convert jstring into char *. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): Dito. (getif_address): Added const modifier to second argument. (getif_index): Dito. cya Robert Index: native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c === RCS file: /cvsroot/classpath/classpath/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c 9 Oct 2006 11:08:17 - 1.10 +++ native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c 9 Oct 2006 11:10:41 - 1.11 @@ -555,8 +555,8 @@ #endif /* HAVE_SETSOCKOPT */ } -static uint32_t getif_address (JNIEnv *env, char *ifname); -static int getif_index (JNIEnv *env, char *ifname); +static uint32_t getif_address (JNIEnv *env, const char *ifname); +static int getif_index (JNIEnv *env, const char *ifname); /* * Class: gnu_java_net_VMPlainSocketImpl @@ -572,10 +572,14 @@ #ifdef HAVE_SETSOCKOPT struct ip_mreq maddr; jbyte *addr_elems; + const char *str_ifname; if (ifname != NULL) { - maddr.imr_interface.s_addr = getif_address (env, ifname); + str_ifname = JCL_jstring_to_cstring(env, ifname); + maddr.imr_interface.s_addr = getif_address (env, str_ifname); + JCL_free_cstring(env, ifname, str_ifname); + if ((*env)-ExceptionCheck (env)) return; } @@ -593,6 +597,7 @@ if (-1 == setsockopt (fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, maddr, sizeof (struct ip_mreq))) JCL_ThrowException (env, SOCKET_EXCEPTION, strerror (errno)); + #else (void) fd; (void) addr; @@ -617,10 +622,14 @@ #ifdef HAVE_INET6 struct ipv6_mreq maddr; jbyte *addr_elems; + const char *str_ifname; if (ifname == NULL) { - maddr.ipv6mr_interface = getif_index (env, ifname); + str_ifname = JCL_jstring_to_cstring(env, ifname); + maddr.ipv6mr_interface = getif_index (env, str_ifname); + JCL_free_cstring(env, ifname, str_ifname); + if ((*env)-ExceptionCheck (env)) return; } @@ -666,10 +675,14 @@ #ifdef HAVE_SETSOCKOPT struct ip_mreq maddr; jbyte *addr_elems; + const char *str_ifname; if (ifname != NULL) { - maddr.imr_interface.s_addr = getif_address (env, ifname); + str_ifname = JCL_jstring_to_cstring(env, ifname); + maddr.imr_interface.s_addr = getif_address (env, str_ifname); + JCL_free_cstring(env, ifname, str_ifname); + if ((*env)-ExceptionCheck (env)) return; } @@ -711,10 +724,14 @@ #ifdef HAVE_INET6 struct ipv6_mreq maddr; jbyte *addr_elems; + const char *str_ifname; if (ifname == NULL) { - maddr.ipv6mr_interface = getif_index (env, ifname); + str_ifname = JCL_jstring_to_cstring(env, ifname); + maddr.ipv6mr_interface = getif_index (env, str_ifname); + JCL_free_cstring(env, ifname, str_ifname); + if ((*env)-ExceptionCheck (env)) return; } @@ -747,7 +764,7 @@ } static uint32_t -getif_address (JNIEnv *env, char *ifname) +getif_address (JNIEnv *env, const char *ifname) { #ifdef HAVE_GETIFADDRS struct ifaddrs *ifaddrs, *i; @@ -789,7 +806,7 @@ } static int -getif_index (JNIEnv *env, char *ifname) +getif_index (JNIEnv *env, const char *ifname) { #ifdef HAVE_GETIFADDRS struct ifaddrs *ifaddrs, *i; signature.asc Description: OpenPGP digital signature
[cp-patches] RFC/Need help: java-net/java-nio update
Hi, this is the patch which removes VMPlainDatagramSocketImpl. However I tried getting the multicast stuff working. So far I succeeded for IP4 sockets. Running in Azureus I get a Protocol not available in the native part of setMulticastInterface6. Casey, can you help me with this stuff? I am feeling lost here :| Here is the how the ChangeLog would look like: 2006-10-09 Robert Schuster [EMAIL PROTECTED] * gnu/java/net/PlainDatagramSocketImpl.java: (connect): Use VMChannel instance for connect call. (getTimeToLive): Call VMPlainSocketImpl.getTimeToLive. (setTimeToLive): Call VMPlainSocketImpl.setTimeToLive. (setOption): Handle multicast options. (getOption): Handle multicast options. * gnu/java/net/PlainSocketImpl.java: (getTimeToLive): Call VMPlainSocketImpl.getTimeToLive. (setTimeToLive): Call VMPlainSocketImpl.setTimeToLive. (setOption): Handle multicast options. (getOption): Handle multicast options. * include/Makefile.am: Removed all occurences of gnu_java_net_VMPlainDatagramSocketImpl.h. * include/gnu_java_net_VMPlainDatagramSocketImpl.h: Removed. * native/jni/java-net/Makefile.am: Removed gnu_java_net_VMPlainDatagramSocketImpl.c from sources. * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c: Removed. as SocketException, declare to throw SocketException. * native/jni/java-nio/gnu_java_nio_VMChannel.c: Added definitions for SocketException and ConnectException. (Java_gnu_java_nio_VMChannel_connect): Throw SocketException instead of IOException. (Java_gnu_java_nio_VMChannel_connect6): Throw SocketException instead of IOException. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Added CPNET_IP_TTL to java_sockopt enum. (Java_gnu_java_net_VMPlainSocketImpl_setOption): Handle CPNET_IP_TTL case. (Java_gnu_java_net_VMPlainSocketImpl_getOption): Handle CPNET_IP_TTL case. (Java_gnu_java_net_VMPlainSocketImpl_getMulticastInterface): New function. (Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface): New function. (Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface6): New function. * vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java: Removed. * vm/reference/gnu/java/nio/VMChannel.java: (connect(int, byte[], int, int)): Declare to throw SocketException. (connect6): Declare to throw SocketException. (connect(InetSocketAddress, int)): Catch IOException and rethrow * vm/reference/gnu/java/net/VMPlainSocketImpl.java: (setTimeToLive): New method. (getTimeToLive): New method. (setMulticastInterface(int, InetAddress)): New method. (setMulticastInterface(int, int, Inet4Address): New method. (setMulticastInterface6(int, int, Inet6Address): New method. * NEWS: Documented VM interface changes. Index: gnu/java/net/PlainSocketImpl.java === RCS file: /cvsroot/classpath/classpath/gnu/java/net/PlainSocketImpl.java,v retrieving revision 1.14 diff -u -r1.14 PlainSocketImpl.java --- gnu/java/net/PlainSocketImpl.java 17 Sep 2006 07:31:41 - 1.14 +++ gnu/java/net/PlainSocketImpl.java 9 Oct 2006 23:58:11 - @@ -150,7 +150,8 @@ { case IP_MULTICAST_IF: case IP_MULTICAST_IF2: - throw new UnsupportedOperationException(FIXME); + impl.setMulticastInterface(optionId, (InetAddress) value); + break; case IP_MULTICAST_LOOP: case SO_BROADCAST: @@ -198,8 +199,8 @@ } } if (optionId == IP_MULTICAST_IF || optionId == IP_MULTICAST_IF2) - throw new UnsupportedOperationException (can't get option + - optionId + yet); + return impl.getMulticastInterface(optionId); + return impl.getOption(optionId); } Index: gnu/java/net/PlainDatagramSocketImpl.java === RCS file: /cvsroot/classpath/classpath/gnu/java/net/PlainDatagramSocketImpl.java,v retrieving revision 1.13 diff -u -r1.13 PlainDatagramSocketImpl.java --- gnu/java/net/PlainDatagramSocketImpl.java 22 Sep 2006 00:11:56 - 1.13 +++ gnu/java/net/PlainDatagramSocketImpl.java 9 Oct 2006 23:58:11 - @@ -42,7 +42,6 @@ import java.io.IOException; import java.io.InterruptedIOException; -import java.lang.reflect.Field; import java.net.DatagramPacket; import java.net.DatagramSocketImpl; import java.net.InetAddress; @@ -69,7 +68,6 @@ */ public final class PlainDatagramSocketImpl extends DatagramSocketImpl { - private final VMChannel channel; /** @@ -171,7 +169,7 @@ */ protected void connect(InetAddress addr, int port) throws SocketException
[commit-cp] classpath native/jni/java-net/gnu_java_net_VMPl...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/09 10:55:16 Modified files: native/jni/java-net: gnu_java_net_VMPlainSocketImpl.c . : ChangeLog Log message: 2006-10-09 Robert Schuster [EMAIL PROTECTED] * native/jni/java-net/gnu_java_net/VMPlainSocketImpl.c: (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): Properly convert jstring into char *. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): Dito. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c?cvsroot=classpathr1=1.8r2=1.9 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8652r2=1.8653
[commit-cp] classpath native/jni/java-net/gnu_java_net_VMPl...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/09 11:08:18 Modified files: native/jni/java-net: gnu_java_net_VMPlainSocketImpl.c . : ChangeLog Log message: Reversing the patch below: 2006-10-09 Robert Schuster [EMAIL PROTECTED] * native/jni/java-net/gnu_java_net/VMPlainSocketImpl.c: (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): Properly convert jstring into char *. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): Dito. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c?cvsroot=classpathr1=1.9r2=1.10 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8653r2=1.8654
[cp-patches] RFC: VMPlainDatagramImpl removal
Hi, this patch removes the above mentioned class and implements their functions elsewhere. DatagramImpl.connect() has a different exception clause than SocketImpl.connect() and fixing that required some changes in method signatures and the native implementation of VMChannel. These changes are crucial for the porting of Classpath' IO system to GCJ which I am currently doing. ChangeLog: 2006-10-09 Robert Schuster [EMAIL PROTECTED] * gnu/java/net/PlainSocketImpl.java: (connect): Use VMChannel instance for connect call. (getTimeToLive): Call VMPlainSocketImpl.getTimeToLive. (setTimeToLive): Call VMPlainSocketImpl.setTimeToLive. * include/Makefile.am: Removed all occurences of gnu_java_net_VMPlainDatagramSocketImpl.h. * include/gnu_java_net_VMPlainDatagramSocketImpl.h: Removed. * native/jni/java-net/Makefile.am: Removed gnu_java_net_VMPlainDatagramSocketImpl.c from sources. * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c: Removed. as SocketException, declare to throw SocketException. * native/jni/java-nio/gnu_java_net_VMChannel.c: Added definitions for SocketException and ConnectException. (Java_gnu_java_nio_VMChannel_connect): Throw SocketException instead of IOException. (Java_gnu_java_nio_VMChannel_connect6): Throw SocketException instead of IOException. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Added CPNET_IP_TTL to java_sockopt enum. (Java_gnu_java_net_VMPlainSocketImpl_setOption): Handle CPNET_IP_TTL case. (Java_gnu_java_net_VMPlainSocketImpl_getOption): Handle CPNET_IP_TTL case. * vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java: Removed. * vm/reference/gnu/java/nio/VMChannel.java: (connect(int, byte[], int, int)): Declare to throw SocketException. (connect6): Declare to throw SocketException. (connect(InetSocketAddress, int)): Catch IOException and rethrow * vm/reference/gnu/java/net/VMPlainSocketImpl.java: (setTimeToLive): New method. (getTimeToLive): New method. * NEWS: Documented VM interface changes. cya Robert Index: include/Makefile.am === RCS file: /cvsroot/classpath/classpath/include/Makefile.am,v retrieving revision 1.71 diff -u -r1.71 Makefile.am --- include/Makefile.am 20 Sep 2006 21:39:41 - 1.71 +++ include/Makefile.am 8 Oct 2006 23:26:53 - @@ -125,7 +125,6 @@ $(GTKPEER_H_FILES) \ $(QTPEER_H_FILES) \ $(GCONF_PREFS_FILES) \ -$(top_srcdir)/include/gnu_java_net_VMPlainDatagramSocketImpl.h \ $(top_srcdir)/include/gnu_java_net_VMPlainSocketImpl.h \ $(top_srcdir)/include/gnu_java_net_local_LocalSocketImpl.h \ $(top_srcdir)/include/gnu_java_nio_EpollSelectorImpl.h \ @@ -180,8 +179,6 @@ $(top_srcdir)/include/gnu_java_util_prefs_gconf_%.h: $(top_builddir)/$(CLASSDIR)/gnu/java/util/prefs/gconf/%.class $(JAVAH) -o $@ gnu.java.util.prefs.gconf.$* -$(top_srcdir)/include/gnu_java_net_VMPlainDatagramSocketImpl.h: $(top_srcdir)/vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java - $(JAVAH) -o $@ gnu.java.net.VMPlainDatagramSocketImpl $(top_srcdir)/include/gnu_java_net_VMPlainSocketImpl.h: $(top_srcdir)/vm/reference/gnu/java/net/VMPlainSocketImpl.java $(JAVAH) -o $@ gnu.java.net.VMPlainSocketImpl $(top_srcdir)/include/gnu_java_net_local_LocalSocketImpl.h: $(top_srcdir)/gnu/java/net/local/LocalSocketImpl.java Index: include/gnu_java_net_VMPlainDatagramSocketImpl.h === RCS file: include/gnu_java_net_VMPlainDatagramSocketImpl.h diff -N include/gnu_java_net_VMPlainDatagramSocketImpl.h --- include/gnu_java_net_VMPlainDatagramSocketImpl.h 19 Mar 2006 23:17:16 - 1.2 +++ /dev/null 1 Jan 1970 00:00:00 - @@ -1,30 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ - -#ifndef __gnu_java_net_VMPlainDatagramSocketImpl__ -#define __gnu_java_net_VMPlainDatagramSocketImpl__ - -#include jni.h - -#ifdef __cplusplus -extern C -{ -#endif - -JNIEXPORT void JNICALL Java_gnu_java_net_VMPlainDatagramSocketImpl_bind (JNIEnv *env, jclass, jobject, jint, jobject); -JNIEXPORT void JNICALL Java_gnu_java_net_VMPlainDatagramSocketImpl_create (JNIEnv *env, jclass, jobject); -JNIEXPORT void JNICALL Java_gnu_java_net_VMPlainDatagramSocketImpl_connect (JNIEnv *env, jclass, jobject, jobject, jint); -JNIEXPORT void JNICALL Java_gnu_java_net_VMPlainDatagramSocketImpl_nativeSendTo (JNIEnv *env, jclass, jobject, jobject, jint, jbyteArray, jint, jint); -JNIEXPORT void JNICALL Java_gnu_java_net_VMPlainDatagramSocketImpl_nativeReceive (JNIEnv *env, jclass, jobject, jbyteArray, jint, jint, jbyteArray, jintArray, jintArray); -JNIEXPORT void JNICALL Java_gnu_java_net_VMPlainDatagramSocketImpl_setOption (JNIEnv *env, jclass, jobject, jint, jobject); -JNIEXPORT jobject JNICALL
preparation of VMPlainDatagramSocketImpl removal
Hi all, hi Casey. As discussed earlier I am investigating the removal of the above class. In contrast to what I said in another mail I found two uses of the VMPlainDatagramSocketImpl. In PlainDatagramSocketImpl the IP_TTL field is used. This can be fixed by moving the constant into e.g VMPlainSocketImpl or VMChannel. When doing so the constant's name should be changed to something like CP_IP_TTL because it would otherwise conflict with a constant in the system headers when using the class in GCJ. Still there is something to find out: The IP_TTL constant is used for the VMPlainSocketImpl.setOption method. The JNI code for that method contains a big switch statement, but there is no case for IP_TTL. Should it simply be added? The other thing that is used from VMPlainDatagramSocketImpl is the connect() method. Is it possible for DGRAM sockets to just use VMChannel.connect instead? cya Robert signature.asc Description: OpenPGP digital signature
[commit-cp] classpath gnu/java/nio/KqueueSelectorImpl.java ...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/08 21:29:43 Modified files: gnu/java/nio : KqueueSelectorImpl.java . : ChangeLog Log message: 2006-10-03 Robert Schuster [EMAIL PROTECTED] * gnu/java/nio/KqueueSelectorImpl.java: Renamed field sizeof_struct_kevent to _sizeof_struct_kevent. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/nio/KqueueSelectorImpl.java?cvsroot=classpathr1=1.2r2=1.3 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8649r2=1.8650
Re: yacy and classpath, an experiment
Very cool to see progress here. Doing such a page in English would help to put more people in the loop. I will have a look at this. cya Robert signature.asc Description: OpenPGP digital signature
VMPlainDatagramSocketImpl still needed?
Hi, Casey said that he found gnu.java.nio.VMPlainDatagramSocketImpl to be obsolete. I quick glance at gnu.java.nio.PlainDatagramSocketImpl revealed that it does not use this class any more. I would be very in favour of removing the VMPlainDatagramSocketImpl class as it would lessen the amount of code to be ported to GCJ. Btw: The porting work goes fine. VMChannel's native side is already functional and GIJ is still able to print Hello World. I am now in the process of implementing all the remaining **ChannelImpl classes. Along epoll support I will also port the kqeue selector. :) cya Robert signature.asc Description: OpenPGP digital signature
[cp-patches] RFC: renamed method in KqueueSelectorImpl and removed IP_TTL field
Hi, the attached patch renames a method in KqueueSelectorImpl (this conflicts with the field of the same name in GCJ) and removes the IP_TTL field in VMPlainDatagramSocketImpl. The latter is seemingly not used anywhere and causes a problem during GCJ compilation. Please comment whether this change is ok? ChangeLog: 2006-10-03 Robert Schuster [EMAIL PROTECTED] * gnu/java/nio/KqueueSelectorImpl.java: Renamed method sizeof_struct_kevent to get_sizeof_struct_kevent. * include/gnu_java_nio_KqueueSelectorImpl.h: Dito. * native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c: Dito. * vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java: Removed unneeded IP_TTL field. cya Robert Index: include/gnu_java_nio_KqueueSelectorImpl.h === RCS file: /cvsroot/classpath/classpath/include/gnu_java_nio_KqueueSelectorImpl.h,v retrieving revision 1.2 diff -u -r1.2 gnu_java_nio_KqueueSelectorImpl.h --- include/gnu_java_nio_KqueueSelectorImpl.h 27 Sep 2006 21:19:31 - 1.2 +++ include/gnu_java_nio_KqueueSelectorImpl.h 3 Oct 2006 22:11:32 - @@ -29,10 +29,10 @@ /* * Class: gnu_java_nio_KqueueSelectorImpl - * Method:sizeof_struct_kevent + * Method:get_sizeof_struct_kevent * Signature: ()I */ -JNIEXPORT jint JNICALL Java_gnu_java_nio_KqueueSelectorImpl_sizeof_1struct_1kevent +JNIEXPORT jint JNICALL Java_gnu_java_nio_KqueueSelectorImpl_get_sizeof_1struct_1kevent (JNIEnv *, jclass); /* Index: native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c === RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c,v retrieving revision 1.2 diff -u -r1.2 gnu_java_nio_KqueueSelectorImpl.c --- native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c 27 Sep 2006 21:19:31 - 1.2 +++ native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c 3 Oct 2006 22:11:32 - @@ -91,11 +91,11 @@ /* * Class: gnu_java_nio_KqueueSelectorImpl - * Method:sizeof_struct_kevent + * Method:get_sizeof_struct_kevent * Signature: ()I */ JNIEXPORT jint JNICALL -Java_gnu_java_nio_KqueueSelectorImpl_sizeof_1struct_1kevent +Java_gnu_java_nio_KqueueSelectorImpl_get_sizeof_1struct_1kevent (JNIEnv *env __attribute__((unused)), jclass clazz __attribute__((unused))) { #if defined(HAVE_KQUEUE) defined(HAVE_KEVENT) Index: gnu/java/nio/KqueueSelectorImpl.java === RCS file: /cvsroot/classpath/classpath/gnu/java/nio/KqueueSelectorImpl.java,v retrieving revision 1.2 diff -u -r1.2 KqueueSelectorImpl.java --- gnu/java/nio/KqueueSelectorImpl.java 27 Sep 2006 21:19:31 - 1.2 +++ gnu/java/nio/KqueueSelectorImpl.java 3 Oct 2006 22:11:32 - @@ -80,7 +80,7 @@ } if (kqueue_supported ()) - sizeof_struct_kevent = sizeof_struct_kevent(); + sizeof_struct_kevent = get_sizeof_struct_kevent(); else sizeof_struct_kevent = -1; INITIAL_CAPACITY = 16 * sizeof_struct_kevent; @@ -437,10 +437,13 @@ /** * Return the size of a codestruct kevent/code on this system. + * + * The name of the method is deliberately chosen to not conflict + * with the static field. * * @return The size of codestruct kevent/code. */ - private static native int sizeof_struct_kevent(); + private static native int get_sizeof_struct_kevent(); /** * Opens a kqueue descriptor. Index: vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java === RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java,v retrieving revision 1.2 diff -u -r1.2 VMPlainDatagramSocketImpl.java --- vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java 12 Jan 2006 11:56:08 - 1.2 +++ vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java 3 Oct 2006 22:11:32 - @@ -55,12 +55,6 @@ */ public final class VMPlainDatagramSocketImpl { - /** - * Option id for the IP_TTL (time to live) value. - */ - static final int IP_TTL = 0x1E61; // - - // Static initializer to load native library static { signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: Updated INSTALL and configure.ac
Hi, I updated INSTALL and configure.ac with infos about grmic being built when asm.jar is specified. ChangeLog: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * INSTALL: Added information about grmic being built when ASM is available. * configure.ac: Dito. Index: INSTALL === RCS file: /cvsroot/classpath/classpath/INSTALL,v retrieving revision 1.39 diff -u -r1.39 INSTALL --- INSTALL 31 Jul 2006 22:37:58 - 1.39 +++ INSTALL 27 Sep 2006 16:56:10 - @@ -1,4 +1,4 @@ -Installing GNU Classpath - Last updated: September 7, 2005 +Installing GNU Classpath - Last updated: June 19, 2006 First, this is a development release only! Unless you are interested in active development and debugging, or just like running random alpha code, @@ -54,6 +54,11 @@ For building gcjwebplugin you'll need the Mozilla plugin support headers and libraries. + The GConf-based backend for java.util.prefs needs the following + library headers: + + - gconf 2.11.2 (or higher) + For building the Qt AWT peer JNI native libraries you have to specify --enable-qt-peer and need the following library: @@ -65,10 +70,10 @@ http://escher.sourceforge.net Please note that at the moment most operating systems do not -ship Qt4 by default. We recommend using GNU Classpath' Qt4 -support only for its developers and bug reporters. See -http://developer.classpath.org/mediation/ClasspathShowcase -for details on how to get it to work. + ship Qt4 by default. We recommend using GNU Classpath' Qt4 + support only for its developers and bug reporters. See + http://developer.classpath.org/mediation/ClasspathShowcase + for details on how to get it to work. For building the xmlj JAXP implementation (disabled by default, use configure --enable-xmlj) you need the following installed: @@ -80,7 +85,7 @@ http://www.xmlsoft.org/XSLT/ Minimum version of libxslt required: 1.1.11 - For building the javah tool, you will need the ASM library. + For building the gjavah and grmic tool, you will need the ASM library. Current version 2.2.1 is needed (other 2.2.x versions should be ok; 3.x is not ok). You can get ASM from http://asm.objectweb.org/ Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.187 diff -u -r1.187 configure.ac --- configure.ac 24 Sep 2006 20:12:04 - 1.187 +++ configure.ac 27 Sep 2006 16:56:10 - @@ -809,7 +809,7 @@ dnl --- AC_ARG_WITH([asm], AS_HELP_STRING([--with-asm=ABS.PATH], - [specify path to ASM jar for javah])) + [specify path to ASM jar to enable gjavah and grmic build])) case $with_asm in ) use_asm=false signature.asc Description: OpenPGP digital signature
Re: [cp-patches] FYI: Updated INSTALL and configure.ac
Hi, there where other changes in this file which I made earlier and forgot to tell about in the first ChangeLog. I applied the same patch but with this ChangeLog entry: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * INSTALL: Added information about grmic being built when ASM is available, added information about gconf dependency, indented Qt4 dependency section. * configure.ac: Added information about grmic being built when ASM is available. cya Robert Robert Schuster wrote: Hi, I updated INSTALL and configure.ac with infos about grmic being built when asm.jar is specified. ChangeLog: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * INSTALL: Added information about grmic being built when ASM is available. * configure.ac: Dito. Index: INSTALL === RCS file: /cvsroot/classpath/classpath/INSTALL,v retrieving revision 1.39 diff -u -r1.39 INSTALL --- INSTALL 31 Jul 2006 22:37:58 - 1.39 +++ INSTALL 27 Sep 2006 16:56:10 - @@ -1,4 +1,4 @@ -Installing GNU Classpath - Last updated: September 7, 2005 +Installing GNU Classpath - Last updated: June 19, 2006 First, this is a development release only! Unless you are interested in active development and debugging, or just like running random alpha code, @@ -54,6 +54,11 @@ For building gcjwebplugin you'll need the Mozilla plugin support headers and libraries. + The GConf-based backend for java.util.prefs needs the following + library headers: + + - gconf 2.11.2 (or higher) + For building the Qt AWT peer JNI native libraries you have to specify --enable-qt-peer and need the following library: @@ -65,10 +70,10 @@ http://escher.sourceforge.net Please note that at the moment most operating systems do not -ship Qt4 by default. We recommend using GNU Classpath' Qt4 -support only for its developers and bug reporters. See -http://developer.classpath.org/mediation/ClasspathShowcase -for details on how to get it to work. + ship Qt4 by default. We recommend using GNU Classpath' Qt4 + support only for its developers and bug reporters. See + http://developer.classpath.org/mediation/ClasspathShowcase + for details on how to get it to work. For building the xmlj JAXP implementation (disabled by default, use configure --enable-xmlj) you need the following installed: @@ -80,7 +85,7 @@ http://www.xmlsoft.org/XSLT/ Minimum version of libxslt required: 1.1.11 - For building the javah tool, you will need the ASM library. + For building the gjavah and grmic tool, you will need the ASM library. Current version 2.2.1 is needed (other 2.2.x versions should be ok; 3.x is not ok). You can get ASM from http://asm.objectweb.org/ Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.187 diff -u -r1.187 configure.ac --- configure.ac 24 Sep 2006 20:12:04 - 1.187 +++ configure.ac 27 Sep 2006 16:56:10 - @@ -809,7 +809,7 @@ dnl --- AC_ARG_WITH([asm], AS_HELP_STRING([--with-asm=ABS.PATH], - [specify path to ASM jar for javah])) + [specify path to ASM jar to enable gjavah and grmic build])) case $with_asm in ) use_asm=false signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: some NIO implementation cleanups
Hi, this small patch cleans some imports and 'new Integer' invocations to 'Integer.valueOf'. This is in preparation of getting the latest Classpath changes in the NIO area to gcj. ChangeLog: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * vm/reference/gnu/java/nio/VMChannel.java: Removed unneeded imports. * vm/reference/gnu/java/nio/VMPipe.java: Removed unneeded imports. * gnu/java/nio/EpollSelectorImpl.java: (doSelect): Use Integer.valueOf() instead of constructor call. (register): Use Integer.valueOf() instead of constructor call. cya Robert Index: gnu/java/nio/EpollSelectorImpl.java === RCS file: /cvsroot/classpath/classpath/gnu/java/nio/EpollSelectorImpl.java,v retrieving revision 1.3 diff -u -r1.3 EpollSelectorImpl.java --- gnu/java/nio/EpollSelectorImpl.java 23 Sep 2006 06:44:13 - 1.3 +++ gnu/java/nio/EpollSelectorImpl.java 27 Sep 2006 21:20:02 - @@ -138,7 +138,7 @@ EpollSelectionKeyImpl key = (EpollSelectionKeyImpl) it.next(); epoll_delete(epoll_fd, key.fd); key.valid = false; -keys.remove(new Integer(key.fd)); +keys.remove(Integer.valueOf(key.fd)); it.remove(); } @@ -161,7 +161,7 @@ ByteBuffer b = selected.slice(); int fd = selected_fd(b); EpollSelectionKeyImpl key - = (EpollSelectionKeyImpl) keys.get(new Integer(fd)); + = (EpollSelectionKeyImpl) keys.get(Integer.valueOf(fd)); if (key == null) throw new IOException(fd was selected, but no key found); key.selectedOps = selected_ops(b) key.interestOps; @@ -228,7 +228,7 @@ int native_fd = channel.getState().getNativeFD(); synchronized (keys) { - if (keys.containsKey(new Integer(native_fd))) + if (keys.containsKey(Integer.valueOf(native_fd))) throw new IllegalArgumentException(channel already registered); EpollSelectionKeyImpl result = new EpollSelectionKeyImpl(this, ch, native_fd); @@ -240,7 +240,7 @@ result.attach(att); result.key = System.identityHashCode(result); epoll_add(epoll_fd, result.fd, ops); - keys.put(new Integer(native_fd), result); + keys.put(Integer.valueOf(native_fd), result); return result; } } Index: vm/reference/gnu/java/nio/VMChannel.java === RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/java/nio/VMChannel.java,v retrieving revision 1.3 diff -u -r1.3 VMChannel.java --- vm/reference/gnu/java/nio/VMChannel.java 25 Sep 2006 21:54:44 - 1.3 +++ vm/reference/gnu/java/nio/VMChannel.java 27 Sep 2006 21:20:02 - @@ -39,12 +39,7 @@ package gnu.java.nio; import gnu.classpath.Configuration; -import gnu.classpath.Pointer; import gnu.classpath.jdwp.exception.NotImplementedException; -import gnu.java.net.PlainSocketImpl; -import gnu.java.nio.PipeImpl.SinkChannelImpl; -import gnu.java.nio.PipeImpl.SourceChannelImpl; -import gnu.java.nio.FileChannelImpl; import java.io.IOException; import java.net.Inet4Address; Index: vm/reference/gnu/java/nio/VMPipe.java === RCS file: /cvsroot/classpath/classpath/vm/reference/gnu/java/nio/VMPipe.java,v retrieving revision 1.3 diff -u -r1.3 VMPipe.java --- vm/reference/gnu/java/nio/VMPipe.java 17 Sep 2006 07:31:43 - 1.3 +++ vm/reference/gnu/java/nio/VMPipe.java 27 Sep 2006 21:20:02 - @@ -38,7 +38,6 @@ package gnu.java.nio; import java.io.IOException; -import java.nio.channels.spi.SelectorProvider; import gnu.classpath.Configuration; /** signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: remove unneeded imports
Hi, another small patch in preparation of the epoll work on gcj. 2006-09-27 Robert Schuster [EMAIL PROTECTED] * gnu/java/nio/VMChannelOwner.java: Removed unneeded imports. cya Robert Index: gnu/java/nio/VMChannelOwner.java === RCS file: /cvsroot/classpath/classpath/gnu/java/nio/VMChannelOwner.java,v retrieving revision 1.1 diff -u -r1.1 VMChannelOwner.java --- gnu/java/nio/VMChannelOwner.java 17 Sep 2006 07:31:41 - 1.1 +++ gnu/java/nio/VMChannelOwner.java 27 Sep 2006 21:41:13 - @@ -38,9 +38,6 @@ package gnu.java.nio; -import java.nio.channels.Channel; -import java.nio.channels.Selector; - /** * This interface is meant to be implemented by any [EMAIL PROTECTED] Channel} * implementation we support that uses a platform-specific [EMAIL PROTECTED] VMChannel} signature.asc Description: OpenPGP digital signature
[commit-cp] classpath INSTALL configure.ac ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/27 17:02:25 Modified files: . : INSTALL configure.ac ChangeLog Log message: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * INSTALL: Added information about grmic being built when ASM is available, added information about gconf dependency, indented Qt4 dependency section. * configure.ac: Added information about grmic being built when ASM is available. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/INSTALL?cvsroot=classpathr1=1.39r2=1.40 http://cvs.savannah.gnu.org/viewcvs/classpath/configure.ac?cvsroot=classpathr1=1.187r2=1.188 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8620r2=1.8621
[commit-cp] classpath gnu/java/nio/EpollSelectorImpl.java C...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/27 21:30:44 Modified files: gnu/java/nio : EpollSelectorImpl.java . : ChangeLog vm/reference/gnu/java/nio: VMChannel.java VMPipe.java Log message: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * vm/reference/gnu/java/nio/VMChannel.java: Removed unneeded imports. * vm/reference/gnu/java/nio/VMPipe.java: Removed unneeded imports. * gnu/java/nio/EpollSelectorImpl.java: (doSelect): Use Integer.valueOf() instead of constructor call. (register): Use Integer.valueOf() instead of constructor call. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/nio/EpollSelectorImpl.java?cvsroot=classpathr1=1.3r2=1.4 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8627r2=1.8628 http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/gnu/java/nio/VMChannel.java?cvsroot=classpathr1=1.3r2=1.4 http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/gnu/java/nio/VMPipe.java?cvsroot=classpathr1=1.3r2=1.4
[commit-cp] classpath gnu/java/nio/VMChannelOwner.java Chan...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/27 21:42:19 Modified files: gnu/java/nio : VMChannelOwner.java . : ChangeLog Log message: 2006-09-27 Robert Schuster [EMAIL PROTECTED] * gnu/java/nio/VMChannelOwner.java: Removed unneeded imports. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/nio/VMChannelOwner.java?cvsroot=classpathr1=1.1r2=1.2 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8628r2=1.8629
supported truststore types
Hi, I am trying to get an application to run which wants to make a HTTPS connection and uses a custom truststore that was generated by the JDK. From trying out it seems that Classpath from HEAD does not support the keystore type 'JKS'. Is this the same for the generics branch? Is it possible to convert a 'JKS' keystore into a 'gkr' one by using the JDK and a Classpath based VM? If so, how would that be done? Regards Robert signature.asc Description: OpenPGP digital signature
Re: Bootstrapping GNU Classpath on Fedora Core 5
Hi all. Robert added the package names needed on Debian to the developer wiki: http://developer.classpath.org/mediation/ClasspathFirstSteps#head-ef627d3b855ba73a11250a2b1fd9a51af45348c8 Thanks Mark for pointing this out. I read the discussion when not sitting at my own computer while preparing a development environment for Classpath. I took this opportunity to document which packages I had to install for a successfull build. It would probably be a good idea to add the development package names for the major GNU/Linux distributions to the INSTALL file. I second that. Please add these package names to the Wiki *and* if you follow the instructions and something did not work the way it was described please change the instructions. :) cya Robert signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: BasicTabbedPaneUI fix
Hi, by calling the getTabRunOverlay method from BasicTabbedPaneUI.calculateTabAreaWidth (and calculateTabAreaHeight) instead of accessing the variable directly the overridden behavior in MetalTabbedPaneUI comes to effect. This fixes the ill positioning of the content area in tabbed panes with more than 2 tab runs (like in our Swing demo). ChangeLog: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (calculateTabAreaHeight): Use getTabRunOverlay method instead of accessing variable directly. (calculateTabAreaWidth): Dito. cya Robert Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v retrieving revision 1.55 diff -u -r1.55 BasicTabbedPaneUI.java --- javax/swing/plaf/basic/BasicTabbedPaneUI.java 24 Aug 2006 17:29:28 - 1.55 +++ javax/swing/plaf/basic/BasicTabbedPaneUI.java 1 Sep 2006 07:16:29 - @@ -902,6 +902,7 @@ default: tabAreaHeight = calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight); + compX = insets.left + contentBorderInsets.left; compY = tabAreaHeight + insets.top + contentBorderInsets.top; } @@ -3528,7 +3529,8 @@ { Insets insets = getTabAreaInsets(tabPlacement); int tabAreaHeight = horizRunCount * maxTabHeight -- (horizRunCount - 1) * tabRunOverlay; +- (horizRunCount - 1) +* getTabRunOverlay(tabPlacement); tabAreaHeight += insets.top + insets.bottom; @@ -3550,7 +3552,8 @@ { Insets insets = getTabAreaInsets(tabPlacement); int tabAreaWidth = vertRunCount * maxTabWidth - - (vertRunCount - 1) * tabRunOverlay; + - (vertRunCount - 1) + * getTabRunOverlay(tabPlacement); tabAreaWidth += insets.left + insets.right; signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: small tab pane demo change
Hi, this fixes the naming in the tabbed pane demo a bit. ChangeLog: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/TabbedPaneDemo.java: (createContent): Changed menu item name and tab naming. cya Robert Index: examples/gnu/classpath/examples/swing/TabbedPaneDemo.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/TabbedPaneDemo.java,v retrieving revision 1.3 diff -u -r1.3 TabbedPaneDemo.java --- examples/gnu/classpath/examples/swing/TabbedPaneDemo.java 16 Aug 2006 00:03:06 - 1.3 +++ examples/gnu/classpath/examples/swing/TabbedPaneDemo.java 1 Sep 2006 17:43:03 - @@ -80,12 +80,12 @@ p.setLayout(new GridLayout(1, 1)); int COUNT = 25; -JTabbedPane tp = createTabbedPane(SwingConstants.TOP, top, COUNT); +JTabbedPane tp = createTabbedPane(SwingConstants.TOP, tab, COUNT); p.add(tp); final JPopupMenu popup = new JPopupMenu(); -JMenu menu = new JMenu(directions); +JMenu menu = new JMenu(tab placement); menu.add(createPlacementChangingMenuItem(top, SwingConstants.TOP, tp)); signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: BasicLookAndFeel properties corrected
Hi, the attached patch fixes some properties of the tabbed panes in BasicLookAndFeel. ChangeLog: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicLookAndFeel.java: (initComponentDefaults): Added, changed and removed some tabbed pane properties. cya Robert Index: javax/swing/plaf/basic/BasicLookAndFeel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v retrieving revision 1.98 diff -u -r1.98 BasicLookAndFeel.java --- javax/swing/plaf/basic/BasicLookAndFeel.java 26 Jul 2006 07:48:55 - 1.98 +++ javax/swing/plaf/basic/BasicLookAndFeel.java 1 Sep 2006 17:58:28 - @@ -1218,10 +1218,10 @@ ctrl UP, requestFocus, ctrl KP_UP, requestFocus }), - TabbedPane.background, new ColorUIResource(light), + TabbedPane.background, new ColorUIResource(192, 192, 192), TabbedPane.contentBorderInsets, new InsetsUIResource(2, 2, 3, 3), - TabbedPane.darkShadow, new ColorUIResource(shadow), - TabbedPane.focus, new ColorUIResource(darkShadow), + TabbedPane.darkShadow, new ColorUIResource(Color.black), + TabbedPane.focus, new ColorUIResource(Color.black), TabbedPane.focusInputMap, new UIDefaults.LazyInputMap(new Object[] { KeyStroke.getKeyStroke(ctrl DOWN), requestFocusForVisibleComponent, KeyStroke.getKeyStroke(KP_UP), navigateUp, @@ -1235,17 +1235,16 @@ KeyStroke.getKeyStroke(DOWN), navigateDown }), TabbedPane.font, new FontUIResource(Dialog, Font.PLAIN, 12), - TabbedPane.foreground, new ColorUIResource(darkShadow), - TabbedPane.highlight, new ColorUIResource(highLight), - TabbedPane.light, new ColorUIResource(highLight), + TabbedPane.foreground, new ColorUIResource(Color.black), + TabbedPane.highlight, new ColorUIResource(Color.white), + TabbedPane.light, new ColorUIResource(192, 192, 192), TabbedPane.selectedTabPadInsets, new InsetsUIResource(2, 2, 2, 1), - TabbedPane.shadow, new ColorUIResource(shadow), - TabbedPane.tabbedPaneContentBorderInsets, new InsetsUIResource(3, 2, 1, 2), - TabbedPane.tabbedPaneTabPadInsets, new InsetsUIResource(1, 1, 1, 1), + TabbedPane.shadow, new ColorUIResource(128, 128, 128), TabbedPane.tabsOpaque, Boolean.TRUE, TabbedPane.tabAreaInsets, new InsetsUIResource(3, 2, 0, 2), TabbedPane.tabInsets, new InsetsUIResource(0, 4, 1, 4), TabbedPane.tabRunOverlay, new Integer(2), + TabbedPane.tabsOverlapBorder, Boolean.FALSE, TabbedPane.textIconGap, new Integer(4), Table.ancestorInputMap, new UIDefaults.LazyInputMap(new Object[] { ctrl DOWN, selectNextRowChangeLead, signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: MetalCheckBoxUI fix
Hi, in order to call the isChecked() method it is not needed to cast a component to a JCheckBox - an AbstractButton is enough. I dont think this costs us anything and makes the class more flexible for all the possible misuses out there. :) ChangeLog: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalCheckBoxIcon.java: (paintIcon): Removed unused import statements, lowered cast requirement from JCheckBox to AbstractButton. cya Robert Index: javax/swing/plaf/metal/MetalCheckBoxIcon.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java,v retrieving revision 1.6 diff -u -r1.6 MetalCheckBoxIcon.java --- javax/swing/plaf/metal/MetalCheckBoxIcon.java 16 Nov 2005 15:43:34 - 1.6 +++ javax/swing/plaf/metal/MetalCheckBoxIcon.java 1 Sep 2006 18:09:25 - @@ -1,5 +1,5 @@ /* MetalCheckBoxIcon.java -- An icon for JCheckBoxes in the Metal LF - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -42,8 +42,8 @@ import java.awt.Graphics; import java.io.Serializable; +import javax.swing.AbstractButton; import javax.swing.Icon; -import javax.swing.JCheckBox; import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.plaf.UIResource; @@ -134,8 +134,9 @@ MetalUtils.paintGradient(g, x, y, getIconWidth(), getIconHeight(), SwingConstants.VERTICAL, CheckBox.gradient); border.paintBorder(c, g, x, y, getIconWidth(), getIconHeight()); -JCheckBox cb = (JCheckBox) c; -if (cb.isSelected()) - drawCheck(c, g, x, y); + +AbstractButton b = (AbstractButton) c; +if (b.isSelected()) + drawCheck(b, g, x, y); } } signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: DefaultTableMode fix
Hi, the attached patch fixes a NullPointerException for me. ChangeLog: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/table/DefaultTableModel.java: (checkSize): Added null check for dataVector. cya Robert Index: javax/swing/table/DefaultTableModel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/table/DefaultTableModel.java,v retrieving revision 1.16 diff -u -r1.16 DefaultTableModel.java --- javax/swing/table/DefaultTableModel.java 17 May 2006 20:52:05 - 1.16 +++ javax/swing/table/DefaultTableModel.java 1 Sep 2006 18:37:47 - @@ -625,7 +625,7 @@ if (columnCount columnIdentifiers.size()) columnIdentifiers.setSize(columnCount); -if (rowCount dataVector.size()) +if (dataVector != null rowCount dataVector.size()) { int rowsToAdd = rowCount - dataVector.size(); addExtraRows(rowsToAdd, columnCount); signature.asc Description: OpenPGP digital signature
[commit-cp] classpath javax/swing/plaf/basic/BasicTabbedPan...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/01 07:18:54 Modified files: javax/swing/plaf/basic: BasicTabbedPaneUI.java . : ChangeLog Log message: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (calculateTabAreaHeight): Use getTabRunOverlay method instead of accessing variable directly. (calculateTabAreaWidth): Dito. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java?cvsroot=classpathr1=1.55r2=1.56 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8483r2=1.8484
[commit-cp] classpath examples/gnu/classpath/examples/swing...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/01 17:46:11 Modified files: examples/gnu/classpath/examples/swing: TabbedPaneDemo.java . : ChangeLog Log message: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/TabbedPaneDemo.java: (createContent): Changed menu item name and tab naming. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/examples/gnu/classpath/examples/swing/TabbedPaneDemo.java?cvsroot=classpathr1=1.3r2=1.4 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8485r2=1.8486
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/01 18:02:06 Modified files: . : ChangeLog Log message: Fixed my last entry. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8487r2=1.8488
[commit-cp] classpath javax/swing/plaf/metal/MetalCheckBoxI...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/01 18:11:18 Modified files: javax/swing/plaf/metal: MetalCheckBoxIcon.java . : ChangeLog Log message: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalCheckBoxIcon.java: (paintIcon): Removed unused import statements, lowered cast requirement from JCheckBox to AbstractButton. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java?cvsroot=classpathr1=1.6r2=1.7 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8488r2=1.8489
[commit-cp] classpath javax/swing/plaf/basic/BasicSplitPane...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/09/01 18:23:58 Modified files: javax/swing/plaf/basic: BasicSplitPaneUI.java . : ChangeLog Log message: 2006-09-01 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicSplitPaneUI.java: (BasicHorizontalLayout.getAlignmentX): Return fixed value. (BasicHorizontalLayout.getAlignmentY): Return fixed value. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java?cvsroot=classpathr1=1.32r2=1.33 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8489r2=1.8490
[cp-patches] FYI: DefaultButtonModel - expression simplification
Hi, this small patch simplifies an expression. ChangeLog: 2006-08-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/DefaultButtonModel.java: (setRollover): Simplified statement. cya Robert Index: javax/swing/DefaultButtonModel.java === RCS file: /cvsroot/classpath/classpath/javax/swing/DefaultButtonModel.java,v retrieving revision 1.29 diff -u -r1.29 DefaultButtonModel.java --- javax/swing/DefaultButtonModel.java 16 Jun 2006 13:44:59 - 1.29 +++ javax/swing/DefaultButtonModel.java 17 Aug 2006 00:03:19 - @@ -425,7 +425,7 @@ public void setRollover(boolean r) { // if this call does not represent a CHANGE in state, then return -if ((r isRollover()) || (!r !isRollover())) +if (r == isRollover()) return; // cannot set ROLLOVER property unless button is enabled signature.asc Description: OpenPGP digital signature
[commit-cp] classpath ChangeLog javax/swing/DefaultButtonMo...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/17 09:01:46 Modified files: . : ChangeLog javax/swing: DefaultButtonModel.java Log message: 2006-08-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/DefaultButtonModel.java: (setRollover): Simplified statement. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8416r2=1.8417 http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/DefaultButtonModel.java?cvsroot=classpathr1=1.29r2=1.30
[cp-patches] FYI: BasicTabbedPaneUI fixes
Hi, here is another small patch which makes JTabbedPane behave more like in the RI. This fixes: - changing the placement should result in a specific behavior in regard to the current scroll location (see comment in PropertyChangeHandler.propertyChange) - in SCROLL_TAB_LAYOUT mode the tabs are in a sub-component. This means that a MouseListener installed on the JTabbedPane is normally not triggered if something happens in that area. I fixed that by adding a logic into the tabbed pane's own MouseHanlder (which is installed on the internal subcomponent, too) that recognizes such a situation and redispatches a properly modified MouseEvent to the JTabbedPane. With that patch my PopupMenu-enhanced JTabbedPane demo (yay!) works now more like on the RI. Still need to figure out how they make it react on actions in the content area ... 2006-08-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (MouseHandler.mouseReleased): Implemented. (MouseHandler.mousePressed): Added delegation to tabbed pane. (MouseHandler.mouseEntered): Dito. (MouseHandler.mouseExited): Dito. (MouseHandler.mouseMoved): Dito. (MouseHandler.redispatchEvent): New method. (PropertyChangeHandler.propertyChange): Added extra block level, added code to handle tab placement changes, added comment. (updateViewPosition): Set unneeded coordinate to 0, added comment. cya Robert Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v retrieving revision 1.51 diff -u -r1.51 BasicTabbedPaneUI.java --- javax/swing/plaf/basic/BasicTabbedPaneUI.java 15 Aug 2006 23:46:47 - 1.51 +++ javax/swing/plaf/basic/BasicTabbedPaneUI.java 16 Aug 2006 22:48:29 - @@ -252,7 +252,16 @@ { public void mouseReleased(MouseEvent e) { - // Nothing to do here. + Object s = e.getSource(); + + // Event may originate from the viewport in + // SCROLL_TAB_LAYOUT mode. It is redisptached + // through the tabbed pane then. + if (tabPane != e.getSource()) +{ + redispatchEvent(e); + e.setSource(s); +} } /** @@ -264,6 +273,16 @@ public void mousePressed(MouseEvent e) { Object s = e.getSource(); + + // Event may originate from the viewport in + // SCROLL_TAB_LAYOUT mode. It is redisptached + // through the tabbed pane then. + if (tabPane != e.getSource()) +{ + redispatchEvent(e); + e.setSource(s); +} + int placement = tabPane.getTabPlacement(); if (s == incrButton) @@ -361,11 +380,22 @@ * Receives notification when the mouse pointer has entered the tabbed * pane. * - * @param ev the mouse event + * @param e the mouse event */ -public void mouseEntered(MouseEvent ev) +public void mouseEntered(MouseEvent e) { - int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY()); + Object s = e.getSource(); + + // Event may originate from the viewport in + // SCROLL_TAB_LAYOUT mode. It is redisptached + // through the tabbed pane then. + if (tabPane != e.getSource()) +{ + redispatchEvent(e); + e.setSource(s); +} + + int tabIndex = tabForCoordinate(tabPane, e.getX(), e.getY()); setRolloverTab(tabIndex); } @@ -373,10 +403,21 @@ * Receives notification when the mouse pointer has exited the tabbed * pane. * - * @param ev the mouse event + * @param e the mouse event */ -public void mouseExited(MouseEvent ev) +public void mouseExited(MouseEvent e) { + Object s = e.getSource(); + + // Event may originate from the viewport in + // SCROLL_TAB_LAYOUT mode. It is redisptached + // through the tabbed pane then. + if (tabPane != e.getSource()) +{ + redispatchEvent(e); + e.setSource(s); +} + setRolloverTab(-1); } @@ -388,9 +429,37 @@ */ public void mouseMoved(MouseEvent ev) { + Object s = ev.getSource(); + + if (tabPane != ev.getSource()) +{ + ev.setSource(tabPane); + tabPane.dispatchEvent(ev); + + ev.setSource(s); +} + int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY()); setRolloverTab(tabIndex); } + +/** Modifies the mouse event to originate from + * the tabbed pane and redispatches it. + * + * @param me + */ +void redispatchEvent(MouseEvent me) +{ + me.setSource(tabPane); + Point viewPos = viewport.getViewPosition(); + viewPos.x -= viewport.getX(); + viewPos.y -= viewport.getY(); + me.translatePoint(-viewPos.x, -viewPos.y
[cp-patches] FYI: more BasicTabbedPaneUI MetalTabbedPaneUI fixes
Hi, yet another patch related to the tabbed panes' UI classes. getTabBounds() was not spec conform in the way that it did not calculated the scroll offset in. By not doing that subclasses could not properly find out whether a tab may be out of bounds. By fixing that tabs painted in the MetalTheme now properly display the broken line when a tab adjacent to the content area is selected (which is always the case in scrolling tab layout mode). Another small fix for MetalTabbedPaneUI corrects an argument value. Now a line of the left edge is painted completely vertical. the ChangeLog: 2006-08-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (getTabBounds(JTabbedPane, int)): Added code to shift rectangle by current scroll offset, added method documention. (getTabBounds(int, Rectangle)): Added method documentation. * javax/swing/plaf/metal/MetalTabbedPaneUI.java: (paintContentBorderLeftEdge): Changed y to 1. cya Robert Index: javax/swing/plaf/basic/BasicTabbedPaneUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,v retrieving revision 1.52 diff -u -r1.52 BasicTabbedPaneUI.java --- javax/swing/plaf/basic/BasicTabbedPaneUI.java 16 Aug 2006 22:55:02 - 1.52 +++ javax/swing/plaf/basic/BasicTabbedPaneUI.java 16 Aug 2006 23:37:32 - @@ -3111,8 +3111,13 @@ } /** - * This method returns the tab bounds for the given index. - * + * pThis method returns the bounds of a tab for the given index + * and shifts it by the current scrolling offset if the tabbed + * pane is in scrolling tab layout mode./p + * + * pSubclassses should retrievs a tab's bounds by this method + * if they want to find out whether the tab is currently visible./p + * * @param pane The JTabbedPane. * @param i The index to look for. * @@ -3123,6 +3128,26 @@ // Need to re-layout container if tab does not exist. if (i = rects.length) layoutManager.layoutContainer(pane); + +// Properly shift coordinates if scrolling has taken +// place. +if (pane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT) + { +Rectangle r = new Rectangle(rects[i]); + +switch(pane.getTabPlacement()) +{ + case SwingConstants.TOP: + case SwingConstants.BOTTOM: +r.x -= currentScrollOffset; +break; + default: +r.y -= currentScrollOffset; +} + +return r; + } + return rects[i]; } @@ -3171,7 +3196,10 @@ } /** - * This method returns the tab bounds in the given rectangle. + * pThis method returns the tab bounds in the given rectangle./p + * + * pThe returned rectangle will be shifted by the current scroll + * offset if the tabbed pane is in scrolling tab layout mode./p. * * @param tabIndex The index to get bounds for. * @param dest The rectangle to store bounds in. Index: javax/swing/plaf/metal/MetalTabbedPaneUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,v retrieving revision 1.21 diff -u -r1.21 MetalTabbedPaneUI.java --- javax/swing/plaf/metal/MetalTabbedPaneUI.java 27 Jul 2006 01:28:41 - 1.21 +++ javax/swing/plaf/metal/MetalTabbedPaneUI.java 16 Aug 2006 23:37:32 - @@ -1159,7 +1159,7 @@ g.drawLine(x + 1, y + 1, x + 1, rect.y + 1); if (rect.y + rect.height y + h - 2) { -g.drawLine(x + y, rect.y + rect.height + 1, x + 1, y + h + 2); +g.drawLine(x + 1, rect.y + rect.height + 1, x + 1, y + h + 2); } } } signature.asc Description: OpenPGP digital signature
[commit-cp] classpath javax/swing/plaf/basic/BasicTabbedPan...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/16 22:55:04 Modified files: javax/swing/plaf/basic: BasicTabbedPaneUI.java . : ChangeLog Log message: 2006-08-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (MouseHandler.mouseReleased): Implemented. (MouseHandler.mousePressed): Added delegation to tabbed pane. (MouseHandler.mouseEntered): Dito. (MouseHandler.mouseExited): Dito. (MouseHandler.mouseMoved): Dito. (MouseHandler.redispatchEvent): New method. (PropertyChangeHandler.propertyChange): Added extra block level, added code to handle tab placement changes, added comment. (updateViewPosition): Set unneeded coordinate to 0, added comment. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java?cvsroot=classpathr1=1.51r2=1.52 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8413r2=1.8414
[commit-cp] classpath javax/swing/plaf/basic/BasicTabbedPan...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/16 23:40:47 Modified files: javax/swing/plaf/basic: BasicTabbedPaneUI.java javax/swing/plaf/metal: MetalTabbedPaneUI.java . : ChangeLog Log message: 2006-08-17 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (getTabBounds(JTabbedPane, int)): Added code to shift rectangle by current scroll offset, added method documention. (getTabBounds(int, Rectangle)): Added method documentation. * javax/swing/plaf/metal/MetalTabbedPaneUI.java: (paintContentBorderLeftEdge): Changed y to 1. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java?cvsroot=classpathr1=1.52r2=1.53 http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java?cvsroot=classpathr1=1.21r2=1.22 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8414r2=1.8415
Re: [cp-patches] FYI: Vector fixlet
Hi Roman, could you please add a comment to these methods that says that the NPEs are supposed to be thrown implicitly. Otherwise I find it a bit odd that the javadoc mentions the exceptions explicitly. cya Robert Roman Kennke wrote: This removes 2 explicit null checks in Vector. The Mauve test that I'll commit right after this shows that the RI allows null arguments when the Vector is empty. In the other case we throw an NPE implicitly anyway. 2006-08-15 Roman Kennke [EMAIL PROTECTED] * java/util/Vector.java (removeAll): Don't explicitly null-check here. The RI allows null arguments when Vector is empty. In other cases we implicitly throw an NPE. (retainAll): Don't explicitly null-check here. The RI allows null arguments when Vector is empty. In other cases we implicitly throw an NPE. /Roman signature.asc Description: OpenPGP digital signature
[commit-cp] classpath javax/swing/text/WrappedPlainView.jav...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/15 23:43:19 Modified files: javax/swing/text: WrappedPlainView.java . : ChangeLog Log message: 2006-08-16 Robert Schuster [EMAIL PROTECTED] * javax/swing/text/WrappedPlainView.java: (WrappedLine.modelToView): Provide variable pos as argument and not a fixed value. (calculateBreakPosition): Add p0 to return value. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/WrappedPlainView.java?cvsroot=classpathr1=1.22r2=1.23 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8406r2=1.8407
[commit-cp] classpath javax/swing/plaf/basic/BasicTabbedPan...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/15 23:46:47 Modified files: javax/swing/plaf/basic: BasicTabbedPaneUI.java . : ChangeLog Log message: 2006-08-16 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: (MouseHandler.mousePressed): Fixed indentation, intercept clicks on disabled tabs, do proper revalidation in WRAP_TAB_LAYOUT mode. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java?cvsroot=classpathr1=1.50r2=1.51 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8407r2=1.8408
[commit-cp] classpath examples/gnu/classpath/examples/swing...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/16 00:03:07 Modified files: examples/gnu/classpath/examples/swing: TabbedPaneDemo.java . : ChangeLog Log message: 2006-08-16 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/demo/swing/TabbedPaneDemo.java: (createContent): Rewritten. (createPlacementChangingMenuItem): New method. (createLayoutPolicyChangingMenuItem): New method. (createTabbedPane): New method. (createTabContent): New method. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/examples/gnu/classpath/examples/swing/TabbedPaneDemo.java?cvsroot=classpathr1=1.2r2=1.3 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8408r2=1.8409
[cp-patches] FYI: MetalBorders and MetalMenuBarUI
Hi, this fumbles a bit with the way the gradient and the border is painted for JMenu components. Still need to find out how 'they' manage to join the painting of a JMenu with a adjacent JToolBar ... 2006-08-04 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalMenuBarUI.java: (update): Check size and paint smaller gradient. * javax/swing/plaf/metal/MetalBorders.java: (MenuBarBorder): Removed borderColor field. (MenuBarBorder.paintBorder): Added note, fetch color from UIManager or MetalLookAndFeel. cya Robert Index: javax/swing/plaf/metal/MetalMenuBarUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java,v retrieving revision 1.1 diff -u -r1.1 MetalMenuBarUI.java --- javax/swing/plaf/metal/MetalMenuBarUI.java 16 Nov 2005 15:44:05 - 1.1 +++ javax/swing/plaf/metal/MetalMenuBarUI.java 16 Jun 2006 12:54:19 - @@ -44,6 +44,7 @@ import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicMenuBarUI; /** @@ -75,7 +76,9 @@ */ public void update(Graphics g, JComponent c) { -if (c.isOpaque() UIManager.get(MenuBar.gradient) != null) +if (c.isOpaque() + UIManager.get(MenuBar.gradient) != null + c.getBackground() instanceof UIResource) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, MenuBar.gradient); signature.asc Description: OpenPGP digital signature
Re: [cp-patches] FYI: MetalBorders and MetalMenuBarUI
Sorry, I attached the wrong patch. Here is the correct one. @Mark: This is a small fix which may enter 0.92. cya Robert Robert Schuster wrote: Hi, this fumbles a bit with the way the gradient and the border is painted for JMenu components. Still need to find out how 'they' manage to join the painting of a JMenu with a adjacent JToolBar ... 2006-08-04 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalMenuBarUI.java: (update): Check size and paint smaller gradient. * javax/swing/plaf/metal/MetalBorders.java: (MenuBarBorder): Removed borderColor field. (MenuBarBorder.paintBorder): Added note, fetch color from UIManager or MetalLookAndFeel. cya Robert Index: javax/swing/plaf/metal/MetalBorders.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalBorders.java,v retrieving revision 1.35 diff -u -r1.35 MetalBorders.java --- javax/swing/plaf/metal/MetalBorders.java 18 May 2006 17:07:36 - 1.35 +++ javax/swing/plaf/metal/MetalBorders.java 3 Aug 2006 22:21:18 - @@ -926,15 +926,11 @@ /** The border insets. */ protected static Insets borderInsets = new Insets(1, 0, 1, 0); -// TODO: find where this color really comes from -private static Color borderColor = new Color(153, 153, 153); - /** * Creates a new border instance. */ public MenuBarBorder() { - // Nothing to do here. } /** @@ -951,7 +947,17 @@ public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) { - g.setColor(borderColor); + // Although it is not correct to decide on the static property + // currentTheme which color to use the RI does it like that. + // The trouble is that by simply changing the current theme to + // e.g. DefaultMetalLookAndFeel this method will use another color + // although a change in painting behavior should be expected only + // after setting a new look and feel and updating all components. + if(MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme) +g.setColor(UIManager.getColor(MenuBar.borderColor)); + else +g.setColor(MetalLookAndFeel.getControlShadow()); + g.drawLine(x, y + h - 1, x + w, y + h - 1); } Index: javax/swing/plaf/metal/MetalMenuBarUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java,v retrieving revision 1.2 diff -u -r1.2 MetalMenuBarUI.java --- javax/swing/plaf/metal/MetalMenuBarUI.java 16 Jun 2006 12:54:46 - 1.2 +++ javax/swing/plaf/metal/MetalMenuBarUI.java 3 Aug 2006 22:21:18 - @@ -1,5 +1,5 @@ /* MetalMenuBarUI.java -- MenuBar UI for the Metal LF - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -76,12 +76,15 @@ */ public void update(Graphics g, JComponent c) { +int height = c.getHeight(); if (c.isOpaque() UIManager.get(MenuBar.gradient) != null - c.getBackground() instanceof UIResource) + c.getBackground() instanceof UIResource + height 2) { -MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), +MetalUtils.paintGradient(g, 0, 0, c.getWidth(), height - 2, SwingConstants.VERTICAL, MenuBar.gradient); + paint(g, c); } else signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: DomIterator fix
Hi, this small patchlet, suggested by Henrik Gulbrandsen, fixes another case of PR27864. 2006-08-04 Robert Schuster [EMAIL PROTECTED] Reported by Henrik Gulbrandsen [EMAIL PROTECTED] Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Added if-statement. cya Robert Index: gnu/xml/dom/DomIterator.java === RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomIterator.java,v retrieving revision 1.5 diff -u -r1.5 DomIterator.java --- gnu/xml/dom/DomIterator.java 8 Jun 2006 09:36:02 - 1.5 +++ gnu/xml/dom/DomIterator.java 3 Aug 2006 23:59:25 - @@ -253,7 +253,13 @@ { return here.getFirstChild(); } - + +// There's no way up or sideways from the root, so if we +// couldn't move down to a child, there's nowhere to go. +// +if (here == root) + return null; + // // Siblings ... if forward, we visit them, if backwards // we visit their children first. signature.asc Description: OpenPGP digital signature
[commit-cp] classpath gnu/xml/dom/DomIterator.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/08/04 00:01:54 Modified files: gnu/xml/dom: DomIterator.java . : ChangeLog Log message: 2006-08-04 Robert Schuster [EMAIL PROTECTED] Reported by Henrik Gulbrandsen [EMAIL PROTECTED] Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Added if-statement. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/dom/DomIterator.java?cvsroot=classpathr1=1.5r2=1.6 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8313r2=1.8314
Re: [cp-patches] FYI: JTabbedPane fixes
Ok, I revert this and look for another way to resolve this. Thanks Mark for finding this! @Roman: The doc for setSelectedComponent() says it does the hiding and showing of the old and new selected component. However I saw no code in that method which does it. That is why I thought it should be added here. Please add notes to code which relies on a certain behavior of the UI. cya Robert Mark Wielaard wrote: Hi Robert, On Tue, 2006-07-25 at 21:21 +0200, Robert Schuster wrote: Hi, this patch fixes some minor JTabbedPane issues. 2006-07-25 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (remove(Component)): Rewritten. (setSelectedIndex): Implemented updating of component visibility state. This seems to revert part of a patch from Roman: 2006-06-09 Roman Kennke [EMAIL PROTECTED] * javax/swing/JTabbedPane.java (setSelectedIndex): Don't change the visibility of the components, this is done by the UI class. * javax/swing/plaf/basic/BasicTabbedPaneUI.java (TabbedPaneLayout.layoutContainer): Change visibility of component here, depending on the selected index. Only do this if the new selected component is not null. Some programs seem to expect this. (visibleComponent): New field. (getVisibleComponent): Changed to return visibleComponent field. (setVisibleComponent): Changed to set the visibility of the old and new visible component. And it does indeed seem to break the showcase application Roman posted about: http://kennke.org/blog/?p=9 Could you coordinate on a correct fix? Thanks, Mark signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: revert JTabbedPane.setSelectedIndex patch
Hi, this reverts yesterdays change to JTabbedPane.setSelectedIndex and adds a note. ChangeLog: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (setSelectedIndex): Removed updating of component visibility status, added note. cya Robert Index: javax/swing/JTabbedPane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v retrieving revision 1.42 diff -u -r1.42 JTabbedPane.java --- javax/swing/JTabbedPane.java 25 Jul 2006 19:20:28 - 1.42 +++ javax/swing/JTabbedPane.java 26 Jul 2006 13:59:24 - @@ -991,16 +991,8 @@ if (index != getSelectedIndex()) { // Hiding and showing the involved components -// is important for the focus traversal mechanism -// to report the correct source and destination -// components. -Component c = getSelectedComponent(); -if (c != null) - c.setVisible(false); - +// is done by the JTabbedPane's UI. model.setSelectedIndex(index); - -getSelectedComponent().setVisible(true); } } signature.asc Description: OpenPGP digital signature
Re: [cp-patches] FYI: revert JTabbedPane.setSelectedIndex patch
Hi, actually the patch was applied in the following way: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (setSelectedIndex): Removed updating of component visibility status, added note. (remove(Component)): Use indexOfComponent() to find whether we have to use super.remove(int) or removeTabAt(). cya Robert Robert Schuster wrote: Hi, this reverts yesterdays change to JTabbedPane.setSelectedIndex and adds a note. ChangeLog: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (setSelectedIndex): Removed updating of component visibility status, added note. cya Robert Index: javax/swing/JTabbedPane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- javax/swing/JTabbedPane.java 25 Jul 2006 19:20:28 - 1.42 +++ javax/swing/JTabbedPane.java 26 Jul 2006 14:45:33 - 1.43 @@ -991,16 +991,8 @@ if (index != getSelectedIndex()) { // Hiding and showing the involved components -// is important for the focus traversal mechanism -// to report the correct source and destination -// components. -Component c = getSelectedComponent(); -if (c != null) - c.setVisible(false); - +// is done by the JTabbedPane's UI. model.setSelectedIndex(index); - -getSelectedComponent().setVisible(true); } } @@ -1257,17 +1249,24 @@ */ public void remove(Component component) { -// Container.remove(Component) is implemented in a -// way that it calls Container.remove(int). Since -// JTabbedPane's remove(int) is overridden to -// remove tabs and this in turn should not happen -// with components implementing UIResource -// we find out the component's index and -// call the superclass' remove(int) method +// Since components implementing UIResource +// are not added as regular tabs by the add() +// methods we have to take special care when +// removing these object. Especially +// Container.remove(Component) cannot be used +// because it will call JTabbedPane.remove(int) +// later which is overridden and can only +// handle tab components. +// This implementation can even cope with a +// situation that someone called insertTab() +// with a component that implements UIResource. +int index = indexOfComponent(component); + +// If the component is not a tab component +// find out its Container-given index +// and call that class' implementation // directly. -// For non-UIResource implementing components -// the normal implementation is suitable. -if (component instanceof UIResource) +if (index == -1) { Component[] cs = getComponents(); for (int i = 0; i cs.length; i++) @@ -1275,7 +1274,7 @@ super.remove(i); } else - super.remove(component); + removeTabAt(index); } /** signature.asc Description: PGP signature signature.asc Description: OpenPGP digital signature
Re: [cp-patches] RFC: Stroking fix
Hi, unfortunately I cannot say whether your fixes are mathematically right. However I tried some piccolo apps[0] which I wrote years ago. Some of them worked already but the ones that indirectly make use of BasicStroke did not work yet. With your patch these problems are solved. The piccolo distribution[1] contains an example application. With your patch most of them work now! Great stuff. cya Robert [0] - http://www.inf.fu-berlin.de/~rschuste/picoapps.tar.gz [1] - http://www.cs.umd.edu/hcil/jazz/ Francis Kung wrote: Hello, Attached is a patch to implement, fix, and clean up aspects of BasicStroke.createStrokedShape() I would appreciate any comments anyone might have. Thanks, Francis 2006-07-25 Francis Kung [EMAIL PROTECTED] * gnu/java/awt/java2d/CubicSegment.java: Added import. (cp1): Renamed from first(). (c2): Renamed from last(). (first): Renamed to cp1(). (getDisplacedSegments): Implemented. (last): Renamed to cp2(). * gnu/java/awt/java2d/LineSegment.java (cp1): Renamed from first(). (c2): Renamed from last(). (first): Renamed to cp1(). (last): Renamed to cp2(). * gnu/java/awt/java2d/QuadSegment.java (cp1): Renamed from first(). (c2): Renamed from last(). (first): Renamed to cp1(). (last): Renamed to cp2(). * gnu/java/awt/java2d/Segment.java: Added comments. (first): New field. (Segment): Keep track of first element in list. (add): Update first last element variables. (cp1): Renamed from first(). (c2): Renamed from last(). (first()): Renamed to cp1() to reduce ambiguity. (last()): Renamed to cp2() to reduce ambiguity. (reverseAll): Update first element variable.. * gnu/java/awt/peer/gtk/CairoGraphics2D.java (draw): Remove flattening path iterator. * java/awt/BasicStroke.java: Clarified comments. (addSegments): Refactored some code into joinSegments and joinInnerSegments. (capEnd): Rename of Segment.first() and Segment.end(). (joinInnerSegments): New method. (joinOuterSegments): New method. (joinSegments): Refactored some code into joinOuterSegments. (solidStroke): Connect segments together properly. Index: gnu/java/awt/java2d/CubicSegment.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/java2d/CubicSegment.java,v retrieving revision 1.2 diff -u -r1.2 CubicSegment.java --- gnu/java/awt/java2d/CubicSegment.java 10 Jul 2006 18:43:38 - 1.2 +++ gnu/java/awt/java2d/CubicSegment.java 25 Jul 2006 21:38:29 - @@ -39,6 +39,7 @@ package gnu.java.awt.java2d; +import java.awt.geom.CubicCurve2D; import java.awt.geom.Point2D; /** @@ -100,28 +101,67 @@ } /** - * Get the top and bottom segments of this segment. - * First array element is p0 + normal, second is p0 - normal. + * Get the top and bottom segments of this segment. First array element is + * p0 + normal, second is p0 - normal. */ public Segment[] getDisplacedSegments(double radius) { +// It is, apparently, impossible to derive a curve parallel to a bezier +// curve (unless it's a straight line), so we have no choice but to +// approximate the displaced segments. Similar to FlattenPathIterator. + +Segment segmentTop = null; +Segment segmentBottom = null; this.radius = radius; -double x0 = P1.getX(); -double y0 = P1.getY(); -double x1 = cp1.getX(); -double y1 = cp1.getY(); -double x2 = cp2.getX(); -double y2 = cp2.getY(); -double x3 = P2.getX(); -double y3 = P2.getY(); -double[] p1 = normal(x0, y0, x1, y1); -double[] p2 = normal(x2, y2, x3, y3); - -// FIXME: Doesn't compile. -// return new Segment[]{s1, s2}; -return new Segment[0]; - } +CubicCurve2D[] curves = new CubicCurve2D[10]; +curves[0] = new CubicCurve2D.Double(P1.getX(), P1.getY(), cp1.getX(), +cp1.getY(), cp2.getX(), cp2.getY(), +P2.getX(), P2.getY()); +int numCurves = 1; + +// Hard-coded a recursion limit of 10 and flatness of 1... should we make +// this an option somewhere? +while (numCurves 0) + { +// The curve is flat enough, or we've reached our recursion limit, +// so take the current start/end points and add it as a line segment +// to our final approximated curves +if (curves[numCurves - 1].getFlatness() = 1 || numCurves == 10) + { +Segment[] displaced = new LineSegment( + curves[numCurves - 1].getP1(), +
[cp-patches] FYI: CairoGraphics2D.drawLine fix
Hi, Roman asked me to look again at the drawLine issue and I now changed the code to unconditionally apply a shift to all non-1-pixel lines. With that Swing compos look good again and 1-pixel lines still work. ChangeLog: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoGraphics2D.java: (drawLine): Apply shift to line coordinates. cya Robert Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- gnu/java/awt/peer/gtk/CairoGraphics2D.java 25 Jul 2006 20:58:19 - 1.33 +++ gnu/java/awt/peer/gtk/CairoGraphics2D.java 26 Jul 2006 18:20:11 - 1.34 @@ -1044,7 +1044,7 @@ if (x1 == x2 y1 == y2) cairoFillRect(nativePointer, x1, y1, 1, 1); else - cairoDrawLine(nativePointer, x1, y1, x2, y2); + cairoDrawLine(nativePointer, x1 + 0.5, y1 + 0.5, x2 + 0.5, y2 + 0.5); } public void drawRect(int x, int y, int width, int height) signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/javax/swing JTabbedPane.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/26 14:45:35 Modified files: javax/swing: JTabbedPane.java . : ChangeLog Log message: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (setSelectedIndex): Removed updating of component visibility status, added note. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JTabbedPane.java?cvsroot=classpathr1=1.42r2=1.43 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8229r2=1.8230
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/26 14:47:29 Modified files: . : ChangeLog Log message: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (setSelectedIndex): Removed updating of component visibility status, added note. (remove(Component)): Use indexOfComponent() to find whether we have to use super.remove(int) or removeTabAt(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8230r2=1.8231
[commit-cp] classpath/java/awt/image ColorConvertOp.java Co...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/26 18:14:05 Modified files: java/awt/image : ColorConvertOp.java ColorModel.java . : ChangeLog Log message: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * java/awt/image/ColorConvertOp.java: Fixed copyright header. (copyimage): Do not call setRenderingHints() when the respective map does not exist. (filter): Removed code to clone the ColorModel instance. * java/awt/image/ColorModel.java: (cloneColorModel): Removed. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/image/ColorConvertOp.java?cvsroot=classpathr1=1.4r2=1.5 http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/image/ColorModel.java?cvsroot=classpathr1=1.29r2=1.30 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8231r2=1.8232
[commit-cp] classpath ChangeLog gnu/java/awt/peer/gtk/Cairo...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/26 18:20:11 Modified files: . : ChangeLog gnu/java/awt/peer/gtk: CairoGraphics2D.java Log message: 2006-07-26 Robert Schuster [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoGraphics2D.java: (drawLine): Apply shift to line coordinates. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8232r2=1.8233 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpathr1=1.33r2=1.34
[commit-cp] classpath/javax/swing/plaf basic/BasicTabbedPan...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/27 01:28:42 Modified files: javax/swing/plaf/basic: BasicTabbedPaneUI.java javax/swing/plaf/metal: MetalTabbedPaneUI.java . : ChangeLog Log message: 2006-07-27 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTabbedPaneUI.java: Fixed copyright and authorship. (NavigateAction): New inner class. (NavigatePageDownAction): New inner class. (NavigatePageUpAction): New inner class. (RequestFocusAction): New inner class. (RequestFocusForVisibleComponentAction): New inner class. (FocusHandler.focusGained): Implemented. (FocusHandler.focusLost): Implemented. (MouseHandler.mouseReleased): Implemented. (MouseHandler.mousePressed): Rewritten. (PropertyChangeHandler.propertyChange): Reset currentScrollOffset and currentScrollLocation to 0. (TabbedPaneLayout.calculateSize): Stored tab count in local variable, removed local variables, fixed indentation to stay under 80 column limit. (TabbedPaneLayout.calculateTabRects): Decrease tab area position by one, set selectedIndex to 0 if its negative, corrected start values for normalization, suppressed padding when only one tab run, (TabbedPaneLayout.minimumLayoutSize): Toggled argument value. (TabbedPaneLayout.normalizeTabRuns): Fixed indentation to stay under 80 column limit, corrected the starting value for the bounds fixing phase. (TabbedPaneLayout.preferredTabAreaWidth): Fixed indentation. (TabbedPaneLayout.rotateTabInRuns): Corrected comparison value for selectedRun, set start index for loop to 0. (TabbedPaneScrollLayout.preferredLayoutSize): Toggled argument value. (TabbedPaneScrollLayout.calculateTabRects): Rewritten. (TabbedPaneScrollLayout.layoutContainer): Added scrolling button alignment and visibility handling. (TabSelectionHandler.stateChanged): Do revalidation only in wrap tab layout mode. (ScrollingPanel.ScrollingPanelUI.paint): Rewritten. (currentScrollOffset): New field. (tabRuns): Rewritten documentation. (selectedColor): New field. (tempTextRect): New field. (tempIconRect): New field. (scrollTab): New method. (updateButtons): New method. (updateViewPosition): New method. (createLayoutManager): Reordered method calls, predefine new fields, register proper listeners. (uninstallComponents): Implemented. (installDefaults): Corrected property names, fixed indentation,. (uninstallDefaults): Set new fields to null. (uninstallListeners): Remove listeners from components neccessary for scrolling tab layout. (installKeyboardActions): Implemented. (uninstallKeyboardActions): Implemented. (paint): Paint tab area background. (paintTabArea): Fixed indentation, removed usage of local Rectangle objects. (getTabLabelShiftX): Rewritten. (getTabLabelShiftY): Rewritten. (paintFocusIndicator): Reindented. (paintTabBorder): Rewritten. (paintTabBackground): Corrected color usage, rewritten background rectangle painting. (paintContentBorderTopEdge): Rewritten. (paintContentBorderBottomEdge): Rewritten. (paintContentBorderLeftEdge): Rewritten. (paintContentBorderRightEdge): Rewritten. (tabForCoordinate): Return selected index when no tab could be found, removed FIXME note. (getRunForTab): Changed return value for first if-statement. (navigateSelectedTab): Fixed last argument for both getTabRunOffset() calls. (selectedNextTabInRun): Added scrolling code. (selectedPreviousTabInRun): Added scrolling code. (selectedNextTab): Added scrolling code. (selectedPreviousTab): Added scrolling code. (selectAdjacentRunTab): Added scrolling code. (getTextViewForTab): Added FIXME note. (calculateTabHeight): Changed FIXME note. (getTabRunOffset): Fixed indentation. (getNextTabIndexInRun
[cp-patches] FYI: BasicLookAndFeel in Swing Demo
Hi, this patch makes it possible to see the basic look and feel in action in our Swing demo. In the future this may help to get customs LaFs working which directly build upon the Basic Look And Feel. 2006-07-25 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java: (mkMenuBar): Install instantiable basic look and feel. (InstantiableBasicLookAndFeel): New inner class. cya Robert Index: examples/gnu/classpath/examples/swing/Demo.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java,v retrieving revision 1.48 diff -u -r1.48 Demo.java --- examples/gnu/classpath/examples/swing/Demo.java 16 Jun 2006 20:46:54 - 1.48 +++ examples/gnu/classpath/examples/swing/Demo.java 25 Jul 2006 10:46:40 - @@ -30,6 +30,7 @@ import javax.swing.*; import javax.swing.tree.*; +import javax.swing.plaf.basic.BasicLookAndFeel; import javax.swing.plaf.metal.DefaultMetalTheme; import javax.swing.plaf.metal.MetalLookAndFeel; import javax.swing.plaf.metal.MetalTheme; @@ -192,6 +193,10 @@ } }); +// Installs the BasicLookAndFeel. +UIManager.installLookAndFeel((Basic Look And Feel), + InstantiableBasicLookAndFeel.class.getName()); + // Create LF menu. JMenu lafMenu = new JMenu(Look and Feel); ButtonGroup lafGroup = new ButtonGroup(); @@ -662,10 +667,45 @@ { ex.printStackTrace(); } + SwingUtilities.updateComponentTreeUI(frame); themesMenu.setEnabled(laf.getClassName() .equals(javax.swing.plaf.metal.MetalLookAndFeel)); } + } + /** + * An implementation of BasicLookAndFeel which can be instantiated. + * + * @author Robert Schuster ([EMAIL PROTECTED]) + * + */ + public static class InstantiableBasicLookAndFeel extends BasicLookAndFeel + { +public String getDescription() +{ + return An instantiable implementation of BasicLookAndFeel; +} + +public String getID() +{ + return instantiableBasicLookAndFeel; +} + +public String getName() +{ + return Instantiable Basic Look And Feel; +} + +public boolean isNativeLookAndFeel() +{ + return false; +} + +public boolean isSupportedLookAndFeel() +{ + return true; +} } + } signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: JTabbedPane fixes
Hi, this patch fixes some minor JTabbedPane issues. 2006-07-25 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (remove(Component)): Rewritten. (setSelectedIndex): Implemented updating of component visibility state. cya Robert Index: javax/swing/JTabbedPane.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JTabbedPane.java,v retrieving revision 1.41 diff -u -r1.41 JTabbedPane.java --- javax/swing/JTabbedPane.java 9 Jun 2006 23:34:34 - 1.41 +++ javax/swing/JTabbedPane.java 25 Jul 2006 19:17:46 - @@ -990,7 +990,17 @@ checkIndex(index, -1, tabs.size()); if (index != getSelectedIndex()) { +// Hiding and showing the involved components +// is important for the focus traversal mechanism +// to report the correct source and destination +// components. +Component c = getSelectedComponent(); +if (c != null) + c.setVisible(false); + model.setSelectedIndex(index); + +getSelectedComponent().setVisible(true); } } @@ -1247,7 +1257,25 @@ */ public void remove(Component component) { -super.remove(component); +// Container.remove(Component) is implemented in a +// way that it calls Container.remove(int). Since +// JTabbedPane's remove(int) is overridden to +// remove tabs and this in turn should not happen +// with components implementing UIResource +// we find out the component's index and +// call the superclass' remove(int) method +// directly. +// For non-UIResource implementing components +// the normal implementation is suitable. +if (component instanceof UIResource) + { +Component[] cs = getComponents(); +for (int i = 0; i cs.length; i++) + if (cs[i] == component) +super.remove(i); + } +else + super.remove(component); } /** @@ -1257,7 +1285,6 @@ */ public void remove(int index) { -super.remove(index); removeTabAt(index); } signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: Fix for PR27844
Hi, the attached patch fixes the drawing problem for one pixel sized lines. ChangeLog: 2006-07-25 Robert Schuster [EMAIL PROTECTED] Fixes PR27844. * java/awt/peer/gtk/CairoGraphics.java: (drawLine): Removed calls to shifted(). cya Robert Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v retrieving revision 1.31 diff -u -r1.31 CairoGraphics2D.java --- gnu/java/awt/peer/gtk/CairoGraphics2D.java 24 Jul 2006 11:01:12 - 1.31 +++ gnu/java/awt/peer/gtk/CairoGraphics2D.java 25 Jul 2006 20:12:59 - @@ -1038,9 +1038,7 @@ public void drawLine(int x1, int y1, int x2, int y2) { -cairoDrawLine(nativePointer, shifted(x1, shiftDrawCalls), - shifted(y1, shiftDrawCalls), shifted(x2, shiftDrawCalls), - shifted(y2, shiftDrawCalls)); +cairoDrawLine(nativePointer, x1, y1, x2 + 0.5, y2 + 0.5); } public void drawRect(int x, int y, int width, int height) signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/examples/gnu/classpath/examples/swing...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/25 10:49:09 Modified files: examples/gnu/classpath/examples/swing: Demo.java . : ChangeLog Log message: 2006-07-25 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java: (mkMenuBar): Install instantiable basic look and feel. (InstantiableBasicLookAndFeel): New inner class. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/examples/gnu/classpath/examples/swing/Demo.java?cvsroot=classpathr1=1.48r2=1.49 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8202r2=1.8203
[commit-cp] classpath/javax/swing JTabbedPane.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/25 19:20:29 Modified files: javax/swing: JTabbedPane.java . : ChangeLog Log message: 2006-07-25 Robert Schuster [EMAIL PROTECTED] * javax/swing/JTabbedPane.java: (remove(Component)): Rewritten. (setSelectedIndex): Implemented updating of component visibility state. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JTabbedPane.java?cvsroot=classpathr1=1.41r2=1.42 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8209r2=1.8210
[commit-cp] classpath/gnu/java/awt/peer/gtk CairoGraphics2D...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/25 20:26:31 Modified files: gnu/java/awt/peer/gtk: CairoGraphics2D.java . : ChangeLog Log message: Fixes PR27844. 2006-07-25 Robert Schuster [EMAIL PROTECTED] Fixes PR27844. * java/awt/peer/gtk/CairoGraphics.java: (drawLine): Removed calls to shifted(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpathr1=1.31r2=1.32 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8210r2=1.8211
[commit-cp] classpath/gnu/java/awt/peer/gtk CairoGraphics2D...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/25 20:58:19 Modified files: gnu/java/awt/peer/gtk: CairoGraphics2D.java . : ChangeLog Log message: 2006-07-25 Robert Schuster [EMAIL PROTECTED] * java/awt/peer/gtk/CairoGraphics.java: (drawLine): Added special case for 1 pixel lines. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpathr1=1.32r2=1.33 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8211r2=1.8212
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/22 18:11:17 Modified files: . : ChangeLog Log message: fixed my latest changelog entry. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8186r2=1.8187
[commit-cp] classpath/javax/swing/plaf/metal MetalLookAndFe...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/22 15:45:21 Modified files: javax/swing/plaf/metal: MetalLookAndFeel.java . : ChangeLog Log message: 2006-07-22 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalLookAndFeel: (initComponentDefaults): Added new properties, added comments. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java?cvsroot=classpathr1=1.84r2=1.85 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8184r2=1.8185
Re: [cp-patches] RFC: fix for PR28350
Hi, thanks for looking at it. Committed with this ChangeLog: 2006-07-11 Robert Schuster [EMAIL PROTECTED] Fixes PR28350. * native/jni/gconf-peer/GConfNativePeer.c: (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1set_1string): Changed if-expression. (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1get_1string): Added check for _value not being NULL. cya happy hacking :) Robert Mario Torre wrote: Il giorno mar, 11/07/2006 alle 23.24 +0200, Robert Schuster ha scritto: Hi, this patch fixes PR28350 for me. Ok to commit? Actually I'm unable to test as my eclipse is doing strange things :) But looks ok to me, please commit :) Thanks for the fix :) Mario ChangeLog: 2006-07-11 Robert Schuster [EMAIL PROTECTED] * native/jni/gconf-peer/GConfNativePeer.c: (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1set_1string): Changed if-expression. (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1get_1string): Added check for _value not being NULL. Function name doesnt fit into 80 columns ... hmm. :) This will be the next refactoring, for example removing 'client' :) cya Robert signature.asc Description: OpenPGP digital signature
[commit-cp] classpath ChangeLog native/jni/gconf-peer/GConf...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/11 22:28:38 Modified files: . : ChangeLog native/jni/gconf-peer: GConfNativePeer.c Log message: 2006-07-11 Robert Schuster [EMAIL PROTECTED] Fixes PR28350. * native/jni/gconf-peer/GConfNativePeer.c: (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1set_1string): Changed if-expression. (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1get_1string): Added check for _value not being NULL. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8077r2=1.8078 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gconf-peer/GConfNativePeer.c?cvsroot=classpathr1=1.3r2=1.4
Re: [cp-patches] FYI: Generate name the same way as Sun
Hi Tania +if (type == 0) + name = Default Cursor; +else if (type == 1) + name = Crosshair Cursor; +else if (type == 2) + name = Text Cursor; +else if (type == 3) + name = Wait Cursor; +else if (type == 4) + name = Southwest Resize Cursor; +else if (type == 5) + name = Southeast Resize Cursor; +else if (type == 6) + name = Northwest Resize Cursor; +else if (type == 7) + name = Northeast Resize Cursor; +else if (type == 8) + name = North Resize Cursor; +else if (type == 9) + name = South Resize Cursor; +else if (type == 10) + name = West Resize Cursor; +else if (type == 11) + name = East Resize Cursor; +else if (type == 12) + name = Hand Cursor; +else if (type == 13) + name = Move Cursor; + +// FIXME: lookup? There are names for these constants and I see a pattern how you could implement this much more efficiently: String[] NAMES = { Default Cursor, Crosshair Cursor, ... }; if (type = 0 type NAMES.length name = NAMES[type]; else // dont know. Try on the RI :) cya Robert signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: BasicArrowButton paint fix
Hi, the following patch fixes the painting of the BasicArrowButton. The main problem was that the center point was calculated with the use of getBounds().x and that value is in the coordinate space of the parent's component. I removed that and simplified the method a bit. ChangeLog: 2006-07-05 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicArrowButton.java: (paint): Removed getBounds() call, changed center point calculation. Index: javax/swing/plaf/basic/BasicArrowButton.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicArrowButton.java,v retrieving revision 1.20 diff -u -r1.20 BasicArrowButton.java --- javax/swing/plaf/basic/BasicArrowButton.java 15 Jun 2006 18:33:31 - 1.20 +++ javax/swing/plaf/basic/BasicArrowButton.java 5 Jul 2006 13:37:25 - @@ -1,5 +1,5 @@ /* BasicArrowButton.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -162,16 +162,20 @@ public void paint(Graphics g) { super.paint(g); -Rectangle bounds = getBounds(); -int size = bounds.height / 4; -int x = bounds.x + (bounds.width - size) / 2; -int y = (bounds.height - size) / 4; + +int height = getHeight(); +int size = height / 4; + +int x = (getWidth() - size) / 2; +int y = (height - size) / 2; + ButtonModel m = getModel(); if (m.isArmed()) { x++; y++; } + paintTriangle(g, x, y, size, direction, isEnabled()); } signature.asc Description: OpenPGP digital signature
Re: Hello:Interested in classpath
Hello Hari, thanks for your interest. Many of us Classpath developers came to this project because of personal interest to get a certain application running on the the free stack. If you have written some applications these may be a perfect start for you because you probably know best how the apps should work. Some legal stuff: Before we can accept contributions we need a copyright assignment from you. With that form in place the Free Software Foundation will be given the copyright for your contributions making it easier for them to make license changes or defend copyright in court. For more information about the copyright assignment look here[0]. Another thing that is important for GNU Classpath is that you should not have studied the source code of the reference implementation (aka JDK). We have more about this in the Wiki[1]. Regards Robert [0] - http://www.gnu.org/licenses/why-assign.html [1] - http://developer.classpath.org/mediation/ClasspathFirstSteps#head-f89fd6c0e1376fdeca17f3ef6b988c7858830a6a Hari Shreedharan wrote: Hello, Though i joined classpath mailing list sometime back,have not started working until now.Plz. tell me which packages need work on,and i am experienced in Java but not in writing libraries,so kindly tell me which packages i should start working on. Cheers! Hari signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/javax/swing/plaf/basic BasicArrowButt...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/07/05 13:37:53 Modified files: javax/swing/plaf/basic: BasicArrowButton.java . : ChangeLog Log message: 2006-07-05 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicArrowButton.java: (paint): Removed getBounds() call, changed center point calculation. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicArrowButton.java?cvsroot=classpathr1=1.20r2=1.21 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8024r2=1.8025
[cp-patches] FYI: fix NPE in JMenu
Hi, this patch fixes a NullPointerException which happens in JMenu.removeAll. This problem was easily spotable using our Swing demo. The ChangeLog: 2006-06-22 Robert Schuster [EMAIL PROTECTED] * javax/swing/JMenu.java: (removeAll): Added check for popupMenu not being null. cya Robert Index: javax/swing/JMenu.java === RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v retrieving revision 1.28 diff -u -r1.28 JMenu.java --- javax/swing/JMenu.java 21 Jun 2006 14:55:03 - 1.28 +++ javax/swing/JMenu.java 22 Jun 2006 13:20:36 - @@ -250,7 +250,8 @@ */ public void removeAll() { -popupMenu.removeAll(); +if (popupMenu != null) + popupMenu.removeAll(); } /** signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: Insets.toString fix
Hi, this small patch makes Insets.toString() return the information formatted in the same way as on the RI. ChangeLog: 2006-06-22 Robert Schuster [EMAIL PROTECTED] * java/awt/Insets.java: Updated copyright year. (toString): Changed string, removed a line from the documentation. cya Robert Index: java/awt/Insets.java === RCS file: /cvsroot/classpath/classpath/java/awt/Insets.java,v retrieving revision 1.9 diff -u -r1.9 Insets.java --- java/awt/Insets.java 3 Mar 2006 23:22:21 - 1.9 +++ java/awt/Insets.java 22 Jun 2006 15:15:59 - @@ -1,5 +1,5 @@ /* Insets.java -- information about a container border - Copyright (C) 1999, 2000, 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -149,14 +149,13 @@ /** * Returns a string representation of this object, which will be non-null. - * The format is unspecified, but appears to be codeXXX what is it?/code. * * @return a string representation of this object */ public String toString() { -return getClass().getName() + (top= + top + ,bottom= + bottom + - ,left= + left + ,right= + right + ')'; +return getClass().getName() + [top= + top + ,left= + left + + ,bottom= + bottom + ,right= + right + ']'; } /** signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/javax/swing JMenu.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/22 13:21:04 Modified files: javax/swing: JMenu.java . : ChangeLog Log message: 2006-06-22 Robert Schuster [EMAIL PROTECTED] * javax/swing/JMenu.java: (removeAll): Added check for popupMenu not being null. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JMenu.java?cvsroot=classpathr1=1.28r2=1.29 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7909r2=1.7910
[commit-cp] classpath/java/awt Insets.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/22 15:18:51 Modified files: java/awt : Insets.java . : ChangeLog Log message: 2006-06-22 Robert Schuster [EMAIL PROTECTED] * java/awt/Insets.java: Updated copyright year. (toString): Changed string, removed a line from the documentation. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/Insets.java?cvsroot=classpathr1=1.9r2=1.10 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7913r2=1.7914
Re: gconf needs ORBit?!
Hi Norman, sorry that this stopped your development but with CVS sources stuff like that can happen from time to time. On Ubuntu and Debian GNU/Linux-based distros you need to install libgconf2-dev. This will download and install C header files which are needed to compile the native side of the GConf-based backend for java.util.prefs. Now you know for what it it used. java.util.prefs is a API that allows applications to conveniently store preferences and other configuration data. The RI on Windows machines can use the so-called registry on that system. On GNU/Linux systems they have a simple file based implementation. GNU Classpath can write the data to plain files (no dependencies) or use the GConf library for that task. The latter was made the default because it is technically nicer and integrates better in the GNU environment. Btw: I have a patch that mentions the new library dependency in INSTALL here. :) cya Robert Norman Hendrich wrote: Hello Roman, thanks for your quick reply. Orbit is usually installed as part of Gnome. Of which gconf is the configuration management. So if you have gconf you usually also have Gnome and with it you'll have Orbit. OK. So far, I only have those parts of gnome required to building classpath. So much for my priorities :-) classpath configure now requires gconf = 2.11.2: ./configure --with-jikes --disable-plugin --prefix=/opt/classpath [...] checking for gconf-2.0 = 2.11.2... Package gconf-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gconf-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gconf-2.0' found while building gconf 2.11.92 fails with ./configure No package 'ORBit-2.0' found configure: error: Package requirements (gmodule-2.0 = 2.7.0 gobject-2.0 = 2.7.0 ORBit-2.0 = 2.4.0) were not met. and building a fresh gconf 2.14.0 fails with: ./configure checking for DEPENDENT... Requested 'glib-2.0 2.9.0' but version of GLib is 2.8.6 configure: error: Package requirements (glib-2.0 2.9.0 gmodule-2.0 = 2.7.0 gobject-2.0 = 2.7.0 ORBit-2.0 = 2.4.0) were not met: I don't use GNOME. Seems like --disable-gconf-peer is the way to go. What are the gconf peers supposed to do anyway? Thanks, Norman signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: fix for MetalMenuBarUI
Hi, when a custom background color is set on a JMenuBar gradient painting should not be done. I fixed this by checking whether the curent background color is an instanceof of UIResource (this is done in other locations in plaf/metal too with the same purpose). Now custom JMenuBar colors work. :) ChangeLog: 2006-06-16 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalMenuBarUI.java: (update): Added subexpression to if-statement. cya Robert Index: javax/swing/plaf/metal/MetalMenuBarUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java,v retrieving revision 1.1 diff -u -r1.1 MetalMenuBarUI.java --- javax/swing/plaf/metal/MetalMenuBarUI.java 16 Nov 2005 15:44:05 - 1.1 +++ javax/swing/plaf/metal/MetalMenuBarUI.java 16 Jun 2006 12:54:19 - @@ -44,6 +44,7 @@ import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicMenuBarUI; /** @@ -75,7 +76,9 @@ */ public void update(Graphics g, JComponent c) { -if (c.isOpaque() UIManager.get(MenuBar.gradient) != null) +if (c.isOpaque() + UIManager.get(MenuBar.gradient) != null + c.getBackground() instanceof UIResource) { MetalUtils.paintGradient(g, 0, 0, c.getWidth(), c.getHeight(), SwingConstants.VERTICAL, MenuBar.gradient); signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: fix for BasicRadioButtonUI
Hi, this is my 2nd attempt to fix the RadioButton issue. I found out that BasicRadioButtonUI is supposed to override getPrefferedSize. This makes it possible to implement the layout stuff which properly notices the default icon which is used when the icon property is not set. ChangeLog: 2006-06-16 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicRadioButtonUI.java: (installDefaults): Removed unneccessary code. (paint): Removed complex if-cascade, revert to default icon if icon property is not set. (getPreferredSize): New method. cya Robert Index: javax/swing/plaf/basic/BasicRadioButtonUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,v retrieving revision 1.18 diff -u -r1.18 BasicRadioButtonUI.java --- javax/swing/plaf/basic/BasicRadioButtonUI.java 13 Jun 2006 09:28:57 - 1.18 +++ javax/swing/plaf/basic/BasicRadioButtonUI.java 16 Jun 2006 12:26:50 - @@ -42,6 +42,7 @@ import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; +import java.awt.Insets; import java.awt.Rectangle; import javax.swing.AbstractButton; @@ -92,14 +93,6 @@ protected void installDefaults(AbstractButton b) { super.installDefaults(b); -if (b.getIcon() == null) - b.setIcon(icon); -if (b.getSelectedIcon() == null) - b.setSelectedIcon(icon); -if (b.getDisabledIcon() == null) - b.setDisabledIcon(icon); -if (b.getDisabledSelectedIcon() == null) - b.setDisabledSelectedIcon(icon); } /** @@ -145,16 +138,17 @@ g.setFont(f); ButtonModel m = b.getModel(); -Icon currentIcon = null; -if (m.isSelected() m.isEnabled()) - currentIcon = b.getSelectedIcon(); -else if (! m.isSelected() m.isEnabled()) - currentIcon = b.getIcon(); -else if (m.isSelected() ! m.isEnabled()) - currentIcon = b.getDisabledSelectedIcon(); -else // (!m.isSelected() ! m.isEnabled()) - currentIcon = b.getDisabledIcon(); +// FIXME: Do a filtering on any customized icon if the following property +// is set. +boolean enabled = b.isEnabled(); + +Icon currentIcon = b.getIcon(); +if (currentIcon == null) + { +currentIcon = getDefaultIcon(); + } + SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f), b.getText(), currentIcon, @@ -162,15 +156,57 @@ b.getVerticalTextPosition(), b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset); -if (currentIcon != null) - { -currentIcon.paintIcon(c, g, ir.x, ir.y); - } +currentIcon.paintIcon(c, g, ir.x, ir.y); + if (text != null) paintText(g, b, tr, text); if (b.hasFocus() b.isFocusPainted() m.isEnabled()) paintFocus(g, tr, c.getSize()); } + + public Dimension getPreferredSize(JComponent c) + { +// This is basically the same code as in +// BasicGraphicsUtils.getPreferredButtonSize() but takes the default icon +// property into account. JRadioButton and subclasses always have an icon: +// the check box. If the user explicitly changes it with setIcon() that +// one will be used for layout calculations and painting instead. +// The other icon properties are ignored. +AbstractButton b = (AbstractButton) c; + +Rectangle contentRect; +Rectangle viewRect; +Rectangle iconRect = new Rectangle(); +Rectangle textRect = new Rectangle(); +Insets insets = b.getInsets(); + +Icon i = b.getIcon(); +if (i == null) + i = getDefaultIcon(); + +viewRect = new Rectangle(); + +SwingUtilities.layoutCompoundLabel( + b, // for the component orientation + b.getFontMetrics(b.getFont()), + b.getText(), + i, + b.getVerticalAlignment(), + b.getHorizontalAlignment(), + b.getVerticalTextPosition(), + b.getHorizontalTextPosition(), + viewRect, iconRect, textRect, + defaultTextIconGap + defaultTextShiftOffset); + +contentRect = textRect.union(iconRect); + +return new Dimension(insets.left + + contentRect.width + + insets.right + b.getHorizontalAlignment(), + insets.top + + contentRect.height + + insets.bottom); + } /** * Paints the focus indicator for JRadioButtons. signature.asc Description: OpenPGP digital signature
[commit-cp] classpath ChangeLog javax/swing/plaf/basic/Basi...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/16 12:36:22 Modified files: . : ChangeLog javax/swing/plaf/basic: BasicRadioButtonUI.java Log message: 2006-06-16 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicRadioButtonUI.java: (installDefaults): Removed unneccessary code. (paint): Removed complex if-cascade, revert to default icon if icon property is not set. (getPreferredSize): New method. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7838r2=1.7839 http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java?cvsroot=classpathr1=1.18r2=1.19 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7838 retrieving revision 1.7839 diff -u -b -r1.7838 -r1.7839 --- ChangeLog 16 Jun 2006 10:27:30 - 1.7838 +++ ChangeLog 16 Jun 2006 12:36:19 - 1.7839 @@ -1,3 +1,11 @@ +2006-06-16 Robert Schuster [EMAIL PROTECTED] + + * javax/swing/plaf/basic/BasicRadioButtonUI.java: + (installDefaults): Removed unneccessary code. + (paint): Removed complex if-cascade, revert to default icon if + icon property is not set. + (getPreferredSize): New method. + 2006-06-16 Roman Kennke [EMAIL PROTECTED] PR 28027 @@ -333,6 +341,7 @@ compatibility with filters. (getParameter): Modified to allow access to above. + 1.7824 2006-06-13 Sven de Marothy [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoSurface.java @@ -354,6 +363,7 @@ or not the labels are visible, (paintTrack): Shift track down one pixel. + 1.7799 2006-06-13 Lillian Angel [EMAIL PROTECTED] * java/awt/image/PixelGrabber.java @@ -1124,6 +1134,7 @@ (TreeIncrementAction.actionPerformed): Use action name as command. (TreeIncrementAction.isEnabled): Implemented. + 1.7796 2006-06-08 Mark Wielaard [EMAIL PROTECTED] PR 27917 Index: javax/swing/plaf/basic/BasicRadioButtonUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -b -r1.18 -r1.19 --- javax/swing/plaf/basic/BasicRadioButtonUI.java 13 Jun 2006 09:28:57 - 1.18 +++ javax/swing/plaf/basic/BasicRadioButtonUI.java 16 Jun 2006 12:36:21 - 1.19 @@ -42,6 +42,7 @@ import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; +import java.awt.Insets; import java.awt.Rectangle; import javax.swing.AbstractButton; @@ -92,14 +93,6 @@ protected void installDefaults(AbstractButton b) { super.installDefaults(b); -if (b.getIcon() == null) - b.setIcon(icon); -if (b.getSelectedIcon() == null) - b.setSelectedIcon(icon); -if (b.getDisabledIcon() == null) - b.setDisabledIcon(icon); -if (b.getDisabledSelectedIcon() == null) - b.setDisabledSelectedIcon(icon); } /** @@ -145,15 +138,16 @@ g.setFont(f); ButtonModel m = b.getModel(); -Icon currentIcon = null; -if (m.isSelected() m.isEnabled()) - currentIcon = b.getSelectedIcon(); -else if (! m.isSelected() m.isEnabled()) - currentIcon = b.getIcon(); -else if (m.isSelected() ! m.isEnabled()) - currentIcon = b.getDisabledSelectedIcon(); -else // (!m.isSelected() ! m.isEnabled()) - currentIcon = b.getDisabledIcon(); +// FIXME: Do a filtering on any customized icon if the following property +// is set. +boolean enabled = b.isEnabled(); + +Icon currentIcon = b.getIcon(); + +if (currentIcon == null) + { +currentIcon = getDefaultIcon(); + } SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f), @@ -162,16 +156,58 @@ b.getVerticalTextPosition(), b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset); -if (currentIcon != null) - { currentIcon.paintIcon(c, g, ir.x, ir.y); - } + if (text != null) paintText(g, b, tr, text); if (b.hasFocus() b.isFocusPainted() m.isEnabled()) paintFocus(g, tr, c.getSize()); } + public Dimension getPreferredSize(JComponent c) + { +// This is basically the same code as in +// BasicGraphicsUtils.getPreferredButtonSize() but takes the default icon +// property into account. JRadioButton and subclasses always have an icon: +// the check box. If the user explicitly changes it with setIcon() that +// one will be used for layout calculations and painting instead
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/16 12:37:05 Modified files: . : ChangeLog Log message: Removed CVS' conflict indicators. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7839r2=1.7840 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7839 retrieving revision 1.7840 diff -u -b -r1.7839 -r1.7840 --- ChangeLog 16 Jun 2006 12:36:19 - 1.7839 +++ ChangeLog 16 Jun 2006 12:37:04 - 1.7840 @@ -162,7 +162,6 @@ Added serialization UID and changed to extend javax.management.JMException. - 1.7826 2006-06-14 Lillian Angel [EMAIL PROTECTED] * java/awt/Component.java @@ -341,7 +340,6 @@ compatibility with filters. (getParameter): Modified to allow access to above. - 1.7824 2006-06-13 Sven de Marothy [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoSurface.java @@ -363,7 +361,6 @@ or not the labels are visible, (paintTrack): Shift track down one pixel. - 1.7799 2006-06-13 Lillian Angel [EMAIL PROTECTED] * java/awt/image/PixelGrabber.java @@ -1134,7 +1131,6 @@ (TreeIncrementAction.actionPerformed): Use action name as command. (TreeIncrementAction.isEnabled): Implemented. - 1.7796 2006-06-08 Mark Wielaard [EMAIL PROTECTED] PR 27917
[commit-cp] classpath/javax/swing/plaf/metal MetalMenuBarUI...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/16 12:54:48 Modified files: javax/swing/plaf/metal: MetalMenuBarUI.java . : ChangeLog Log message: 2006-06-16 Robert Schuster [EMAIL PROTECTED] * javax/swing/plaf/metal/MetalMenuBarUI.java: (update): Added subexpression to if-statement. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java?cvsroot=classpathr1=1.1r2=1.2 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7840r2=1.7841 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7840 retrieving revision 1.7841 diff -u -b -r1.7840 -r1.7841 --- ChangeLog 16 Jun 2006 12:37:04 - 1.7840 +++ ChangeLog 16 Jun 2006 12:54:47 - 1.7841 @@ -1,5 +1,10 @@ 2006-06-16 Robert Schuster [EMAIL PROTECTED] + * javax/swing/plaf/metal/MetalMenuBarUI.java: + (update): Added subexpression to if-statement. + +2006-06-16 Robert Schuster [EMAIL PROTECTED] + * javax/swing/plaf/basic/BasicRadioButtonUI.java: (installDefaults): Removed unneccessary code. (paint): Removed complex if-cascade, revert to default icon if @@ -162,6 +167,7 @@ Added serialization UID and changed to extend javax.management.JMException. + 1.7826 2006-06-14 Lillian Angel [EMAIL PROTECTED] * java/awt/Component.java @@ -340,6 +346,7 @@ compatibility with filters. (getParameter): Modified to allow access to above. + 1.7824 2006-06-13 Sven de Marothy [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/CairoSurface.java @@ -361,6 +368,7 @@ or not the labels are visible, (paintTrack): Shift track down one pixel. + 1.7799 2006-06-13 Lillian Angel [EMAIL PROTECTED] * java/awt/image/PixelGrabber.java @@ -1131,6 +1139,7 @@ (TreeIncrementAction.actionPerformed): Use action name as command. (TreeIncrementAction.isEnabled): Implemented. + 1.7796 2006-06-08 Mark Wielaard [EMAIL PROTECTED] PR 27917
[cp-patches] RFC: change painting and layouting of buttons and radiobuttons
Hi, I need help for this one. I had the following problem: BasicRadioButtonUI.installDefaults sets default values for the icon, selectedIcon, disabledIcon etc properties. This is wrong, as the RI does not do this. Minitestcase: assert(new JRadioButton().getIcon() == null) I changed this and modified the paint() method within BasicRadioButtonUI in a way that it draws the default icon (the checkbox thingie) if no explicit icon was set (Btw: The RI seems to ignore the selectedIcon, disabledSelectedIcon and disabledIcon property. It only takes the icon property into account.). With this change I got a problem with layouting because getPreferredSize() needs to know the icon which will be drawn beside the text. Currently this is handled by BasicGraphicUtils.getPreferredButtonSize(). With the current implementation it used getIcon() on the button which will be null for fresh unmodified radio buttons and therefore the default icon is not taken into account for them. I changed the code to make it aware of the default icon setting which radio buttons can have but am not sure whether this is the right approach. For the application I am debugging this patch fixes the issues. No ChangeLog as I am waiting for further input. cya Robert Index: javax/swing/plaf/basic/BasicGraphicsUtils.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicGraphicsUtils.java,v retrieving revision 1.17 diff -u -r1.17 BasicGraphicsUtils.java --- javax/swing/plaf/basic/BasicGraphicsUtils.java 18 Oct 2005 22:10:32 - 1.17 +++ javax/swing/plaf/basic/BasicGraphicsUtils.java 15 Jun 2006 17:28:51 - @@ -54,6 +54,7 @@ import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.SwingUtilities; +import javax.swing.plaf.ButtonUI; /** @@ -603,18 +604,20 @@ viewRect = new Rectangle(); - /* java.awt.Toolkit.getFontMetrics is deprecated. However, it - * seems not obvious how to get to the correct FontMetrics object - * otherwise. The real problem probably is that the method - * javax.swing.SwingUtilities.layoutCompundLabel should take a - * LineMetrics, not a FontMetrics argument. But fixing this that - * would change the public API. - */ +// Retrieve the icon fitting to the current button state. +Icon i = BasicButtonUI.currentIcon(b); + +// If no icon is given and we have a BasicRadioButtonUI +// we can ask it for the default icon. +ButtonUI ui = b.getUI(); +if(i == null ui instanceof BasicRadioButtonUI) + i = ((BasicRadioButtonUI) ui).getDefaultIcon(); + SwingUtilities.layoutCompoundLabel( b, // for the component orientation - b.getToolkit().getFontMetrics(b.getFont()), // see comment above + b.getFontMetrics(b.getFont()), b.getText(), - b.getIcon(), + i, b.getVerticalAlignment(), b.getHorizontalAlignment(), b.getVerticalTextPosition(), Index: javax/swing/plaf/basic/BasicRadioButtonUI.java === RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,v retrieving revision 1.18 diff -u -r1.18 BasicRadioButtonUI.java --- javax/swing/plaf/basic/BasicRadioButtonUI.java 13 Jun 2006 09:28:57 - 1.18 +++ javax/swing/plaf/basic/BasicRadioButtonUI.java 15 Jun 2006 17:28:51 - @@ -92,14 +92,6 @@ protected void installDefaults(AbstractButton b) { super.installDefaults(b); -if (b.getIcon() == null) - b.setIcon(icon); -if (b.getSelectedIcon() == null) - b.setSelectedIcon(icon); -if (b.getDisabledIcon() == null) - b.setDisabledIcon(icon); -if (b.getDisabledSelectedIcon() == null) - b.setDisabledSelectedIcon(icon); } /** @@ -145,16 +137,17 @@ g.setFont(f); ButtonModel m = b.getModel(); -Icon currentIcon = null; -if (m.isSelected() m.isEnabled()) - currentIcon = b.getSelectedIcon(); -else if (! m.isSelected() m.isEnabled()) - currentIcon = b.getIcon(); -else if (m.isSelected() ! m.isEnabled()) - currentIcon = b.getDisabledSelectedIcon(); -else // (!m.isSelected() ! m.isEnabled()) - currentIcon = b.getDisabledIcon(); +// FIXME: Do a filtering on any customized icon if the following property +// is set. +boolean enabled = b.isEnabled(); + +Icon currentIcon = b.getIcon(); +if (currentIcon == null) + { +currentIcon = icon; + } + SwingUtilities.calculateInnerArea(b, vr); String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f), b.getText(), currentIcon, @@ -162,10 +155,8 @@ b.getVerticalTextPosition(), b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap() + defaultTextShiftOffset); -if (currentIcon != null) - { -currentIcon.paintIcon(c, g, ir.x, ir.y); - } +currentIcon.paintIcon(c,
[cp-patches] FYI: fix for PR27864
Hi, after talking to Casey this was approved. ChangeLog: 2006-06-08 Robert Schuster [EMAIL PROTECTED] Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Changed expression. cya Robert Index: gnu/xml/dom/DomIterator.java === RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomIterator.java,v retrieving revision 1.4 diff -u -r1.4 DomIterator.java --- gnu/xml/dom/DomIterator.java 2 Jul 2005 20:32:15 - 1.4 +++ gnu/xml/dom/DomIterator.java 8 Jun 2006 09:35:30 - @@ -1,5 +1,5 @@ /* DomIterator.java -- - Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -297,7 +297,9 @@ { next = next.getParentNode(); } -if (next == root) + +// If we have exceeded the root node then stop traversing. +if (next == root.getParentNode()) { return null; } signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: allow null tileIcon for MatteBorder
HI, an app written by me years ago demonstrates that MatteBorder can accept a null tileIcon. Classpath' implementation throw an exception in that case. The attached patch fixes that and make the paintBorder method aware of a possibly null tileIcon. ChangeLog: 2006-06-08 Robert Schuster [EMAIL PROTECTED] * javax/swing/border/MatteBorder.java: (MatteBorder(int,int,int,int,Icon)): Removed if-statement and exception throwing. (paintBorder): Added if-statement to abort painting early. cya Robert Index: javax/swing/border/MatteBorder.java === RCS file: /cvsroot/classpath/classpath/javax/swing/border/MatteBorder.java,v retrieving revision 1.11 diff -u -r1.11 MatteBorder.java --- javax/swing/border/MatteBorder.java 21 Apr 2006 11:26:33 - 1.11 +++ javax/swing/border/MatteBorder.java 8 Jun 2006 10:45:11 - @@ -1,5 +1,5 @@ /* MatteBorder.java -- - Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -147,9 +147,6 @@ { super(top, left, bottom, right); -if (tileIcon == null) - throw new IllegalArgumentException(); - this.tileIcon = tileIcon; } @@ -375,6 +372,10 @@ } return; } + +// If this border has no icon end painting here. +if (tileIcon == null) + return; /* Determine the width and height of the icon. Some icons return * -1 if it is an image whose dimensions have not yet been signature.asc Description: OpenPGP digital signature
Re: Would nice, if you publish your code also under AL2
I came to the same conclusion like Audrius and found http://www.gnu.org/philosophy/freedom-or-power.html a good reason for sticking to the copyleft idea. cya Robert signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/gnu/xml/dom DomIterator.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/08 09:36:03 Modified files: gnu/xml/dom: DomIterator.java . : ChangeLog Log message: 2006-06-08 Robert Schuster [EMAIL PROTECTED] Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Changed expression. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/xml/dom/DomIterator.java?cvsroot=classpathr1=1.4r2=1.5 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7710r2=1.7711 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7710 retrieving revision 1.7711 diff -u -b -r1.7710 -r1.7711 --- ChangeLog 8 Jun 2006 00:51:29 - 1.7710 +++ ChangeLog 8 Jun 2006 09:36:02 - 1.7711 @@ -1,3 +1,9 @@ +2006-06-08 Robert Schuster [EMAIL PROTECTED] + +Fixes PR27864. +* gnu/xml/dom/DomIterator.java: +(successor): Changed expression. + 2006-06-08 Sven de Marothy [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
[commit-cp] classpath/javax/swing/border MatteBorder.java C...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/08 10:48:03 Modified files: javax/swing/border: MatteBorder.java . : ChangeLog Log message: 2006-06-08 Robert Schuster [EMAIL PROTECTED] * javax/swing/border/MatteBorder.java: (MatteBorder(int,int,int,int,Icon)): Removed if-statement and exception throwing. (paintBorder): Added if-statement to abort painting early. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/border/MatteBorder.java?cvsroot=classpathr1=1.11r2=1.12 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7711r2=1.7712 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7711 retrieving revision 1.7712 diff -u -b -r1.7711 -r1.7712 --- ChangeLog 8 Jun 2006 09:36:02 - 1.7711 +++ ChangeLog 8 Jun 2006 10:48:00 - 1.7712 @@ -1,5 +1,12 @@ 2006-06-08 Robert Schuster [EMAIL PROTECTED] + * javax/swing/border/MatteBorder.java: + (MatteBorder(int,int,int,int,Icon)): Removed if-statement and exception + throwing. + (paintBorder): Added if-statement to abort painting early. + +2006-06-08 Robert Schuster [EMAIL PROTECTED] + Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Changed expression.
[cp-patches] FYI: small Swing demo fix
Hi, with this patch the Look and Feel radion buttons in the Swing demo are put into the same button group. ChangeLog: 2006-06-07 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java: (mkMenuBar): Put look and feel radio buttons into appropriate button group. cya Robert Index: examples/gnu/classpath/examples/swing/Demo.java === RCS file: /cvsroot/classpath/classpath/examples/gnu/classpath/examples/swing/Demo.java,v retrieving revision 1.46 diff -u -r1.46 Demo.java --- examples/gnu/classpath/examples/swing/Demo.java 25 May 2006 20:39:41 - 1.46 +++ examples/gnu/classpath/examples/swing/Demo.java 7 Jun 2006 10:23:31 - @@ -203,6 +203,8 @@ boolean selected = laf.getClassName().equals(currentLaf); lafItem.setSelected(selected); lafMenu.add(lafItem); + +lafGroup.add(lafItem); } // Create themes menu. signature.asc Description: OpenPGP digital signature
Re: [cp-patches] RFC: fix for PR27864
Hi, unfortunately the fix you proposed yesterday on IRC did not work. I have further investigate the problem to find out about your consideration about an NPE happening because of my patch: I found out that if root is null, the code will not reach that code location because then 'here' would be null too and this is handled in line 243. cya Robert Robert Schuster wrote: Hi, this patch fixes PR27864 for me. Ok to commit? ChangeLog: 2006-06-01 Robert Schuster [EMAIL PROTECTED] Fixes PR27864. * gnu/xml/dom/DomIterator.java: (successor): Changed expression. cya Robert Index: gnu/xml/dom/DomIterator.java === RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomIterator.java,v retrieving revision 1.4 diff -u -r1.4 DomIterator.java --- gnu/xml/dom/DomIterator.java 2 Jul 2005 20:32:15 - 1.4 +++ gnu/xml/dom/DomIterator.java 1 Jun 2006 17:13:03 - @@ -297,7 +297,10 @@ { next = next.getParentNode(); } -if (next == root) + +/* If we have exceeded the root node then stop traversing. + */ +if (next == root.getParentNode()) { return null; } signature.asc Description: OpenPGP digital signature
Re: [cp-patches] FYI: GdkScreenGraphicsDevice and friends implemented
Hi, thanks that this patch is appreciated. I would like to point out one thing: I have already committed a patch to our AWT demo application to test this GraphicsDevice stuff. You can change the display mode and try out fullscreen exclusive mode (which isnt real FSEM but the disable window decorations and maximize thing). I would like to see that people try this code on their machines to find out whether it works with other windows managers, XOrg/XFree versions and operating systems. Please report any issues to gcc.gnu.org/bugzilla. Btw: The functionality is now only implemented for the Gtk peers. We need the same stuff for the Qt ones. I do not have access to such a system and not much time to work on that but it is possible that this would not be so difficult as one can reuse the X11 code in the Gtk version. Anyone lurking on this list and looking for a low hanging fruit: Go for PR27927 !!! :) Happy hacking! cya Robert [0] - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27927 Sven de Marothy wrote: On Tue, 2006-06-06 at 12:02 +0200, Robert Schuster wrote: Hi, this patch implements the GdkScreenGraphicsDevice and related classes. Great! Now we can fill in the missing puzzle piece for VolatileImage, which is the GraphicsEnvironment constructor. It should probably take a GdkScreenGraphicsDevice as a parameter. The reason for this is that VolatileImage wraps an X pixmap both in our impl and in the JDK (says Sun's docs), and to create a pixmap you need to know the native screen parameters. Which can be recieved either from an existing widget (GtkComponentPeer constructor -implemented.) or from a GdkScreen (not implemented). So you should all understand now why the createVolatileImage methods happen to be in GraphicsConfiguration and Component. :) /Sven signature.asc Description: OpenPGP digital signature
Re: Java2D Headless
Hi, here is the corresponding PR: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23786 Follow the link to the ML to get my preliminary image loading code. It may be useful to write the start of a full ImageMagick based plugin. However fitzsim said that ImageMagick provide to few features for a real ImageIO plugin. I think this means that access to meta-information is impossible. Still simple image loading should be doable ... cya Robert Juerg Lehni wrote: Hi Sven, Thank you for the update on the status quo of both Java2D and ImageIO. And great to hear that work is currently done for this. I wonder about ImageIO through ImageMagick though. Are you sure that there is no code for this so far? I saw it mentioned here, and from what I read it sounds like it's already working: http://developer.classpath.org/doc/javax/imageio/package-summary.html And how much more time do you think will be needed for the Java2D stuff to work completely headless? Is there anything I could help with? Jürg Am 07.06.2006 um 14:20 schrieb Sven de Marothy: Hello Juerg, I wonder: Does Java2D and ImageIO work on Unix without an X Server installed, e.g. in a server environment or on OS X? If so: How do I need to compile? Roman has been doing some work on this, however it's not ready for production use yet, AFAIK. The existing Java2D on Cairo peers will probably be able to work headless. They don't at this very moment though. The main remaining dependency on GTK for headless is for fonts, but I'm actually working on removing that right now. And what is the situation on Windows? Same as above. (The Cairo libs used for offscreen drawing are portable and shouldn't have any problems under Windows.) I read somewhere that ImageIO by default is based on ImageMagick. Is this mature, does it work well? This is planned, but hasn't been implmented yet. At the moment there's an ImageIO plugin based on GdkPixbuf and a pure-java BMP plugin, and a JPEG one in the works. So, we're not quite there yet. But since you've shown interest, I'll keep it in mind and see what I can do once we're finished with this overhaul. Most of the code is there, it's mostly just the font stuff and then cleaning up the dependencies to allow for headless. /Sven signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/examples/gnu/classpath/examples/swing...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/07 10:25:26 Modified files: examples/gnu/classpath/examples/swing: Demo.java . : ChangeLog Log message: 2006-06-07 Robert Schuster [EMAIL PROTECTED] * examples/gnu/classpath/examples/swing/Demo.java: (mkMenuBar): Put look and feel radio buttons into appropriate button group. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/examples/gnu/classpath/examples/swing/Demo.java?cvsroot=classpathr1=1.46r2=1.47 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7692r2=1.7693 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7692 retrieving revision 1.7693 diff -u -b -r1.7692 -r1.7693 --- ChangeLog 7 Jun 2006 09:40:53 - 1.7692 +++ ChangeLog 7 Jun 2006 10:25:26 - 1.7693 @@ -1,3 +1,9 @@ +2006-06-07 Robert Schuster [EMAIL PROTECTED] + + * examples/gnu/classpath/examples/swing/Demo.java: + (mkMenuBar): Put look and feel radio buttons into + appropriate button group. + 2006-06-07 Chris Burdess [EMAIL PROTECTED] * gnu/xml/stream/SAXParser.java,
[cp-patches] FYI: added 4th 8 to bits4 field in BufferedImage
Hi, the attached patch adds the 4th 8 to the bits4 field in BufferedImage. With that patch I could fix a lot of ArrayIndexOutOfBoundsExceptions in ColorComponentModel and ColorModel. I wrote that from my basic understanding of color modells and hope it is correct. At least the app which is depending on this runs much better. The ChangeLog: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * java/awt/BufferedImage.java: Added fourth 8 to bits4 field. cya Robert Index: java/awt/image/BufferedImage.java === RCS file: /cvsroot/classpath/classpath/java/awt/image/BufferedImage.java,v retrieving revision 1.13 diff -u -r1.13 BufferedImage.java --- java/awt/image/BufferedImage.java 4 Nov 2005 21:39:52 - 1.13 +++ java/awt/image/BufferedImage.java 6 Jun 2006 07:38:19 - @@ -80,7 +80,7 @@ TYPE_BYTE_INDEXED = 13; static final int[] bits3 = { 8, 8, 8 }; - static final int[] bits4 = { 8, 8, 8 }; + static final int[] bits4 = { 8, 8, 8, 8 }; static final int[] bits1byte = { 8 }; static final int[] bits1ushort = { 16 }; signature.asc Description: OpenPGP digital signature
[cp-patches] RFC: attempt to fix NPEs in flipbufferstrategy
Hi, this is a small patch to the FlipBufferStrategy class which lives inside Component. I do not fully understand how it should work and how the implementation is supposed to work and therefore simply fixed the apparent issue: When someone requests a real (# of buffers 1) back buffer strategy the drawVBuffer field is not initialized and NPEs are thrown on access. I prevented these exceptions and implemented getGraphics in a way that actual painting will be visible. Comments? No ChangeLog so far as I am waiting for input from others. cya Robert Index: java/awt/Component.java === RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v retrieving revision 1.120 diff -u -r1.120 Component.java --- java/awt/Component.java 4 Jun 2006 20:21:39 - 1.120 +++ java/awt/Component.java 6 Jun 2006 08:07:43 - @@ -6332,7 +6332,7 @@ */ public Graphics getDrawGraphics() { - return drawVBuffer.getGraphics(); + return (drawVBuffer != null) ? drawVBuffer.getGraphics() : peer.getGraphics(); } /** @@ -6357,7 +6357,7 @@ */ public boolean contentsLost() { - if (drawVBuffer.contentsLost()) + if (drawVBuffer != null drawVBuffer.contentsLost()) { validatedContents = false; return true; signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: GdkScreenGraphicsDevice and friends implemented
Hi, this patch implements the GdkScreenGraphicsDevice and related classes. ChangeLog: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h: Regenerated. * include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h: New file. * include/Makefile.am: Added gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice. * gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java: (GdkGraphicsConfiguration): Rewritten. (getColorModel): Rewritten. (getColorModel(int)): Rewritten. (getBounds): Rewritten. (createCompatibleVolatileImage): Implemented. * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java: Added static initializer. (getDefaultScreenDevice): Rewritten. (nativeGetDefaultScreenDevice): New method. (getScreenDevices): Rewritten. (nativeGetScreenDevices): New method. (nativeInitState): New method. * gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java: Entirely rewritten. (X11DisplayMode): New inner class. * native/jni/gtk-peer/Makefile.am: Added gdkdisplay.h and gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c * native/jni/gtk-peer/gdkdisplay.h: New file. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c: (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_initStaticState): New function. (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeInitState): New function. (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment _nativeGetScreenDevices): New function. (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment _nativeGetDefaultScreenDevice): New function. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c: New file. * configure.ac: Added check for Xrandr library. Index: include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h === RCS file: /cvsroot/classpath/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h,v retrieving revision 1.3 diff -u -r1.3 gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h --- include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h 30 Apr 2006 10:37:36 - 1.3 +++ include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h 6 Jun 2006 09:22:01 - @@ -10,6 +10,10 @@ { #endif +JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_initStaticState (JNIEnv *env, jclass); +JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeInitState (JNIEnv *env, jobject); +JNIEXPORT jobjectArray JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetScreenDevices (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetDefaultScreenDevice (JNIEnv *env, jobject); JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetNumFontFamilies (JNIEnv *env, jobject); JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeGetFontFamilies (JNIEnv *env, jobject, jobjectArray); Index: include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h === RCS file: include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h diff -N include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h --- /dev/null 1 Jan 1970 00:00:00 - +++ include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h 6 Jun 2006 09:22:01 - @@ -0,0 +1,26 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#ifndef __gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice__ +#define __gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice__ + +#include jni.h + +#ifdef __cplusplus +extern C +{ +#endif + +JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_initStaticState (JNIEnv *env, jclass); +JNIEXPORT jobject JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetFixedDisplayMode (JNIEnv *env, jobject, jobject); +JNIEXPORT jstring JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetIDString (JNIEnv *env, jobject); +JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetDisplayModeIndex (JNIEnv *env, jobject, jobject); +JNIEXPORT jint JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetDisplayModeRate (JNIEnv *env, jobject, jobject); +JNIEXPORT jobjectArray JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetDisplayModes (JNIEnv *env, jobject, jobject); +JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeSetDisplayMode (JNIEnv *env, jobject, jobject, jint, jshort); +JNIEXPORT jobject JNICALL Java_gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice_nativeGetBounds (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice__ */ Index
[cp-patches] FYI: build fix for GdkGraphicsEnvironment
Hi, this patch adds an explicit cast to GraphicsDevice[] in GdkGraphicsEnvironment and makes the compilation (with a 1.4-style compiler) succeed again. ChangeLog: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java: (getScreenDevices): Added explicit cast. cya Robert Index: gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java === RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java,v retrieving revision 1.12 diff -u -r1.12 GdkGraphicsEnvironment.java --- gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java 6 Jun 2006 10:04:15 - 1.12 +++ gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java 6 Jun 2006 10:55:54 - @@ -78,7 +78,7 @@ devices = nativeGetScreenDevices(); } -return devices.clone(); +return (GraphicsDevice[]) devices.clone(); } private native GdkScreenGraphicsDevice[] nativeGetScreenDevices(); signature.asc Description: OpenPGP digital signature
[commit-cp] classpath/java/awt/image BufferedImage.java Cha...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/06 07:53:41 Modified files: java/awt/image : BufferedImage.java . : ChangeLog Log message: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * java/awt/BufferedImage.java: Added fourth 8 to bits4 field. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/image/BufferedImage.java?cvsroot=classpathr1=1.13r2=1.14 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7663r2=1.7664 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7663 retrieving revision 1.7664 diff -u -b -r1.7663 -r1.7664 --- ChangeLog 6 Jun 2006 03:33:31 - 1.7663 +++ ChangeLog 6 Jun 2006 07:53:41 - 1.7664 @@ -1,3 +1,7 @@ +2006-06-06 Robert Schuster [EMAIL PROTECTED] + + * java/awt/BufferedImage.java: Added fourth 8 to bits4 field. + 2006-06-06 David Gilbert [EMAIL PROTECTED] * javax/swing/JTable.java @@ -922,6 +926,11 @@ 2006-05-30 Robert Schuster [EMAIL PROTECTED] + * javax/swing/table/DefaultTableMode.java: Initialize dataVector + field early. + +2006-05-30 Robert Schuster [EMAIL PROTECTED] + * java/awt/Container.java: (removeAll): Reimplemented, added note.
[commit-cp] classpath includegnu_java_awt_peer_gtk_GdkGraph...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/06 10:04:15 Modified files: include: gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h Makefile.am . : configure.ac ChangeLog gnu/java/awt/peer/gtk: GdkGraphicsConfiguration.java GdkGraphicsEnvironment.java GdkScreenGraphicsDevice.java native/jni/gtk-peer: Makefile.am gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c Added files: include: gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h native/jni/gtk-peer: gdkdisplay.h gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c Log message: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h: Regenerated. * include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h: New file. * include/Makefile.am: Added gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice. * gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java: (GdkGraphicsConfiguration): Rewritten. (getColorModel): Rewritten. (getColorModel(int)): Rewritten. (getBounds): Rewritten. (createCompatibleVolatileImage): Implemented. * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java: Added static initializer. (getDefaultScreenDevice): Rewritten. (nativeGetDefaultScreenDevice): New method. (getScreenDevices): Rewritten. (nativeGetScreenDevices): New method. (nativeInitState): New method. * gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java: Entirely rewritten. (X11DisplayMode): New inner class. * native/jni/gtk-peer/Makefile.am: Added gdkdisplay.h and gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c * native/jni/gtk-peer/gdkdisplay.h: New file. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c: (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_initStaticState): New function. (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment_nativeInitState): New function. (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment _nativeGetScreenDevices): New function. (Java_gnu_java_awt_peer_gtk_GdkGraphicsEnvironment _nativeGetDefaultScreenDevice): New function. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c: New file. * configure.ac: Added check for Xrandr library. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h?cvsroot=classpathr1=1.3r2=1.4 http://cvs.savannah.gnu.org/viewcvs/classpath/include/Makefile.am?cvsroot=classpathr1=1.62r2=1.63 http://cvs.savannah.gnu.org/viewcvs/classpath/include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h?cvsroot=classpathrev=1.1 http://cvs.savannah.gnu.org/viewcvs/classpath/configure.ac?cvsroot=classpathr1=1.156r2=1.157 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7666r2=1.7667 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java?cvsroot=classpathr1=1.5r2=1.6 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java?cvsroot=classpathr1=1.11r2=1.12 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java?cvsroot=classpathr1=1.6r2=1.7 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/Makefile.am?cvsroot=classpathr1=1.43r2=1.44 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c?cvsroot=classpathr1=1.5r2=1.6 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/gdkdisplay.h?cvsroot=classpathrev=1.1 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c?cvsroot=classpathrev=1.1 Patches: Index: include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h === RCS file: /cvsroot/classpath/classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h 30 Apr 2006 10:37:36 - 1.3 +++ include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h 6 Jun 2006 10:04:14 - 1.4 @@ -10,6 +10,10 @@ { #endif +JNIEXPORT void
[commit-cp] classpath ChangeLog configure.ac
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/06 10:19:49 Modified files: . : ChangeLog configure.ac Log message: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * configure.ac: Added missing [ to expression. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7668r2=1.7669 http://cvs.savannah.gnu.org/viewcvs/classpath/configure.ac?cvsroot=classpathr1=1.158r2=1.159 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7668 retrieving revision 1.7669 diff -u -b -r1.7668 -r1.7669 --- ChangeLog 6 Jun 2006 10:07:05 - 1.7668 +++ ChangeLog 6 Jun 2006 10:19:48 - 1.7669 @@ -1,5 +1,9 @@ 2006-06-06 Robert Schuster [EMAIL PROTECTED] + * configure.ac: Added missing [ to expression. + +2006-06-06 Robert Schuster [EMAIL PROTECTED] + * configure.ac: Added missing { to expression. 2006-06-06 Robert Schuster [EMAIL PROTECTED] Index: configure.ac === RCS file: /cvsroot/classpath/classpath/configure.ac,v retrieving revision 1.158 retrieving revision 1.159 diff -u -b -r1.158 -r1.159 --- configure.ac6 Jun 2006 10:07:05 - 1.158 +++ configure.ac6 Jun 2006 10:19:48 - 1.159 @@ -418,7 +418,7 @@ dnl Check if we can link against the XRandR library and set dnl HAVE_XRANDR accordingly. AC_CHECK_LIB([Xrandr], [XRRQueryExtension], - [AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have libXrandr.])X_EXTRA_LIBS=$X_EXTRA_LIBS -lXrandr]], + [AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have libXrandr.])[X_EXTRA_LIBS=$X_EXTRA_LIBS -lXrandr]], [true], [${X_LIBS}])
[commit-cp] classpath/gnu/java/awt/peer/gtk GdkGraphicsEnvi...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/06/06 10:57:37 Modified files: gnu/java/awt/peer/gtk: GdkGraphicsEnvironment.java . : ChangeLog Log message: 2006-06-06 Robert Schuster [EMAIL PROTECTED] * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java: (getScreenDevices): Added explicit cast. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java?cvsroot=classpathr1=1.12r2=1.13 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.7670r2=1.7671 Patches: Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7670 retrieving revision 1.7671 diff -u -b -r1.7670 -r1.7671 --- ChangeLog 6 Jun 2006 10:46:43 - 1.7670 +++ ChangeLog 6 Jun 2006 10:57:37 - 1.7671 @@ -1,3 +1,8 @@ +2006-06-06 Robert Schuster [EMAIL PROTECTED] + + * gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java: + (getScreenDevices): Added explicit cast. + 2006-06-06 Roman Kennke [EMAIL PROTECTED] * javax/swing/plaf/basic/BasicTextUI.java