Import GNU Classpath (libgcj-import-20070727).
libjava/ 2007-08-04 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (libgcj-import-20070727). * Regenerate class and header files. * Regenerate auto* files. * include/jvm.h: * jni-libjvm.cc (Jv_JNI_InvokeFunctions): Rename type. * jni.cc (_Jv_JNIFunctions, _Jv_JNI_InvokeFunctions): Likewise. * jni.cc (_Jv_JNI_CallAnyMethodA, _Jv_JNI_CallAnyVoidMethodA, _Jv_JNI_CallMethodA, _Jv_JNI_CallVoidMethodA, _Jv_JNI_CallStaticMethodA, _Jv_JNI_CallStaticVoidMethodA, _Jv_JNI_NewObjectA, _Jv_JNI_SetPrimitiveArrayRegion): Constify jvalue parameter. * java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Likewise. * java/lang/VMFloat.java (toString, parseFloat): New. * gnu/awt/xlib/XToolkit.java (setAlwaysOnTop, isModalityTypeSupported, isModalExclusionTypeSupported): New (stub only). * gnu/awt/xlib/XCanvasPeer.java (requestFocus): Likewise. * gnu/awt/xlib/XFramePeer.java (updateMinimumSize, updateIconImages, updateFocusableWindowState, setModalBlocked, getBoundsPrivate, setAlwaysOnTop): Likewise. * gnu/awt/xlib/XFontPeer.java (canDisplay): Update signature. * scripts/makemake.tcl: Ignore gnu/javax/sound/sampled/gstreamer, ignore javax.sound.sampled.spi.MixerProvider, ignore .in files. * HACKING: Mention --enable-gstreamer-peer, removal of generated files. libjava/classpath/ 2007-08-04 Matthias Klose <doko@ubuntu.com> * java/util/EnumMap.java (clone): Add cast. From-SVN: r127204
This commit is contained in:
@@ -43,12 +43,16 @@ import java.awt.EventQueue;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GraphicsConfiguration;
|
||||
import java.awt.GraphicsDevice;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.Image;
|
||||
import java.awt.Insets;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.PaintEvent;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.image.VolatileImage;
|
||||
|
||||
import gnu.x11.Window;
|
||||
import gnu.x11.event.Event;
|
||||
@@ -135,12 +139,22 @@ public class XWindowPeer
|
||||
*/
|
||||
public Graphics getGraphics()
|
||||
{
|
||||
return new XGraphics(xwindow);
|
||||
return new XGraphics2D(xwindow);
|
||||
}
|
||||
|
||||
public Image createImage(int w, int h)
|
||||
{
|
||||
return new XImage(w, h);
|
||||
// FIXME: Should return a buffered image.
|
||||
return createVolatileImage(w, h);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VolatileImage createVolatileImage(int width, int height)
|
||||
{
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
GraphicsDevice gd = ge.getDefaultScreenDevice();
|
||||
GraphicsConfiguration gc = gd.getDefaultConfiguration();
|
||||
return gc.createCompatibleVolatileImage(width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,6 +182,9 @@ public class XWindowPeer
|
||||
new Rectangle(0, 0, w.getWidth(),
|
||||
w.getHeight())));
|
||||
|
||||
Graphics g = getGraphics();
|
||||
g.clearRect(0, 0, awtComponent.getWidth(), awtComponent.getHeight());
|
||||
g.dispose();
|
||||
// // Reset input selection.
|
||||
// atts.set_override_redirect(false);
|
||||
// xwindow.change_attributes(atts);
|
||||
@@ -240,7 +257,7 @@ public class XWindowPeer
|
||||
*/
|
||||
public FontMetrics getFontMetrics(Font font)
|
||||
{
|
||||
XFontPeer fontPeer = (XFontPeer) font.getPeer();
|
||||
XFontPeer2 fontPeer = (XFontPeer2) font.getPeer();
|
||||
return fontPeer.getFontMetrics(font);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user