diff --git a/awt/fonts.cs b/awt/fonts.cs index d18f82f6..73367142 100644 --- a/awt/fonts.cs +++ b/awt/fonts.cs @@ -161,7 +161,7 @@ namespace ikvm.awt netFont = J2C.ConvertFont(name, getStyle(null), getSize(null)); } - public override bool canDisplay(java.awt.Font font, char param2) + public override bool canDisplay(java.awt.Font font, int param2) { //HACK There is no equivalent in C# http://msdn2.microsoft.com/en-us/library/sf4dhbw8(VS.80).aspx return true; diff --git a/awt/robot.cs b/awt/robot.cs index e9f89555..80a37470 100644 --- a/awt/robot.cs +++ b/awt/robot.cs @@ -42,6 +42,10 @@ namespace ikvm.awt screen = ((NetGraphicsDevice)device).screen; } + public void dispose() + { + } + public int getRGBPixel(int x, int y) { #if WHIDBEY diff --git a/awt/toolkit.cs b/awt/toolkit.cs index e4005f05..4e42b2c9 100644 --- a/awt/toolkit.cs +++ b/awt/toolkit.cs @@ -54,6 +54,7 @@ namespace ikvm.awt delegate java.awt.Dimension GetDimension(); delegate Rectangle ConvertRectangle(Rectangle r); delegate Point ConvertPoint(Point p); + delegate object GetObject(); class UndecoratedForm : Form { @@ -529,6 +530,18 @@ namespace ikvm.awt { return new NetDesktopPeer(); } + + public override bool isModalExclusionTypeSupported(java.awt.Dialog.ModalExclusionType modalExclusionType) + { + // TODO + return false; + } + + public override bool isModalityTypeSupported(java.awt.Dialog.ModalityType modalityType) + { + // TODO + return false; + } } class NetLightweightComponentPeer : NetComponentPeer, java.awt.peer.LightweightPeer @@ -1081,6 +1094,11 @@ namespace ikvm.awt control.Focus(); } + public bool requestFocus(java.awt.Component request, bool temporary, bool allowWindowFocus, long time, sun.awt.CausedFocusEvent.Cause cause) + { + return requestFocus(request, temporary, allowWindowFocus, time); + } + /// /// /// @@ -1833,6 +1851,31 @@ namespace ikvm.awt { return control.Focus(); } + + public void setAlwaysOnTop(bool alwaysOnTop) + { + throw new NotImplementedException(); + } + + public void updateFocusableWindowState() + { + throw new NotImplementedException(); + } + + public void setModalBlocked(java.awt.Dialog blocker, bool blocked) + { + throw new NotImplementedException(); + } + + public void updateMinimumSize() + { + throw new NotImplementedException(); + } + + public void updateIconImages() + { + throw new NotImplementedException(); + } } class NetFramePeer : NetWindowPeer, FramePeer @@ -1928,10 +1971,25 @@ namespace ikvm.awt throw new NotImplementedException(); } + private void SetBoundsImpl(int x, int y, int width, int height) + { + control.Bounds = new Rectangle(x, y, width, height); + } + public void setBoundsPrivate(int x, int y, int width, int height) { - // TODO use control.Invoke - control.Bounds = new Rectangle(x, y, width, height); + control.Invoke(new SetXYWH(SetBoundsImpl), x, y, width, height); + } + + private object GetBoundsImpl() + { + Rectangle r = control.Bounds; + return new java.awt.Rectangle(r.Left, r.Top, r.Width, r.Height); + } + + public java.awt.Rectangle getBoundsPrivate() + { + return (java.awt.Rectangle)control.Invoke(new GetObject(GetBoundsImpl)); } } diff --git a/classpath/allsources.lst b/classpath/allsources.lst index e465eb51..e40fedbb 100644 --- a/classpath/allsources.lst +++ b/classpath/allsources.lst @@ -4940,6 +4940,7 @@ ../../classpath/org/omg/SendingContext/RunTime.java ../../classpath/org/omg/SendingContext/RunTimeOperations.java ../../classpath/org/omg/stub/java/rmi/_Remote_Stub.java +../../classpath/sun/awt/CausedFocusEvent.java ../../classpath/sun/misc/Service.java ../../classpath/sun/misc/ServiceConfigurationError.java ../../classpath/sun/reflect/annotation/AnnotationInvocationHandler.java diff --git a/openjdk/allsources.lst b/openjdk/allsources.lst index ed656098..b19f38b2 100644 --- a/openjdk/allsources.lst +++ b/openjdk/allsources.lst @@ -4343,6 +4343,7 @@ ../../classpath/org/omg/SendingContext/RunTime.java ../../classpath/org/omg/SendingContext/RunTimeOperations.java ../../classpath/org/omg/stub/java/rmi/_Remote_Stub.java +../../classpath/sun/awt/CausedFocusEvent.java ../classpath/gnu/classpath/Configuration.java ../classpath/gnu/classpath/PointerUtil.java ../classpath/gnu/classpath/VMStackWalker.java