From e4f977c0a1663dd71aa19019d55b07d87ad667e2 Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Tue, 26 Aug 2008 13:09:34 +0400 Subject: [PATCH 001/199] 6585765: RFE: Remove Unicows-related code from AWT 6733976: VS2008 errors compiling AWT files - explicit casts need to be added 6728735: VS2008 errors compiling UnicowsLoader.h and fatal error in awtmsg.h Unicows-related and Win95/98/Me-related code is removed Reviewed-by: uta, tdv --- jdk/make/sun/awt/FILES_c_windows.gmk | 4 - jdk/make/sun/awt/Makefile | 10 +- jdk/make/sun/awt/make.depend | 166 +++-- jdk/make/sun/jawt/make.depend | 2 +- jdk/make/sun/splashscreen/Makefile | 2 +- .../sun/awt/windows/WComponentPeer.java | 7 - .../sun/awt/splashscreen/splashscreen_sys.c | 45 +- .../sun/java2d/d3d/D3DPipelineManager.cpp | 22 +- .../native/sun/java2d/d3d/D3DRenderQueue.cpp | 2 +- .../native/sun/java2d/d3d/D3DRenderer.cpp | 2 + .../native/sun/java2d/d3d/D3DSurfaceData.cpp | 3 +- .../sun/java2d/windows/GDIBlitLoops.cpp | 1 + .../native/sun/java2d/windows/GDIRenderer.cpp | 4 +- .../java2d/windows/GDIWindowSurfaceData.cpp | 4 +- .../sun/java2d/windows/WindowsFlags.cpp | 2 - .../native/sun/windows/ComCtl32Util.cpp | 68 +-- .../windows/native/sun/windows/ComCtl32Util.h | 42 +- .../windows/native/sun/windows/Devices.cpp | 82 ++- jdk/src/windows/native/sun/windows/Devices.h | 6 +- .../native/sun/windows/GDIHashtable.cpp | 53 +- .../windows/native/sun/windows/GDIHashtable.h | 8 +- .../native/sun/windows/ShellFolder2.cpp | 171 ++---- .../native/sun/windows/UnicowsLoader.cpp | 430 ------------- .../native/sun/windows/UnicowsLoader.h | 198 ------ .../native/sun/windows/WPrinterJob.cpp | 116 +--- jdk/src/windows/native/sun/windows/awt.h | 71 +-- .../windows/native/sun/windows/awt_Button.cpp | 8 +- .../native/sun/windows/awt_Checkbox.cpp | 5 +- .../windows/native/sun/windows/awt_Choice.cpp | 7 +- .../windows/native/sun/windows/awt_Color.cpp | 4 +- .../native/sun/windows/awt_Component.cpp | 430 ++----------- .../native/sun/windows/awt_Component.h | 4 - .../windows/native/sun/windows/awt_Cursor.cpp | 36 +- .../windows/native/sun/windows/awt_Cursor.h | 4 +- .../native/sun/windows/awt_DataTransferer.cpp | 18 +- .../native/sun/windows/awt_Desktop.cpp | 20 +- .../sun/windows/awt_DesktopProperties.cpp | 128 ++-- .../windows/native/sun/windows/awt_Dialog.cpp | 7 +- .../windows/native/sun/windows/awt_DnDDS.cpp | 5 +- .../windows/native/sun/windows/awt_DnDDT.cpp | 8 +- .../native/sun/windows/awt_DrawingSurface.cpp | 2 + .../native/sun/windows/awt_FileDialog.cpp | 35 +- .../native/sun/windows/awt_FileDialog.h | 43 +- .../windows/native/sun/windows/awt_Font.cpp | 125 ++-- jdk/src/windows/native/sun/windows/awt_Font.h | 1 - .../windows/native/sun/windows/awt_Frame.cpp | 2 +- .../native/sun/windows/awt_InputMethod.cpp | 14 +- .../native/sun/windows/awt_InputTextInfor.cpp | 35 +- .../native/sun/windows/awt_InputTextInfor.h | 2 +- .../windows/native/sun/windows/awt_List.cpp | 16 +- .../windows/native/sun/windows/awt_MMStub.cpp | 573 ------------------ .../windows/native/sun/windows/awt_MMStub.h | 131 ---- .../native/sun/windows/awt_MenuItem.cpp | 20 +- .../windows/native/sun/windows/awt_Multimon.h | 54 -- .../windows/native/sun/windows/awt_Object.cpp | 15 +- .../native/sun/windows/awt_Palette.cpp | 4 +- .../native/sun/windows/awt_PopupMenu.cpp | 8 +- .../native/sun/windows/awt_PrintControl.cpp | 146 ++--- .../native/sun/windows/awt_PrintDialog.cpp | 8 +- .../native/sun/windows/awt_PrintJob.cpp | 82 ++- .../windows/native/sun/windows/awt_Robot.cpp | 47 +- .../native/sun/windows/awt_ScrollPane.cpp | 22 +- .../native/sun/windows/awt_TextArea.cpp | 73 +-- .../windows/native/sun/windows/awt_TextArea.h | 8 +- .../native/sun/windows/awt_TextComponent.cpp | 6 +- .../native/sun/windows/awt_TextComponent.h | 11 +- .../native/sun/windows/awt_TextField.cpp | 8 +- .../native/sun/windows/awt_Toolkit.cpp | 78 +-- .../windows/native/sun/windows/awt_Toolkit.h | 50 +- .../native/sun/windows/awt_TrayIcon.cpp | 91 ++- .../windows/native/sun/windows/awt_TrayIcon.h | 50 +- .../native/sun/windows/awt_Unicode.cpp | 46 -- .../windows/native/sun/windows/awt_Unicode.h | 50 -- .../sun/windows/awt_Win32GraphicsConfig.cpp | 8 +- .../sun/windows/awt_Win32GraphicsDevice.cpp | 121 ++-- .../sun/windows/awt_Win32GraphicsDevice.h | 23 +- .../sun/windows/awt_Win32GraphicsEnv.cpp | 54 +- .../windows/native/sun/windows/awt_Window.cpp | 101 ++- .../windows/native/sun/windows/awt_dlls.cpp | 422 ------------- jdk/src/windows/native/sun/windows/awt_dlls.h | 173 ------ jdk/src/windows/native/sun/windows/awtmsg.h | 12 - jdk/src/windows/native/sun/windows/jawt.cpp | 3 +- 82 files changed, 942 insertions(+), 4036 deletions(-) delete mode 100644 jdk/src/windows/native/sun/windows/UnicowsLoader.cpp delete mode 100644 jdk/src/windows/native/sun/windows/UnicowsLoader.h delete mode 100644 jdk/src/windows/native/sun/windows/awt_MMStub.cpp delete mode 100644 jdk/src/windows/native/sun/windows/awt_MMStub.h delete mode 100644 jdk/src/windows/native/sun/windows/awt_Multimon.h delete mode 100644 jdk/src/windows/native/sun/windows/awt_Unicode.cpp delete mode 100644 jdk/src/windows/native/sun/windows/awt_Unicode.h delete mode 100644 jdk/src/windows/native/sun/windows/awt_dlls.cpp delete mode 100644 jdk/src/windows/native/sun/windows/awt_dlls.h diff --git a/jdk/make/sun/awt/FILES_c_windows.gmk b/jdk/make/sun/awt/FILES_c_windows.gmk index 1bd3d485366..1a9b3b6ad3c 100644 --- a/jdk/make/sun/awt/FILES_c_windows.gmk +++ b/jdk/make/sun/awt/FILES_c_windows.gmk @@ -153,7 +153,6 @@ FILES_cpp = \ awt_Menu.cpp \ awt_MenuBar.cpp \ awt_MenuItem.cpp \ - awt_MMStub.cpp \ awt_MouseEvent.cpp \ awt_Object.cpp \ awt_Palette.cpp \ @@ -171,7 +170,6 @@ FILES_cpp = \ awt_TextComponent.cpp \ awt_TextField.cpp \ awt_Toolkit.cpp \ - awt_Unicode.cpp \ awt_Window.cpp \ awt_Win32GraphicsEnv.cpp \ awt_Win32GraphicsDevice.cpp \ @@ -202,6 +200,4 @@ FILES_cpp = \ ThemeReader.cpp \ ComCtl32Util.cpp \ initIDs.cpp \ - awt_dlls.cpp \ - UnicowsLoader.cpp \ MouseInfo.cpp diff --git a/jdk/make/sun/awt/Makefile b/jdk/make/sun/awt/Makefile index e34d2f0901a..2754dd75ec3 100644 --- a/jdk/make/sun/awt/Makefile +++ b/jdk/make/sun/awt/Makefile @@ -251,8 +251,14 @@ endif # PLATFORM ifeq ($(PLATFORM), windows) # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS OTHER_LDLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \ - imm32.lib ole32.lib uuid.lib $(JVMLIB) \ - shell32.lib + imm32.lib ole32.lib uuid.lib shell32.lib \ + comdlg32.lib winmm.lib comctl32.lib delayimp.lib \ + $(JVMLIB) \ + /DELAYLOAD:user32.dll /DELAYLOAD:gdi32.dll \ + /DELAYLOAD:shell32.dll /DELAYLOAD:winmm.dll \ + /DELAYLOAD:winspool.drv /DELAYLOAD:imm32.dll \ + /DELAYLOAD:ole32.dll /DELAYLOAD:comdlg32.dll \ + /DELAYLOAD:comctl32.dll clean:: awt.clean diff --git a/jdk/make/sun/awt/make.depend b/jdk/make/sun/awt/make.depend index a014b416426..650e4c7fde8 100644 --- a/jdk/make/sun/awt/make.depend +++ b/jdk/make/sun/awt/make.depend @@ -14,141 +14,135 @@ $(OBJDIR)/AnyInt.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/sha $(OBJDIR)/AnyShort.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/awt_AWTEvent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_AWTEvent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_BitmapUtil.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_BitmapUtil.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Brush.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Brush.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Button.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Button.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WButtonPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Button.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Button.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Button.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WButtonPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Button.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Canvas.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Canvas.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Checkbox.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Checkbox.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Checkbox.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Checkbox.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Checkbox.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Checkbox.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Choice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Choice.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WChoicePeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Choice.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Choice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Choice.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WChoicePeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Choice.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Clipboard.obj:: $(CLASSHDRDIR)/sun_awt_windows_WClipboard.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Clipboard.obj:: $(CLASSHDRDIR)/sun_awt_windows_WClipboard.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Color.obj:: $(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Color.obj:: $(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Component.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Component.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Container.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Container.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Cursor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Cursor.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCustomCursor.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WGlobalCursorManager.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Cursor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Cursor.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WCustomCursor.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WGlobalCursorManager.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_DataTransferer.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_datatransfer_DataTransferer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDataTransferer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_DataTransferer.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_datatransfer_DataTransferer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDataTransferer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Debug.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Debug.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/awt_Desktop.obj:: ../../../src/share/javavm/export/jni.h ../../../src/windows/javavm/export/jni_md.h -$(OBJDIR)/awt_DesktopProperties.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDesktopProperties.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_DesktopProperties.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDesktopProperties.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Dialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Dialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Dimension.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Dimension.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_dlls.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_DnDDS.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_dnd_SunDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_DnDDS.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_dnd_SunDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDragSourceContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_DnDDT.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDropTargetContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_DnDDT.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_dnd_DnDConstants.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDropTargetContextPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_DataTransferer.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_DrawingSurface.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_DrawingSurface.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Event.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Event.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_FileDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_FileDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Font.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDefaultFontCharset.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFontPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Font.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDefaultFontCharset.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFontPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Frame.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/java_lang_Integer.h $(CLASSHDRDIR)/sun_awt_EmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Frame.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/java_lang_Integer.h $(CLASSHDRDIR)/sun_awt_EmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFrame.h $(CLASSHDRDIR)/sun_awt_windows_WEmbeddedFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_GDIObject.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_GDIObject.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h - -$(OBJDIR)/awt_IconCursor.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_IconCursor.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/awt_ImageRep.obj:: $(CLASSHDRDIR)/sun_awt_image_ImageRepresentation.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h $(OBJDIR)/awt_ImagingLib.obj:: $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_image_ConvolveOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h -$(OBJDIR)/awt_InputEvent.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_InputEvent.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_InputMethod.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethodDescriptor.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_InputMethod.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethodDescriptor.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/common/locale_str.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_InputTextInfor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_InputTextInfor.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Insets.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Insets.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_KeyboardFocusManager.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_KeyboardFocusManager.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_KeyEvent.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_KeyEvent.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Label.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Label.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WLabelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Label.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Label.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Label.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WLabelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Label.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_List.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_List.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Menu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Menu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_MenuBar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_MenuBar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_MenuItem.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_CheckboxMenuItem.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_MenuItem.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_CheckboxMenuItem.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCheckboxMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/awt_Mlib.obj:: $(CLASSHDRDIR)/java_awt_image_BufferedImage.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt_Mlib.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_MMStub.obj:: ../../../src/windows/native/sun/windows/awt_MMStub.h +$(OBJDIR)/awt_MouseEvent.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_MouseEvent.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_new.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_new.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Object.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Object.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Palette.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_CustomPaletteDef.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Palette.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_CustomPaletteDef.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h - -$(OBJDIR)/awt_Panel.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Panel.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/awt_parseImage.obj:: $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_image_BufferedImage.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_image_ImagingLib.h $(CLASSHDRDIR)/sun_awt_image_IntegerComponentRaster.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/awt_parseImage.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.h ../../../src/share/native/sun/awt/medialib/mlib_image_get.h ../../../src/share/native/sun/awt/medialib/mlib_image_types.h ../../../src/share/native/sun/awt/medialib/mlib_status.h ../../../src/share/native/sun/awt/medialib/mlib_types.h ../../../src/share/native/sun/awt/medialib/safe_alloc.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/awt_Mlib.h -$(OBJDIR)/awt_Pen.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Pen.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_PopupMenu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_PopupMenu.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Event.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_PrintControl.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_PrintControl.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_PrintDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialog.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_PrintDialog.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialog.h $(CLASSHDRDIR)/sun_awt_windows_WPrintDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_PrintJob.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrinterJob.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_PrintJob.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPrinterJob.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Rectangle.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Rectangle.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Rectangle.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Rectangle.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Robot.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WRobotPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Robot.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Robot.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WRobotPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Robot.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Scrollbar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Scrollbar.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_ScrollPane.obj:: $(CLASSHDRDIR)/java_awt_Adjustable.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_AdjustmentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_ScrollPane.h $(CLASSHDRDIR)/java_awt_ScrollPaneAdjustable.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollPanePeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_ScrollPane.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_ScrollPane.obj:: $(CLASSHDRDIR)/java_awt_Adjustable.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_AdjustmentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Scrollbar.h $(CLASSHDRDIR)/java_awt_ScrollPane.h $(CLASSHDRDIR)/java_awt_ScrollPaneAdjustable.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollbarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WScrollPanePeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Scrollbar.h ../../../src/windows/native/sun/windows/awt_ScrollPane.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_TextArea.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextArea.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextAreaPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_TextArea.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_TextArea.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextArea.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextAreaPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_TextArea.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_TextComponent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_TextComponent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_TextField.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_TextField.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextFieldPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_TextField.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_TextField.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_TextComponent.h $(CLASSHDRDIR)/java_awt_TextField.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WTextFieldPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_TextComponent.h ../../../src/windows/native/sun/windows/awt_TextField.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Toolkit.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_ComponentPeer.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Toolkit.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_List.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_ComponentPeer.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_PopupMenu.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WListPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPopupMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Clipboard.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DesktopProperties.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_DnDDS.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_List.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_new.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PopupMenu.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_TrayIcon.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_ActionEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TrayIcon.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WTrayIconPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_TrayIcon.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_TrayIcon.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_ActionEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_TrayIcon.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WTrayIconPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_TrayIcon.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Unicode.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Win32GraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsConfig.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Win32GraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsConfig.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsConfig.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Win32GraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsDevice.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Win32GraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_color_ColorSpace.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_image_DataBuffer.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsDevice.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/awt/image/dither.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/img_util_md.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Win32GraphicsEnv.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsEnvironment.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/awt_Win32GraphicsEnv.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_Win32GraphicsEnvironment.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h - -$(OBJDIR)/awt_Window.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/awt_Window.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/Blit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h @@ -170,9 +164,9 @@ $(OBJDIR)/ByteGray.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/s $(OBJDIR)/ByteIndexed.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyByte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/Index12Gray.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/CmdIDList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/CmdIDList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/CmdIDList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/ComCtl32Util.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/ComCtl32Util.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/D3DBlitLoops.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/Ushort565Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h @@ -182,7 +176,7 @@ $(OBJDIR)/D3DContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDI $(OBJDIR)/D3DGlyphCache.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/D3DGraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DGraphicsDevice.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/D3DGraphicsDevice.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DGraphicsDevice.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGraphicsDevice.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/D3DMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h @@ -192,15 +186,15 @@ $(OBJDIR)/D3DMaskFill.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $( $(OBJDIR)/D3DPaints.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/D3DPipelineManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBadHardware.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/D3DPipelineManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBadHardware.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/D3DRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DRenderer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/D3DRenderQueue.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/D3DRenderQueue.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DBlitLoops.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedRenderPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DBlitLoops.h ../../../src/windows/native/sun/java2d/d3d/D3DBufImgOps.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskBlit.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskFill.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/D3DResourceManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/D3DResourceManager.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPaints.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/D3DSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/D3DSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/D3DTextRenderer.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DTextRenderer.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedTextPipe.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/sun/font/AccelGlyphCache.h ../../../src/share/native/sun/font/fontscalerdefs.h ../../../src/share/native/sun/font/sunfontids.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DGlyphCache.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DRenderQueue.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DTextRenderer.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h @@ -216,7 +210,7 @@ $(OBJDIR)/debug_trace.obj:: ../../../src/share/javavm/export/jni.h ../../../src/ $(OBJDIR)/debug_util.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h -$(OBJDIR)/Devices.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/Devices.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/java_awt_Transparency.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DContext.h $(CLASSHDRDIR)/sun_java2d_d3d_D3DSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelDeviceEventNotifier.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/ShaderList.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/d3d/D3DContext.h ../../../src/windows/native/sun/java2d/d3d/D3DMaskCache.h ../../../src/windows/native/sun/java2d/d3d/D3DPipeline.h ../../../src/windows/native/sun/java2d/d3d/D3DPipelineManager.h ../../../src/windows/native/sun/java2d/d3d/D3DResourceManager.h ../../../src/windows/native/sun/java2d/d3d/D3DSurfaceData.h ../../../src/windows/native/sun/java2d/d3d/D3DVertexCacher.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/Disposer.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h @@ -240,19 +234,19 @@ $(OBJDIR)/FourByteAbgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../s $(OBJDIR)/FourByteAbgrPre.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any4Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/FourByteAbgrPre.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/GDIBlitLoops.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIBlitLoops.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/GDIBlitLoops.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIBlitLoops.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/GDIHashtable.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/GDIHashtable.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/GDIRenderer.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/GDIRenderer.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/GDIWindowSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/GDIWindowSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/gifdecoder.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h $(OBJDIR)/GraphicsPrimitiveMgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/Hashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/Hashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/imageInitIDs.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/image/imageInitIDs.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h @@ -282,9 +276,9 @@ $(OBJDIR)/MaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR) $(OBJDIR)/MaskFill.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskFill.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/MouseInfo.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/MouseInfo.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/ObjectList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/ObjectList.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/OGLBlitLoops.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLBlitLoops.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/OGLBlitLoops.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h @@ -320,13 +314,13 @@ $(OBJDIR)/ScaledBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDI $(OBJDIR)/ShapeSpanIterator.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_ShapeSpanIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/PathConsumer2D.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/ShellFolder2.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/ShellFolder2.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/SpanClipRenderer.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_RegionIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_SpanClipRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h $(OBJDIR)/SurfaceData.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h -$(OBJDIR)/ThemeReader.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_ThemeReader.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/ThemeReader.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_ThemeReader.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h $(OBJDIR)/ThreeByteBgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/Any3Byte.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h @@ -334,8 +328,6 @@ $(OBJDIR)/Trace.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/ $(OBJDIR)/TransformHelper.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h -$(OBJDIR)/UnicowsLoader.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h - $(OBJDIR)/Ushort4444Argb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort4444Argb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h $(OBJDIR)/Ushort555Rgb.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyShort.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/Ushort555Rgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h @@ -352,6 +344,6 @@ $(OBJDIR)/WGLGraphicsConfig.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformO $(OBJDIR)/WGLSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_opengl_WGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/java2d/opengl/WGLGraphicsConfig.h ../../../src/windows/native/sun/java2d/opengl/WGLSurfaceData.h -$(OBJDIR)/WindowsFlags.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/WindowsFlags.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h -$(OBJDIR)/WPrinterJob.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h +$(OBJDIR)/WPrinterJob.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintControl.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h diff --git a/jdk/make/sun/jawt/make.depend b/jdk/make/sun/jawt/make.depend index 47792f71696..2eefe099c35 100644 --- a/jdk/make/sun/jawt/make.depend +++ b/jdk/make/sun/jawt/make.depend @@ -1 +1 @@ -$(OBJDIR)/jawt.obj:: $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_AWTEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Component.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Dimension.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Event.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Font.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_PlatformFont.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/UnicowsLoader.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/stdhdrs.h +$(OBJDIR)/jawt.obj:: $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_AWTEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Component.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Dimension.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Event.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_Font.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_PlatformFont.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/../../awt/CClassHeaders/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jawt_md.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_DrawingSurface.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/stdhdrs.h diff --git a/jdk/make/sun/splashscreen/Makefile b/jdk/make/sun/splashscreen/Makefile index e65ab7ec181..22a5525ca00 100644 --- a/jdk/make/sun/splashscreen/Makefile +++ b/jdk/make/sun/splashscreen/Makefile @@ -67,7 +67,7 @@ ifneq ($(PLATFORM), windows) OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread else # PLATFORM CFLAGS += -DWITH_WIN32 - OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib + OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll #$(JVMLIB) $(OBJDIR)/../../jpeg/$(OBJDIRNAME)/jpeg$(SUFFIX).lib endif # PLATFORM diff --git a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java index 0f71eda29de..e8d0bcf291c 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java @@ -68,13 +68,6 @@ public abstract class WComponentPeer extends WObjectPeer private static final Logger log = Logger.getLogger("sun.awt.windows.WComponentPeer"); private static final Logger shapeLog = Logger.getLogger("sun.awt.windows.shape.WComponentPeer"); - static { - wheelInit(); - } - - // Only actually does stuff if running on 95 - native static void wheelInit(); - // ComponentPeer implementation SurfaceData surfaceData; diff --git a/jdk/src/windows/native/sun/awt/splashscreen/splashscreen_sys.c b/jdk/src/windows/native/sun/awt/splashscreen/splashscreen_sys.c index 069cf301d3b..c5b42b9f4b5 100644 --- a/jdk/src/windows/native/sun/awt/splashscreen/splashscreen_sys.c +++ b/jdk/src/windows/native/sun/awt/splashscreen/splashscreen_sys.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,24 +23,21 @@ * have any questions. */ +// copy from awt.h +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0600 +#endif + +// copy from awt.h +#ifndef _WIN32_IE +#define _WIN32_IE 0x0600 +#endif + #include "splashscreen_impl.h" #include #include #include -/* layered windows api prototypes. wouldn't be needed if we could use an updated version of the MS PSDK. */ - -typedef BOOL WINAPI UpdateLayeredWindowT(HWND hwnd, // handle to layered window - HDC hdcDst, // handle to screen DC - POINT * pptDst, // new screen position - SIZE * psize, // new size of the layered window - HDC hdcSrc, // handle to surface DC - POINT * pptSrc, // layer position - COLORREF crKey, // color key - BLENDFUNCTION * pblend, // blend function - DWORD dwFlags // options - ); - #ifndef WS_EX_LAYERED #define WS_EX_LAYERED 0x80000 #endif @@ -57,21 +54,6 @@ typedef BOOL WINAPI UpdateLayeredWindowT(HWND hwnd, // handle to layered win #define AC_SRC_ALPHA 0x01 #endif -static UpdateLayeredWindowT *UpdateLayeredWindow = NULL; - -/* Get/SetWindowLongPtr prototypes, for the case we're compiling with old headers for a 32-bit platform - copied from Component.cpp - FIXME: remove this as soon as the build process is using up-to-date headers */ -#if !defined(__int3264) -#define GetWindowLongPtr GetWindowLong -#define SetWindowLongPtr SetWindowLong -#define GWLP_USERDATA GWL_USERDATA -#define GWLP_WNDPROC GWL_WNDPROC -typedef __int32 LONG_PTR; -typedef unsigned __int32 ULONG_PTR; -#endif // __int3264 - - #define WM_SPLASHUPDATE WM_USER+1 #define WM_SPLASHRECONFIGURE WM_USER+2 @@ -436,16 +418,11 @@ SplashUnlock(Splash * splash) void SplashInitPlatform(Splash * splash) { - HMODULE user32 = LoadLibrary("user32.dll"); HDC hdc; int paletteMode; InitializeCriticalSection(&splash->lock); splash->isLayered = FALSE; - if (user32) { - UpdateLayeredWindow = (UpdateLayeredWindowT *) - GetProcAddress(user32, "UpdateLayeredWindow"); - } hdc = GetDC(NULL); paletteMode = (GetDeviceCaps(hdc, RASTERCAPS) & RC_PALETTE) != 0; if (UpdateLayeredWindow && !paletteMode) { diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp index f0838dd5625..bee55638ddd 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp @@ -184,7 +184,7 @@ void D3DPipelineManager::NotifyAdapterEventListeners(UINT adapter, pMgr = D3DPipelineManager::GetInstance(); RETURN_IF_NULL(pMgr); hMon = pMgr->pd3d9->GetAdapterMonitor(adapter); - gdiScreen = AwtWin32GraphicsDevice::GetScreenFromMHND((MHND)hMon); + gdiScreen = AwtWin32GraphicsDevice::GetScreenFromHMONITOR(hMon); JNU_CallStaticMethodByName(env, NULL, "sun/java2d/pipe/hw/AccelDeviceEventNotifier", @@ -194,21 +194,21 @@ void D3DPipelineManager::NotifyAdapterEventListeners(UINT adapter, UINT D3DPipelineManager::GetAdapterOrdinalForScreen(jint gdiScreen) { - MHND mHnd = AwtWin32GraphicsDevice::GetMonitor(gdiScreen); - if (mHnd == (MHND)0) { + HMONITOR mHnd = AwtWin32GraphicsDevice::GetMonitor(gdiScreen); + if (mHnd == (HMONITOR)0) { return D3DADAPTER_DEFAULT; } return GetAdapterOrdinalByHmon((HMONITOR)mHnd); } // static -HRESULT D3DPipelineManager::HandleAdaptersChange(HMONITOR *pMHNDs, UINT monNum) +HRESULT D3DPipelineManager::HandleAdaptersChange(HMONITOR *pHMONITORs, UINT monNum) { HRESULT res = S_OK; BOOL bResetD3D = FALSE, bFound; D3DPipelineManager *pMgr = D3DPipelineManager::GetInstance(); - RETURN_STATUS_IF_NULL(pMHNDs, E_FAIL); + RETURN_STATUS_IF_NULL(pHMONITORs, E_FAIL); if (pMgr == NULL) { // NULL pMgr is valid when the pipeline is not enabled or if it hasn't // been created yet @@ -234,7 +234,7 @@ HRESULT D3DPipelineManager::HandleAdaptersChange(HMONITOR *pMHNDs, UINT monNum) } bFound = FALSE; for (UINT mon = 0; mon < monNum; mon++) { - if (pMHNDs[mon] == hMon) { + if (pHMONITORs[mon] == hMon) { J2dTraceLn3(J2D_TRACE_VERBOSE, " adapter %d: found hmnd[%d]=0x%x", i, mon, hMon); bFound = TRUE; @@ -364,8 +364,8 @@ D3DPipelineManager::CheckOSVersion() HRESULT D3DPipelineManager::GDICheckForBadHardware() { - _DISPLAY_DEVICE dd; - dd.dwSize = sizeof(DISPLAY_DEVICE); + DISPLAY_DEVICE dd; + dd.cb = sizeof(DISPLAY_DEVICE); int failedDevices = 0; int attachedDevices = 0; @@ -379,9 +379,9 @@ D3DPipelineManager::GDICheckForBadHardware() // i<20 is to guard against buggy drivers while (EnumDisplayDevices(NULL, i, &dd, 0) && i < 20) { - if (dd.dwFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) { + if (dd.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) { attachedDevices++; - id = dd.deviceID; + id = dd.DeviceID; if (wcslen(id) > 21) { // get vendor ID wcsncpy(vendorId, id+8, 4); @@ -796,7 +796,7 @@ HWND D3DPipelineManager::CreateDefaultFocusWindow() ZeroMemory(&mi, sizeof(MONITORINFO)); mi.cbSize = sizeof(MONITORINFO); HMONITOR hMon = pd3d9->GetAdapterMonitor(adapterOrdinal); - if (hMon == 0 || !GetMonitorInfo(hMon, (PMONITOR_INFO)&mi)) { + if (hMon == 0 || !GetMonitorInfo(hMon, (LPMONITORINFO)&mi)) { J2dRlsTraceLn1(J2D_TRACE_ERROR, "D3DPPLM::CreateDefaultFocusWindow: "\ "error getting monitor info for adapter=%d", adapterOrdinal); diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DRenderQueue.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DRenderQueue.cpp index e33f1c4e1db..d9222ff8ba3 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DRenderQueue.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DRenderQueue.cpp @@ -23,8 +23,8 @@ * have any questions. */ +#include "D3DPipeline.h" #include -#include #include "sun_java2d_pipe_BufferedOpCodes.h" #include "jlong.h" diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DRenderer.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DRenderer.cpp index 8da2398ebcf..f9351da4c4e 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DRenderer.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DRenderer.cpp @@ -23,6 +23,8 @@ * have any questions. */ +#include "D3DPipeline.h" + #include "sun_java2d_d3d_D3DRenderer.h" #include "D3DContext.h" diff --git a/jdk/src/windows/native/sun/java2d/d3d/D3DSurfaceData.cpp b/jdk/src/windows/native/sun/java2d/d3d/D3DSurfaceData.cpp index 0cadb3bd677..9c865dc971b 100644 --- a/jdk/src/windows/native/sun/java2d/d3d/D3DSurfaceData.cpp +++ b/jdk/src/windows/native/sun/java2d/d3d/D3DSurfaceData.cpp @@ -23,8 +23,7 @@ * have any questions. */ -#include -#include +#include "D3DPipeline.h" #include #include "D3DSurfaceData.h" #include "D3DPipelineManager.h" diff --git a/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp b/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp index 06d3c5f3fb5..736f39b5860 100644 --- a/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp +++ b/jdk/src/windows/native/sun/java2d/windows/GDIBlitLoops.cpp @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include #include "gdefs.h" #include "Trace.h" diff --git a/jdk/src/windows/native/sun/java2d/windows/GDIRenderer.cpp b/jdk/src/windows/native/sun/java2d/windows/GDIRenderer.cpp index 5a06df00bcc..b2dc4a0e7af 100644 --- a/jdk/src/windows/native/sun/java2d/windows/GDIRenderer.cpp +++ b/jdk/src/windows/native/sun/java2d/windows/GDIRenderer.cpp @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include "sun_java2d_windows_GDIRenderer.h" #include "java_awt_geom_PathIterator.h" @@ -31,11 +32,8 @@ #include "awt_Pen.h" #include "awt_Brush.h" -#include "jni.h" - #include "GraphicsPrimitiveMgr.h" -#include #include /* for cos(), sin(), etc */ #define MAX_CLAMP_BND (1<<26) diff --git a/jdk/src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp b/jdk/src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp index b7032df7b3c..9acabfc66e9 100644 --- a/jdk/src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp +++ b/jdk/src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.cpp @@ -246,7 +246,7 @@ static BOOL GDIWinSD_CheckMonitorArea(GDIWinSDOps *wsdo, } if( numScreens > 1 ) { - MONITOR_INFO *miInfo; + LPMONITORINFO miInfo; RECT rSect ={0,0,0,0}; RECT rView ={bounds->x1, bounds->y1, bounds->x2, bounds->y2}; retCode = FALSE; @@ -258,7 +258,7 @@ static BOOL GDIWinSD_CheckMonitorArea(GDIWinSDOps *wsdo, ::OffsetRect(&rView, (ptOrig.x), (ptOrig.y)); - ::IntersectRect(&rSect,&rView,&(miInfo->rMonitor)); + ::IntersectRect(&rSect,&rView,&(miInfo->rcMonitor)); if( FALSE == ::IsRectEmpty(&rSect) ) { if( TRUE == ::EqualRect(&rSect,&rView) ) { diff --git a/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp b/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp index b7040b8d803..01c0f6d8fc4 100644 --- a/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp +++ b/jdk/src/windows/native/sun/java2d/windows/WindowsFlags.cpp @@ -23,8 +23,6 @@ * have any questions. */ - -#include #include #include "Trace.h" #include "WindowsFlags.h" diff --git a/jdk/src/windows/native/sun/windows/ComCtl32Util.cpp b/jdk/src/windows/native/sun/windows/ComCtl32Util.cpp index d00ef6e95e8..ac69cf3af60 100644 --- a/jdk/src/windows/native/sun/windows/ComCtl32Util.cpp +++ b/jdk/src/windows/native/sun/windows/ComCtl32Util.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,54 +23,26 @@ * have any questions. */ +#include "awt.h" #include "ComCtl32Util.h" ComCtl32Util::ComCtl32Util() { - hModComCtl32 = NULL; - m_bNewSubclassing = FALSE; - - m_lpfnSetWindowSubclass = NULL; - m_lpfnRemoveWindowSubclass = NULL; - m_lpfnDefSubclassProc = NULL; } ComCtl32Util::~ComCtl32Util() { - DASSERT(hModComCtl32 == NULL); } void ComCtl32Util::InitLibraries() { - if (hModComCtl32 == NULL) { - hModComCtl32 = ::LoadLibrary(TEXT("comctl32.dll")); - if (hModComCtl32 != NULL) { - m_lpfnSetWindowSubclass = (PFNSETWINDOWSUBCLASS)::GetProcAddress(hModComCtl32, "SetWindowSubclass"); - m_lpfnRemoveWindowSubclass = (PFNREMOVEWINDOWSUBCLASS)::GetProcAddress(hModComCtl32, "RemoveWindowSubclass"); - m_lpfnDefSubclassProc = (PFNDEFSUBCLASSPROC)::GetProcAddress(hModComCtl32, "DefSubclassProc"); - - m_bNewSubclassing = (m_lpfnSetWindowSubclass != NULL) && - (m_lpfnRemoveWindowSubclass != NULL) && - (m_lpfnDefSubclassProc != NULL); - - fn_InitCommonControlsEx = (ComCtl32Util::InitCommonControlsExType)::GetProcAddress(hModComCtl32, "InitCommonControlsEx"); - InitCommonControls(); - } - } -} - -void ComCtl32Util::FreeLibraries() { - if (hModComCtl32 != NULL) { - m_lpfnSetWindowSubclass = NULL; - m_lpfnRemoveWindowSubclass = NULL; - m_lpfnDefSubclassProc = NULL; - ::FreeLibrary(hModComCtl32); - hModComCtl32 = NULL; - } + INITCOMMONCONTROLSEX iccex; + memset(&iccex, 0, sizeof(INITCOMMONCONTROLSEX)); + iccex.dwSize = sizeof(INITCOMMONCONTROLSEX); + ::InitCommonControlsEx(&iccex); } WNDPROC ComCtl32Util::SubclassHWND(HWND hwnd, WNDPROC _WindowProc) { - if (m_bNewSubclassing) { - DASSERT(hModComCtl32 != NULL); + if (IS_WINXP) { const SUBCLASSPROC p = SharedWindowProc; // let compiler check type of SharedWindowProc - m_lpfnSetWindowSubclass(hwnd, p, (UINT_PTR)_WindowProc, NULL); // _WindowProc is used as subclass ID + ::SetWindowSubclass(hwnd, p, (UINT_PTR)_WindowProc, NULL); // _WindowProc is used as subclass ID return NULL; } else { return (WNDPROC)::SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)_WindowProc); @@ -78,21 +50,17 @@ WNDPROC ComCtl32Util::SubclassHWND(HWND hwnd, WNDPROC _WindowProc) { } void ComCtl32Util::UnsubclassHWND(HWND hwnd, WNDPROC _WindowProc, WNDPROC _DefWindowProc) { - if (m_bNewSubclassing) { - DASSERT(hModComCtl32 != NULL); - DASSERT(_DefWindowProc == NULL); + if (IS_WINXP) { const SUBCLASSPROC p = SharedWindowProc; // let compiler check type of SharedWindowProc - m_lpfnRemoveWindowSubclass(hwnd, p, (UINT_PTR)_WindowProc); // _WindowProc is used as subclass ID + ::RemoveWindowSubclass(hwnd, p, (UINT_PTR)_WindowProc); // _WindowProc is used as subclass ID } else { ::SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)_DefWindowProc); } } LRESULT ComCtl32Util::DefWindowProc(WNDPROC _DefWindowProc, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - if (m_bNewSubclassing) { - DASSERT(hModComCtl32 != NULL); - DASSERT(_DefWindowProc == NULL); - return m_lpfnDefSubclassProc(hwnd, msg, wParam, lParam); + if (IS_WINXP) { + return ::DefSubclassProc(hwnd, msg, wParam, lParam); } else if (_DefWindowProc != NULL) { return ::CallWindowProc(_DefWindowProc, hwnd, msg, wParam, lParam); } else { @@ -111,15 +79,3 @@ LRESULT ComCtl32Util::SharedWindowProc(HWND hwnd, UINT msg, CATCH_BAD_ALLOC_RET(0); } - -void ComCtl32Util::InitCommonControls() -{ - if (fn_InitCommonControlsEx == NULL) { - return; - } - - INITCOMMONCONTROLSEX iccex; - memset(&iccex, 0, sizeof(INITCOMMONCONTROLSEX)); - iccex.dwSize = sizeof(INITCOMMONCONTROLSEX); - fn_InitCommonControlsEx(&iccex); -} diff --git a/jdk/src/windows/native/sun/windows/ComCtl32Util.h b/jdk/src/windows/native/sun/windows/ComCtl32Util.h index e410f30760e..e137b43d0df 100644 --- a/jdk/src/windows/native/sun/windows/ComCtl32Util.h +++ b/jdk/src/windows/native/sun/windows/ComCtl32Util.h @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,20 +30,6 @@ #ifndef _COMCTL32UTIL_H #define _COMCTL32UTIL_H - -/* - * comctl32.dll version 6 subclassing - taken from PlatformSDK/Include/commctrl.h - */ -typedef LRESULT (CALLBACK *SUBCLASSPROC)(HWND hWnd, UINT uMsg, WPARAM wParam, \ - LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData); - -typedef BOOL (WINAPI *PFNSETWINDOWSUBCLASS)(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIdSubclass, \ - DWORD_PTR dwRefData); -typedef BOOL (WINAPI *PFNREMOVEWINDOWSUBCLASS)(HWND hWnd, SUBCLASSPROC pfnSubclass, \ - UINT_PTR uIdSubclass); - -typedef LRESULT (WINAPI *PFNDEFSUBCLASSPROC)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - class ComCtl32Util { public: @@ -52,21 +38,8 @@ class ComCtl32Util return theInstance; } - // loads comctl32.dll and checks if required routines are available - // called from AwtToolkit::AwtToolkit() void InitLibraries(); - // unloads comctl32.dll - // called from AwtToolkit::Dispose() - void FreeLibraries(); - //-- comctl32.dll version 6 subclassing API --// - - INLINE BOOL IsNewSubclassing() { - return m_bNewSubclassing; - } - - // if comctl32.dll version 6 is used returns NULL, otherwise - // returns default window proc WNDPROC SubclassHWND(HWND hwnd, WNDPROC _WindowProc); // DefWindowProc is the same as returned from SubclassHWND void UnsubclassHWND(HWND hwnd, WNDPROC _WindowProc, WNDPROC _DefWindowProc); @@ -77,19 +50,6 @@ class ComCtl32Util ComCtl32Util(); ~ComCtl32Util(); - HMODULE hModComCtl32; - - PFNSETWINDOWSUBCLASS m_lpfnSetWindowSubclass; - PFNREMOVEWINDOWSUBCLASS m_lpfnRemoveWindowSubclass; - PFNDEFSUBCLASSPROC m_lpfnDefSubclassProc; - - typedef BOOL (WINAPI * InitCommonControlsExType)(const LPINITCOMMONCONTROLSEX lpInitCtrls); - InitCommonControlsExType fn_InitCommonControlsEx; - - void InitCommonControls(); - - BOOL m_bNewSubclassing; - // comctl32.dll version 6 window proc static LRESULT CALLBACK SharedWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, diff --git a/jdk/src/windows/native/sun/windows/Devices.cpp b/jdk/src/windows/native/sun/windows/Devices.cpp index 8bcee15b877..79b36b3f1a8 100644 --- a/jdk/src/windows/native/sun/windows/Devices.cpp +++ b/jdk/src/windows/native/sun/windows/Devices.cpp @@ -83,9 +83,83 @@ #include "Devices.h" #include "Trace.h" -#include "awt_Multimon.h" #include "D3DPipelineManager.h" + +/* Some helper functions (from awt_MMStub.h/cpp) */ + +int g_nMonitorCounter; +int g_nMonitorLimit; +HMONITOR* g_hmpMonitors; + +// Callback for CountMonitors below +BOOL WINAPI clb_fCountMonitors(HMONITOR hMon, HDC hDC, LPRECT rRect, LPARAM lP) +{ + g_nMonitorCounter ++; + return TRUE; +} + +int WINAPI CountMonitors(void) +{ + g_nMonitorCounter = 0; + ::EnumDisplayMonitors(NULL, NULL, clb_fCountMonitors, 0L); + return g_nMonitorCounter; + +} + +// Callback for CollectMonitors below +BOOL WINAPI clb_fCollectMonitors(HMONITOR hMon, HDC hDC, LPRECT rRect, LPARAM lP) +{ + + if ((g_nMonitorCounter < g_nMonitorLimit) && (NULL != g_hmpMonitors)) { + g_hmpMonitors[g_nMonitorCounter] = hMon; + g_nMonitorCounter ++; + } + + return TRUE; +} + +int WINAPI CollectMonitors(HMONITOR* hmpMonitors, int nNum) +{ + int retCode = 0; + + if (NULL != hmpMonitors) { + + g_nMonitorCounter = 0; + g_nMonitorLimit = nNum; + g_hmpMonitors = hmpMonitors; + + ::EnumDisplayMonitors(NULL, NULL, clb_fCollectMonitors, 0L); + + retCode = g_nMonitorCounter; + + g_nMonitorCounter = 0; + g_nMonitorLimit = 0; + g_hmpMonitors = NULL; + + } + return retCode; +} + +BOOL WINAPI MonitorBounds(HMONITOR hmMonitor, RECT* rpBounds) +{ + BOOL retCode = FALSE; + + if ((NULL != hmMonitor) && (NULL != rpBounds)) { + MONITORINFOEX miInfo; + + memset((void*)(&miInfo), 0, sizeof(MONITORINFOEX)); + miInfo.cbSize = sizeof(MONITORINFOEX); + + if (TRUE == (retCode = ::GetMonitorInfo(hmMonitor, &miInfo))) { + (*rpBounds) = miInfo.rcMonitor; + } + } + return retCode; +} + +/* End of helper functions */ + Devices* Devices::theInstance = NULL; CriticalSection Devices::arrayLock; @@ -113,9 +187,9 @@ BOOL Devices::UpdateInstance(JNIEnv *env) { J2dTraceLn(J2D_TRACE_INFO, "Devices::UpdateInstance"); - int numScreens = ::CountMonitors(); - MHND *monHds = (MHND *)safe_Malloc(numScreens * sizeof(MHND)); - if (numScreens != ::CollectMonitors(monHds, numScreens)) { + int numScreens = CountMonitors(); + HMONITOR *monHds = (HMONITOR *)safe_Malloc(numScreens * sizeof(HMONITOR)); + if (numScreens != CollectMonitors(monHds, numScreens)) { J2dRlsTraceLn(J2D_TRACE_ERROR, "Devices::UpdateInstance: Failed to get all "\ "monitor handles."); diff --git a/jdk/src/windows/native/sun/windows/Devices.h b/jdk/src/windows/native/sun/windows/Devices.h index 949bfdb2d26..34e359aa446 100644 --- a/jdk/src/windows/native/sun/windows/Devices.h +++ b/jdk/src/windows/native/sun/windows/Devices.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,4 +70,8 @@ static CriticalSection arrayLock; }; +// Some helper functions (from awt_MMStub.h/cpp) + +BOOL WINAPI MonitorBounds (HMONITOR, RECT*); + #endif _DEVICES_H_ diff --git a/jdk/src/windows/native/sun/windows/GDIHashtable.cpp b/jdk/src/windows/native/sun/windows/GDIHashtable.cpp index a3bc8ebe7b6..25c0dac4507 100644 --- a/jdk/src/windows/native/sun/windows/GDIHashtable.cpp +++ b/jdk/src/windows/native/sun/windows/GDIHashtable.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ #include "GDIHashtable.h" #include "awt_GDIObject.h" -#include "awt_dlls.h" GDIHashtable::BatchDestructionManager GDIHashtable::manager; @@ -46,7 +45,6 @@ void GDIHashtable::release(void* key) { DASSERT(value != NULL); m_deleteProc(value); } - manager.update(); } void GDIHashtable::flush() { @@ -128,9 +126,6 @@ void GDIHashtable::List::clear() { } } -#undef GFSR_GDIRESOURCES -#define GFSR_GDIRESOURCES 0x0001 - GDIHashtable::BatchDestructionManager::BatchDestructionManager(UINT nFirstThreshold, UINT nSecondThreshold, UINT nDestroyPeriod) : @@ -138,48 +133,6 @@ GDIHashtable::BatchDestructionManager::BatchDestructionManager(UINT nFirstThresh m_nSecondThreshold(nSecondThreshold), m_nDestroyPeriod(nDestroyPeriod), m_nCounter(0), - m_bBatchingEnabled(TRUE) { - load_rsrc32_procs(); -} - -void GDIHashtable::BatchDestructionManager::update() { - - if (get_free_system_resources != NULL) { - - CriticalSection::Lock l(m_managerLock); - - if (m_nCounter < 0) { - UINT nFreeResources = (*get_free_system_resources)(GFSR_GDIRESOURCES); - /* - * If m_bBatchingEnabled is FALSE there is no need - * to flush since we have been destroying all - * GDI resources as soon as they were released. - */ - if (m_bBatchingEnabled) { - if (nFreeResources < m_nFirstThreshold) { - flushAll(); - nFreeResources = (*get_free_system_resources)(GFSR_GDIRESOURCES); - } - } - if (nFreeResources < m_nSecondThreshold) { - m_bBatchingEnabled = FALSE; - m_nCounter = m_nDestroyPeriod; - } else { - m_bBatchingEnabled = TRUE; - /* - * The frequency of checks must depend on the currect amount - * of free space in GDI heaps. Otherwise we can run into the - * Resource Meter warning dialog when GDI resources are low. - * This is a heuristic rule that provides this dependency. - * These numbers have been chosen because: - * Resource Meter posts a warning dialog when less than 10% - * of GDI resources are free. - * 5 pens/brushes take 1%. So 3 is the upper bound. - * When changing this rule you should check that performance - * isn't affected (with Caffeine Mark and JMark). - */ - m_nCounter = (nFreeResources - 10) * 3; - } - } - } + m_bBatchingEnabled(TRUE) +{ } diff --git a/jdk/src/windows/native/sun/windows/GDIHashtable.h b/jdk/src/windows/native/sun/windows/GDIHashtable.h index 406a59e230a..a324fd97e24 100644 --- a/jdk/src/windows/native/sun/windows/GDIHashtable.h +++ b/jdk/src/windows/native/sun/windows/GDIHashtable.h @@ -1,5 +1,5 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -151,12 +151,6 @@ class GDIHashtable : public Hashtable { */ INLINE void decrementCounter() { m_nCounter--; } - /** - * Depending on the amount of free space in GDI heaps flushes - * all GDIHashtables and sets the initial counter value. - */ - void update(); - INLINE CriticalSection& getLock() { return m_managerLock; } }; diff --git a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp index 7ed24aadb8a..3baf5bcf9b9 100644 --- a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp +++ b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,17 +31,27 @@ // This file should stand independent of AWT and should ultimately be // put into its own DLL. #include -#endif +#else +// Include jni_util.h first, so JNU_* macros can be redefined +#include "jni_util.h" +// Borrow some macros from awt.h +#define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast(x), static_cast(_tcslen(x))) +#define JNU_GetStringPlatformChars(env, x, y) reinterpret_cast(env->GetStringChars(x, y)) +#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast(y)) +#endif // DEBUG #include #include #include -#include "jni_util.h" #include "jlong.h" #include "alloc.h" #include "stdhdrs.h" -#include "UnicowsLoader.h" + +// Copy from shlguid.h which is no longer in PlatformSDK +#ifndef DEFINE_SHLGUID +#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_GUID(name, l, w1, w2, 0xC0, 0, 0, 0, 0, 0, 0, 0x46) +#endif // {93F2F68C-1D1B-11d3-A30E-00C04F79ABD1} DEFINE_GUID(IID_IShellFolder2, 0x93f2f68c, 0x1d1b, 0x11d3, 0xa3, 0xe, 0x0, 0xc0, 0x4f, 0x79, 0xab, 0xd1); @@ -86,13 +96,15 @@ static jfieldID FID_folderType; static IMalloc* pMalloc; static IShellFolder* pDesktop; -static BOOL isXP; - -// copied from awt.h, because it is not included in release -#if defined (WIN32) - #define IS_WINVISTA (!(::GetVersion() & 0x80000000) && LOBYTE(LOWORD(::GetVersion())) >= 6) -#else - #define IS_WINVISTA FALSE +// Some macros from awt.h, because it is not included in release +#ifndef IS_WIN2000 +#define IS_WIN2000 (LOBYTE(LOWORD(::GetVersion())) >= 5) +#endif +#ifndef IS_WINXP +#define IS_WINXP ((IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5) +#endif +#ifndef IS_WINVISTA +#define IS_WINVISTA (!(::GetVersion() & 0x80000000) && LOBYTE(LOWORD(::GetVersion())) >= 6) #endif @@ -103,7 +115,6 @@ static BOOL initShellProcs() static HMODULE libShell32 = NULL; static HMODULE libUser32 = NULL; static HMODULE libComCtl32 = NULL; - static HMODULE libUnicows = UnicowsLoader::GetModuleHandle(); // If already initialized, return TRUE if (libShell32 != NULL && libUser32 != NULL) { return TRUE; @@ -130,7 +141,7 @@ static BOOL initShellProcs() // Set up procs - libShell32 fn_FindExecutable = (FindExecutableType)GetProcAddress( - (libUnicows ? libUnicows : libShell32), "FindExecutableW"); + libShell32, "FindExecutableW"); if (fn_FindExecutable == NULL) { return FALSE; } @@ -140,7 +151,7 @@ static BOOL initShellProcs() return FALSE; } fn_SHGetFileInfo = (SHGetFileInfoType)GetProcAddress( - (libUnicows ? libUnicows : libShell32), "SHGetFileInfoW"); + libShell32, "SHGetFileInfoW"); if (fn_SHGetFileInfo == NULL) { return FALSE; } @@ -154,7 +165,7 @@ static BOOL initShellProcs() return FALSE; } fn_SHGetPathFromIDList = (SHGetPathFromIDListType)GetProcAddress( - (libUnicows ? libUnicows : libShell32), "SHGetPathFromIDListW"); + libShell32, "SHGetPathFromIDListW"); if (fn_SHGetPathFromIDList == NULL) { return FALSE; } @@ -181,19 +192,19 @@ static BOOL initShellProcs() static jstring jstringFromSTRRET(JNIEnv* env, LPITEMIDLIST pidl, STRRET* pStrret) { switch (pStrret->uType) { case STRRET_CSTR : - return JNU_NewStringPlatform(env, pStrret->cStr); + return JNU_NewStringPlatform(env, reinterpret_cast(pStrret->cStr)); case STRRET_OFFSET : // Note : this may need to be WCHAR instead return JNU_NewStringPlatform(env, (CHAR*)pidl + pStrret->uOffset); case STRRET_WSTR : - return env->NewString(pStrret->pOleStr, + return env->NewString(reinterpret_cast(pStrret->pOleStr), static_cast(wcslen(pStrret->pOleStr))); } return NULL; } // restoring the original definition -#define JNU_NewStringPlatform(env, x) env->NewString(x, static_cast(_tcslen(x))) +#define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast(x), static_cast(_tcslen(x))) /* * Class: sun_awt_shell_Win32ShellFolder2 @@ -212,13 +223,6 @@ JNIEXPORT void JNICALL Java_sun_awt_shell_Win32ShellFolder2_initIDs MID_relativePIDL = env->GetMethodID(cls, "setRelativePIDL", "(J)V"); FID_displayName = env->GetFieldID(cls, "displayName", "Ljava/lang/String;"); FID_folderType = env->GetFieldID(cls, "folderType", "Ljava/lang/String;"); - - // Find out if we are on XP or later - long version = GetVersion(); - isXP = (!(version & 0x80000000) && - (LOBYTE(LOWORD(version)) == 5 && - HIBYTE(LOWORD(version)) >= 1) || - LOBYTE(LOWORD(version)) > 5); } static IShellIcon* getIShellIcon(IShellFolder* pIShellFolder) { @@ -669,46 +673,24 @@ JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation if (!CoInit(doCoUninit)) { return 0; } - if (IS_NT) { - IShellLinkW* psl; - hres = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, (LPVOID *)&psl); + IShellLinkW* psl; + hres = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, (LPVOID *)&psl); + if (SUCCEEDED(hres)) { + IPersistFile* ppf; + hres = psl->QueryInterface(IID_IPersistFile, (void**)&ppf); if (SUCCEEDED(hres)) { - IPersistFile* ppf; - hres = psl->QueryInterface(IID_IPersistFile, (void**)&ppf); + hres = ppf->Load(wstr, STGM_READ); if (SUCCEEDED(hres)) { - hres = ppf->Load(wstr, STGM_READ); - if (SUCCEEDED(hres)) { - if (resolve) { - hres = psl->Resolve(NULL, 0); - // Ignore failure - } - pidl = (LPITEMIDLIST)NULL; - hres = psl->GetIDList(&pidl); + if (resolve) { + hres = psl->Resolve(NULL, 0); + // Ignore failure } - ppf->Release(); + pidl = (LPITEMIDLIST)NULL; + hres = psl->GetIDList(&pidl); } - psl->Release(); - } - } else { - IShellLinkA* psl; - hres = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkA, (LPVOID *)&psl); - if (SUCCEEDED(hres)) { - IPersistFile* ppf; - hres = psl->QueryInterface(IID_IPersistFile, (void**)&ppf); - if (SUCCEEDED(hres)) { - hres = ppf->Load(wstr, STGM_READ); - if (SUCCEEDED(hres)) { - if (resolve) { - hres = psl->Resolve(NULL, 0); - // Ignore failure - } - pidl = (LPITEMIDLIST)NULL; - hres = psl->GetIDList(&pidl); - } - ppf->Release(); - } - psl->Release(); + ppf->Release(); } + psl->Release(); } if (doCoUninit) { ::CoUninitialize(); @@ -742,10 +724,10 @@ JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_parseDisplayName0 int nLength = env->GetStringLength(jname); jchar* wszPath = new jchar[nLength + 1]; const jchar* strPath = env->GetStringChars(jname, NULL); - wcsncpy(wszPath, strPath, nLength); + wcsncpy(reinterpret_cast(wszPath), reinterpret_cast(strPath), nLength); wszPath[nLength] = 0; HRESULT res = pIShellFolder->ParseDisplayName(NULL, NULL, - const_cast(wszPath), NULL, &pIDL, NULL); + reinterpret_cast(wszPath), NULL, &pIDL, NULL); if (res != S_OK) { JNU_ThrowIOException(env, "Could not parse name"); pIDL = 0; @@ -804,7 +786,7 @@ JNIEXPORT jstring JNICALL Java_sun_awt_shell_Win32ShellFolder2_getExecutableType (JNIEnv* env, jobject folder, jstring path) { TCHAR szBuf[MAX_PATH]; - LPCTSTR szPath = (LPCTSTR)JNU_GetStringPlatformChars(env, path, NULL); + LPCTSTR szPath = JNU_GetStringPlatformChars(env, path, NULL); if (szPath == NULL) { return NULL; } @@ -827,7 +809,7 @@ JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIcon { HICON hIcon = NULL; SHFILEINFO fileInfo; - LPCTSTR pathStr = (LPCTSTR)JNU_GetStringPlatformChars(env, absolutePath, NULL); + LPCTSTR pathStr = JNU_GetStringPlatformChars(env, absolutePath, NULL); if (fn_SHGetFileInfo(pathStr, 0L, &fileInfo, sizeof(fileInfo), SHGFI_ICON | (getLargeIcon ? 0 : SHGFI_SMALLICON)) != 0) { hIcon = fileInfo.hIcon; @@ -890,52 +872,27 @@ JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_extractIcon } HRESULT hres; - if (IS_NT) { - IExtractIconW* pIcon; - hres = pIShellFolder->GetUIObjectOf(NULL, 1, const_cast(&pidl), + IExtractIconW* pIcon; + hres = pIShellFolder->GetUIObjectOf(NULL, 1, const_cast(&pidl), IID_IExtractIconW, NULL, (void**)&pIcon); + if (SUCCEEDED(hres)) { + WCHAR szBuf[MAX_PATH]; + INT index; + UINT flags; + hres = pIcon->GetIconLocation(GIL_FORSHELL, szBuf, MAX_PATH, &index, &flags); if (SUCCEEDED(hres)) { - WCHAR szBuf[MAX_PATH]; - INT index; - UINT flags; - hres = pIcon->GetIconLocation(GIL_FORSHELL, szBuf, MAX_PATH, &index, &flags); + HICON hIconLarge; + hres = pIcon->Extract(szBuf, index, &hIconLarge, &hIcon, (16 << 16) + 32); if (SUCCEEDED(hres)) { - HICON hIconLarge; - hres = pIcon->Extract(szBuf, index, &hIconLarge, &hIcon, (16 << 16) + 32); - if (SUCCEEDED(hres)) { - if (getLargeIcon) { - fn_DestroyIcon((HICON)hIcon); - hIcon = hIconLarge; - } else { - fn_DestroyIcon((HICON)hIconLarge); - } + if (getLargeIcon) { + fn_DestroyIcon((HICON)hIcon); + hIcon = hIconLarge; + } else { + fn_DestroyIcon((HICON)hIconLarge); } } - pIcon->Release(); - } - } else { - IExtractIconA* pIcon; - hres = pIShellFolder->GetUIObjectOf(NULL, 1, const_cast(&pidl), - IID_IExtractIconA, NULL, (void**)&pIcon); - if (SUCCEEDED(hres)) { - CHAR szBuf[MAX_PATH]; - INT index; - UINT flags; - hres = pIcon->GetIconLocation(GIL_FORSHELL, szBuf, MAX_PATH, &index, &flags); - if (SUCCEEDED(hres)) { - HICON hIconLarge; - hres = pIcon->Extract(szBuf, index, &hIconLarge, &hIcon, (16 << 16) + 32); - if (SUCCEEDED(hres)) { - if (getLargeIcon) { - fn_DestroyIcon((HICON)hIcon); - hIcon = hIconLarge; - } else { - fn_DestroyIcon((HICON)hIconLarge); - } - } - } - pIcon->Release(); } + pIcon->Release(); } if (doCoUninit) { ::CoUninitialize(); @@ -987,7 +944,7 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits // XP supports alpha in some icons, and depending on device. // This should take precedence over the icon mask bits. BOOL hasAlpha = FALSE; - if (isXP) { + if (IS_WINXP) { for (int i = 0; i < nBits; i++) { if ((colorBits[i] & 0xff000000) != 0) { hasAlpha = TRUE; @@ -1127,9 +1084,9 @@ JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconResource (JNIEnv* env, jclass cls, jstring libName, jint iconID, jint cxDesired, jint cyDesired, jboolean useVGAColors) { - HINSTANCE libHandle = LoadLibrary(env->GetStringChars(libName, NULL)); + HINSTANCE libHandle = LoadLibrary(JNU_GetStringPlatformChars(env, libName, NULL)); if (libHandle != NULL) { - UINT fuLoad = (useVGAColors && !isXP) ? LR_VGACOLOR : 0; + UINT fuLoad = (useVGAColors && !IS_WINXP) ? LR_VGACOLOR : 0; return ptr_to_jlong(LoadImage(libHandle, MAKEINTRESOURCE(iconID), IMAGE_ICON, cxDesired, cyDesired, fuLoad)); diff --git a/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp b/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp deleted file mode 100644 index 7e147e209e6..00000000000 --- a/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#include -#include "alloc.h" -#include "UnicowsLoader.h" - -/* - * Support functions for the Microsoft Layer for Unicode (MSLU). - * - * The MSLU maps the wide char version of Windows APIs with strings - * to their ANSI version equivalent on Win98/ME platforms. - * - * For more details on the MSLU, please refer to the MSDN webpage at: - * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/microsoft_layer_for_unicode_on_windows_95_98_me_systems.asp - */ - -// The MSLU module handle. Only initialized on Win9x/ME. -HMODULE UnicowsLoader::hmodUnicows = NULL; - -// MSLU loader entry point, which is called when the module -// is initialized. -extern "C" HMODULE (__stdcall *_PfnLoadUnicows)(void) = - &UnicowsLoader::LoadUnicows; - -// Overriede APIs that are not supported by MSLU. -extern "C" FARPROC Unicows_GetPrinterW = - (FARPROC)&UnicowsLoader::GetPrinterWImpl; -extern "C" FARPROC Unicows_EnumPrintersW = - (FARPROC)&UnicowsLoader::EnumPrintersWImpl; - -HMODULE __stdcall UnicowsLoader::LoadUnicows(void) -{ - if (hmodUnicows != NULL) { - return hmodUnicows; - } - - // Unfortunately, some DLLs that are loaded in conjunction with - // unicows.dll may blow the FPU's control word. So save it here. - unsigned int fpu_cw = _CW_DEFAULT; - fpu_cw = _control87(0, 0); - - // Loads the DLL, assuming that the DLL resides in the same directory - // as the AWT(_G).DLL. We cannot use "sun.boot.library.path" system - // property since there is no way to issue JNI calls at this point - // (JNI_OnLoad is not yet called so it cannot obtain JavaVM structure) - // - // To obtain the AWT module handle, call GetModuleHandleA() directly, - // instead of AwtToolkit.GetModuleHandle(). Otherwise it could cause - // an infinite loop if some W call were made inside AwtToolkit class - // initialization. - HMODULE hmodAWT = GetModuleHandleA("awt"); - LPSTR abspath = (LPSTR)safe_Malloc(MAX_PATH); - if (abspath != NULL) { - GetModuleFileNameA(hmodAWT, abspath, MAX_PATH); - *strrchr(abspath, '\\') = '\0'; - strcat(abspath, "\\unicows.dll"); - hmodUnicows = LoadLibraryA(abspath); - free(abspath); - } - - // Restore the FPU control word if needed. - if ( _control87(0, 0) != fpu_cw) { - _control87(fpu_cw, 0xfffff); - } - - return hmodUnicows; -} - -HMODULE UnicowsLoader::GetModuleHandle(void) -{ - return hmodUnicows; -} - - -// Convenient functions to convert DEVMODEA -> DEVMODEW -void UnicowsLoader::DevModeA2DevModeW( - const DEVMODEA * dma, - DEVMODEW * dmw) -{ - // convert string portions - ::MultiByteToWideChar(CP_ACP, 0, (CHAR *)dma->dmDeviceName, CCHDEVICENAME, - dmw->dmDeviceName, CCHDEVICENAME); - ::MultiByteToWideChar(CP_ACP, 0, (CHAR *)dma->dmFormName, CCHDEVICENAME, - dmw->dmFormName, CCHDEVICENAME); - - // copy driver specific data if exists - if (dma->dmDriverExtra != 0) { - PBYTE pExtraA = (PBYTE)(dma + 1); - PBYTE pExtraW = (PBYTE)(dmw + 1); - memcpy(pExtraW, pExtraA, dma->dmDriverExtra); - } - - // copy normal struct members - dmw->dmSpecVersion = dma->dmSpecVersion; - dmw->dmDriverVersion = dma->dmDriverVersion; - dmw->dmSize = dma->dmSize; - dmw->dmDriverExtra = dma->dmDriverExtra; - dmw->dmFields = dma->dmFields; - dmw->dmPosition = dma->dmPosition; - dmw->dmScale = dma->dmScale; - dmw->dmCopies = dma->dmCopies; - dmw->dmDefaultSource = dma->dmDefaultSource; - dmw->dmPrintQuality = dma->dmPrintQuality; - dmw->dmColor = dma->dmColor; - dmw->dmDuplex = dma->dmDuplex; - dmw->dmYResolution = dma->dmYResolution; - dmw->dmTTOption = dma->dmTTOption; - dmw->dmCollate = dma->dmCollate; - dmw->dmLogPixels = dma->dmLogPixels; - dmw->dmBitsPerPel = dma->dmBitsPerPel; - dmw->dmPelsWidth = dma->dmPelsWidth; - dmw->dmPelsHeight = dma->dmPelsHeight; - dmw->dmDisplayFlags = dma->dmDisplayFlags; - dmw->dmDisplayFrequency = dma->dmDisplayFrequency; -#if(WINVER >= 0x0400) - dmw->dmICMMethod = dma->dmICMMethod; - dmw->dmICMIntent = dma->dmICMIntent; - dmw->dmMediaType = dma->dmMediaType; - dmw->dmDitherType = dma->dmDitherType; - dmw->dmReserved1 = dma->dmReserved1; - dmw->dmReserved2 = dma->dmReserved2; -#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400) - dmw->dmPanningWidth = dma->dmPanningWidth; - dmw->dmPanningHeight = dma->dmPanningHeight; -#endif -#endif /* WINVER >= 0x0400 */ -} - -// PRINTER_INFO_1 struct converter -void UnicowsLoader::PrinterInfo1A2W( - const LPPRINTER_INFO_1A pi1A, - LPPRINTER_INFO_1W pi1W, - const DWORD num) -{ - LPWSTR pwstrbuf = (LPWSTR)(pi1W + num); - DWORD current; - - // loop through all structures - for (current = 0; current < num; current ++) { - LPPRINTER_INFO_1A curPi1A = pi1A + current; - LPPRINTER_INFO_1W curPi1W = pi1W + current; - - // copy the structure itself - memcpy(curPi1W, curPi1A, sizeof(_PRINTER_INFO_1W)); - - // copy string members - StringA2W(curPi1A->pDescription, &(curPi1W->pDescription), &pwstrbuf); - StringA2W(curPi1A->pName, &(curPi1W->pName), &pwstrbuf); - StringA2W(curPi1A->pComment, &(curPi1W->pComment), &pwstrbuf); - } -} - -// PRINTER_INFO_2 struct converter -void UnicowsLoader::PrinterInfo2A2W( - const LPPRINTER_INFO_2A pi2A, - LPPRINTER_INFO_2W pi2W, - const DWORD num) -{ - PBYTE pbytebuf = (PBYTE)(pi2W + num); - DWORD current; - - // loop through all structures - for (current = 0; current < num; current ++) { - LPPRINTER_INFO_2A curPi2A = pi2A + current; - LPPRINTER_INFO_2W curPi2W = pi2W + current; - // copy the structure itself - memcpy(curPi2W, curPi2A, sizeof(_PRINTER_INFO_2W)); - - // copy string members - StringA2W(curPi2A->pServerName, &(curPi2W->pServerName), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pPrinterName, &(curPi2W->pPrinterName), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pShareName, &(curPi2W->pShareName), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pPortName, &(curPi2W->pPortName), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pDriverName, &(curPi2W->pDriverName), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pComment, &(curPi2W->pComment), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pLocation, &(curPi2W->pLocation), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pSepFile, &(curPi2W->pSepFile), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pPrintProcessor, &(curPi2W->pPrintProcessor), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pDatatype, &(curPi2W->pDatatype), (LPWSTR *)&pbytebuf); - StringA2W(curPi2A->pParameters, &(curPi2W->pParameters), (LPWSTR *)&pbytebuf); - - // copy DEVMODE structure - if (curPi2A->pDevMode != NULL) { - curPi2W->pDevMode = (LPDEVMODEW)pbytebuf; - DevModeA2DevModeW(curPi2A->pDevMode, curPi2W->pDevMode); - pbytebuf += sizeof(DEVMODEW) + curPi2A->pDevMode->dmDriverExtra; - } - } -} - -// PRINTER_INFO_5 struct converter -void UnicowsLoader::PrinterInfo5A2W( - const LPPRINTER_INFO_5A pi5A, - LPPRINTER_INFO_5W pi5W, - const DWORD num) -{ - LPWSTR pbuf = (LPWSTR)(pi5W + num); - DWORD current; - - // loop through all structures - for (current = 0; current < num; current ++) { - LPPRINTER_INFO_5A curPi5A = pi5A + current; - LPPRINTER_INFO_5W curPi5W = pi5W + current; - - // copy the structure itself - memcpy(curPi5W, curPi5A, sizeof(_PRINTER_INFO_5W)); - - // copy string members - StringA2W(curPi5A->pPrinterName, &(curPi5W->pPrinterName), &pbuf); - StringA2W(curPi5A->pPortName, &(curPi5W->pPortName), &pbuf); - } -} - -// PRINTER_INFO_* struct converter. Supported levels are 1, 2, and 5. -void UnicowsLoader::PrinterInfoA2W( - const PVOID piA, - PVOID piW, - const DWORD Level, - const DWORD num) -{ - switch (Level) { - case 1: - PrinterInfo1A2W((LPPRINTER_INFO_1A)piA, (LPPRINTER_INFO_1W)piW, num); - break; - - case 2: - PrinterInfo2A2W((LPPRINTER_INFO_2A)piA, (LPPRINTER_INFO_2W)piW, num); - break; - - case 5: - PrinterInfo5A2W((LPPRINTER_INFO_5A)piA, (LPPRINTER_INFO_5W)piW, num); - break; - } -} - -// converts string members in PRINTER_INFO_* struct. -void UnicowsLoader::StringA2W( - LPCSTR pSrcA, - LPWSTR * ppwstrDest, - LPWSTR * ppwstrbuf) -{ - if (pSrcA != NULL) { - DWORD cchWideChar = ::MultiByteToWideChar(CP_ACP, 0, pSrcA, -1, NULL, 0); - *ppwstrDest = *ppwstrbuf; - ::MultiByteToWideChar(CP_ACP, 0, pSrcA, -1, *ppwstrbuf, cchWideChar); - *ppwstrbuf += cchWideChar; - } else { - *ppwstrDest = NULL; - } -} - -// GetPrinterW implementation. Level 1, 2, and 5 are the only supported levels. -BOOL __stdcall UnicowsLoader::GetPrinterWImpl( - HANDLE hPrinter, - DWORD Level, - LPBYTE pPrinter, - DWORD cbBuf, - LPDWORD pcbNeeded) -{ - if ((Level != 1) && (Level != 2) && (Level != 5)) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; - } - - DWORD cbBufA = (cbBuf != 0 ? cbBuf / 2 : 0); // dirty estimation... - LPBYTE pPrinterA = NULL; - DWORD cbNeededA = 0; - BOOL ret; - - if (cbBufA != 0) { - pPrinterA = (LPBYTE)safe_Malloc(cbBufA); - memset(pPrinterA, 0, cbBufA); - } - - ret = ::GetPrinterA(hPrinter, Level, pPrinterA, cbBufA, &cbNeededA); - *pcbNeeded = cbNeededA * 2; // dirty estimation... - - if (pPrinterA != NULL) { - if (ret) { - PrinterInfoA2W(pPrinterA, pPrinter, Level, 1); - } - free(pPrinterA); - } - - return ret; -} - -// EnumPrintersW implementation. Level 1, 2, and 5 are the only supported levels. -BOOL __stdcall UnicowsLoader::EnumPrintersWImpl( - DWORD Flags, - LPWSTR Name, - DWORD Level, - LPBYTE pPrinterEnum, - DWORD cbBuf, - LPDWORD pcbNeeded, - LPDWORD pcReturned) -{ - if ((Level != 1) && (Level != 2) && (Level != 5)) { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; - } - - LPSTR pNameA = NULL; - DWORD cbBufA = (cbBuf != 0 ? cbBuf / 2 : 0); // dirty estimation... - LPBYTE pPrinterEnumA = NULL; - DWORD cbNeededA = 0; - BOOL ret; - - if (Name != NULL) { - DWORD len = static_cast(wcslen(Name)) + 1; - pNameA = (LPSTR)safe_Malloc(len); - ::WideCharToMultiByte(CP_ACP, 0, Name, -1, pNameA, len, NULL, NULL); - } - - if (cbBufA != 0) { - pPrinterEnumA = (LPBYTE)safe_Malloc(cbBufA); - memset(pPrinterEnumA, 0, cbBufA); - } - - ret = ::EnumPrintersA(Flags, pNameA, Level, pPrinterEnumA, - cbBufA, &cbNeededA, pcReturned); - *pcbNeeded = cbNeededA * 2; // dirty estimation... - - if (pPrinterEnumA != NULL) { - if (ret) { - PrinterInfoA2W(pPrinterEnumA, pPrinterEnum, Level, *pcReturned); - } - free(pPrinterEnumA); - } - - if (pNameA != NULL) { - free(pNameA); - } - - return ret; -} - -// wchar CRT implementations that VC6 does not support on Win9x. -// These implementations are used on both Win9x/ME *and* WinNT/2K/XP. -#undef _waccess -#undef _wchmod -#undef _wfullpath -#undef _wremove -#undef _wrename -#undef _wstat -#undef _wstati64 -#undef _wstat64 -#undef _wunlink -#undef _wfopen -#undef _wfreopen -#undef _wfsopen -#undef _wcreat -#undef _wopen -#undef _wsopen -#undef _wfindfirst -#undef _wfindfirst64 -#undef _wfindnext -#undef _wfindnext64 -#undef _wsystem -#undef _wexcel -#undef _wexcele -#undef _wexelp -#undef _wexelpe -#undef _wexecv -#undef _wexecve -#undef _wexecvp -#undef _wexecvpe -#undef _wpopen -#undef _wputenv -#undef _wspawnl -#undef _wspawnle -#undef _wspawnlp -#undef _wspawnlpe -#undef _wspawnv -#undef _wspawnve -#undef _wspawnvp -#undef _wspawnvpe - -// _wfullpath implementation -wchar_t * __cdecl UnicowsLoader::_wfullpathImpl( - wchar_t * absPath, - const wchar_t * relPath, - size_t maxLength) -{ - if (IS_NT) { - return _wfullpath(absPath, relPath, maxLength); - } else { - wchar_t * ret = NULL; - char * absPathA = (char *)safe_Malloc(maxLength); - char * relPathA = (char *)safe_Malloc(maxLength); - ::WideCharToMultiByte(CP_ACP, 0, relPath, -1, relPathA, - static_cast(maxLength), NULL, NULL); - - char * retA = _fullpath(absPathA, relPathA, maxLength); - - if (retA != NULL) { - ::MultiByteToWideChar(CP_ACP, 0, absPathA, -1, - absPath, static_cast(maxLength)); - ret = absPath; - } - - free(absPathA); - free(relPathA); - - return ret; - } -} diff --git a/jdk/src/windows/native/sun/windows/UnicowsLoader.h b/jdk/src/windows/native/sun/windows/UnicowsLoader.h deleted file mode 100644 index 50c48ca91a2..00000000000 --- a/jdk/src/windows/native/sun/windows/UnicowsLoader.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#ifndef UNICOWSLOADER_H -#define UNICOWSLOADER_H - -#if !defined(UNICODE) || !defined(_UNICODE) -#error UnicowsLoader module needs UNICODE and _UNICODE flags to be set on compiling -#endif - -#include - -// A class to load the Microsoft Layer for Unicode (unicows.dll) -class UnicowsLoader { -public: - // this is called when the client DLL (this case, AWT) is loaded - static HMODULE __stdcall LoadUnicows(void); - - // this is provided to pass the MSLU module handle - static HMODULE GetModuleHandle(void); - - // member functions that implements functions that MSLU does not support - static BOOL __stdcall GetPrinterWImpl(HANDLE, DWORD, LPBYTE, DWORD, LPDWORD); - static BOOL __stdcall EnumPrintersWImpl(DWORD, LPWSTR, DWORD, LPBYTE, - DWORD, LPDWORD, LPDWORD); - - // member functions that implements functions that VC6 CRT does not support - // on Win9x - static wchar_t * __cdecl _wfullpathImpl(wchar_t *, const wchar_t *, size_t); - -private: - // The module handle - static HMODULE hmodUnicows; - - // utility member functions - static void DevModeA2DevModeW(const DEVMODEA *, DEVMODEW *); - static void PrinterInfo1A2W(const LPPRINTER_INFO_1A, LPPRINTER_INFO_1W, const DWORD); - static void PrinterInfo2A2W(const LPPRINTER_INFO_2A, LPPRINTER_INFO_2W, const DWORD); - static void PrinterInfo5A2W(const LPPRINTER_INFO_5A, LPPRINTER_INFO_5W, const DWORD); - static void PrinterInfoA2W(const PVOID, PVOID, DWORD, DWORD); - static void StringA2W(LPCSTR, LPWSTR *, LPWSTR *); -}; - -#ifndef AWT_H -// copied from awt.h -#if defined (WIN32) - #define IS_WIN32 TRUE -#else - #define IS_WIN32 FALSE -#endif -#define IS_NT (IS_WIN32 && !(::GetVersion() & 0x80000000)) -#endif // AWT_H - -// Now the platform encoding is Unicode (UTF-16), re-define JNU_ functions -// to proper JNI functions. -#define JNU_NewStringPlatform(env, x) env->NewString(x, static_cast(_tcslen(x))) -#define JNU_GetStringPlatformChars(env, x, y) (LPWSTR)env->GetStringChars(x, y) -#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, y) - -// The following Windows W-APIs are not supported by the MSLU. -// You need to implement a stub to use these APIs. Or, if it is -// apparent that the API is used only on WindowsNT/2K/XP, wrap -// the call site with #undef - #define, e.g: -// -// #undef SomeFunctionW -// call SomeFunctionW -// #define SomeFunctionW NotSupportedByMSLU - -#define AcquireCredentialsHandleW NotSupportedByMSLU -#define CreateNamedPipeW NotSupportedByMSLU -#define CryptAcquireContextW NotSupportedByMSLU -#define CryptEnumProvidersW NotSupportedByMSLU -#define CryptEnumProviderTypesW NotSupportedByMSLU -#define CryptGetDefaultProviderW NotSupportedByMSLU -#define CryptSetProviderW NotSupportedByMSLU -#define CryptSetProviderExW NotSupportedByMSLU -#define CryptSignHashW NotSupportedByMSLU -#define CryptVerifySignatureW NotSupportedByMSLU -#define EnumerateSecurityPackagesW NotSupportedByMSLU -#define EnumMonitorsW NotSupportedByMSLU -#define EnumPortsW NotSupportedByMSLU -#define EnumPrinterDriversW NotSupportedByMSLU -//#define EnumPrintersW NotSupportedByMSLU -#define EnumPrintProcessorDatatypesW NotSupportedByMSLU -#define EnumPrintProcessorsW NotSupportedByMSLU -#define FreeContextBufferW NotSupportedByMSLU -#define GetCharABCWidthsFloatW NotSupportedByMSLU -#define GetJobW NotSupportedByMSLU -#define GetOpenFileNamePreviewW NotSupportedByMSLU -//#define GetPrinterW NotSupportedByMSLU -#define GetPrinterDataW NotSupportedByMSLU -#define GetPrinterDriverW NotSupportedByMSLU -#define GetSaveFileNamePreviewW NotSupportedByMSLU -#define InitializeSecurityContextW NotSupportedByMSLU -#define mciSendCommandW NotSupportedByMSLU -#define mixerGetControlDetailsW NotSupportedByMSLU -#define mixerGetLineControlsW NotSupportedByMSLU -#define mixerGetLineInfoW NotSupportedByMSLU -#define mmioInstallIOProcW NotSupportedByMSLU -#define OleUIChangeSourceW NotSupportedByMSLU -#define OleUIConvertW NotSupportedByMSLU -#define OleUIEditLinksW NotSupportedByMSLU -#define OleUIInsertObjectW NotSupportedByMSLU -#define OleUIObjectPropertiesW NotSupportedByMSLU -#define OleUIPasteSpecialW NotSupportedByMSLU -#define OleUIPromptUserW NotSupportedByMSLU -#define OleUIUpdateLinksW NotSupportedByMSLU -#define PolyTextOutW NotSupportedByMSLU -#define QueryContextAttributesW NotSupportedByMSLU -#define QueryCredentialsAttributesW NotSupportedByMSLU -#define QuerySecurityPackageInfoW NotSupportedByMSLU -#define RasDeleteSubEntryW NotSupportedByMSLU -#define RasSetSubEntryPropertiesW NotSupportedByMSLU -#define ResetPrinterW NotSupportedByMSLU - -// The following Shell COM interfaces are not supported by the MSLU. -// See ShellFolder2.cpp -#define IID_IFileViewerW NotSupportedByMSLU -#define IID_IShellLinkW NotSupportedByMSLU -#define IID_IExtractIconW NotSupportedByMSLU -#define IID_IShellCopyHookW NotSupportedByMSLU -#define IID_IShellExecuteHookW NotSupportedByMSLU -#define IID_INewShortcutHookW NotSupportedByMSLU - -// The following CRT functions should fail on compiling, as it does not work on -// Win9x/ME platform. If you need these CRTs, write a wrapper for ANSI version -// equivalents, in which it converts to/from Unicode using WideCharToMultiByte. -// -// Or, if it is apparent that the function is used only on WindowsNT/2K/XP, wrap -// the call site with #undef - #define, e.g: -// -// #undef _wsomefunc -// call _wsomefunc -// #define _wsomefunc NotSupportedOnWin9X - -#define _waccess NotSupportedOnWin9X -#define _wchmod NotSupportedOnWin9X -#define _wfullpath UnicowsLoader::_wfullpathImpl -#define _wremove NotSupportedOnWin9X -#define _wrename NotSupportedOnWin9X -#define _wstat NotSupportedOnWin9X -#define _wstati64 NotSupportedOnWin9X -#define _wstat64 NotSupportedOnWin9X -#define _wunlink NotSupportedOnWin9X -#define _wfopen NotSupportedOnWin9X -#define _wfreopen NotSupportedOnWin9X -#define _wfsopen NotSupportedOnWin9X -#define _wcreat NotSupportedOnWin9X -#define _wopen NotSupportedOnWin9X -#define _wsopen NotSupportedOnWin9X -#define _wfindfirst NotSupportedOnWin9X -#define _wfindfirst64 NotSupportedOnWin9X -#define _wfindnext NotSupportedOnWin9X -#define _wfindnext64 NotSupportedOnWin9X -#define _wsystem NotSupportedOnWin9X -#define _wexcel NotSupportedOnWin9X -#define _wexcele NotSupportedOnWin9X -#define _wexelp NotSupportedOnWin9X -#define _wexelpe NotSupportedOnWin9X -#define _wexecv NotSupportedOnWin9X -#define _wexecve NotSupportedOnWin9X -#define _wexecvp NotSupportedOnWin9X -#define _wexecvpe NotSupportedOnWin9X -#define _wpopen NotSupportedOnWin9X -#define _wputenv NotSupportedOnWin9X -#define _wspawnl NotSupportedOnWin9X -#define _wspawnle NotSupportedOnWin9X -#define _wspawnlp NotSupportedOnWin9X -#define _wspawnlpe NotSupportedOnWin9X -#define _wspawnv NotSupportedOnWin9X -#define _wspawnve NotSupportedOnWin9X -#define _wspawnvp NotSupportedOnWin9X -#define _wspawnvpe NotSupportedOnWin9X - - -#endif // UNICOWSLOADER_H diff --git a/jdk/src/windows/native/sun/windows/WPrinterJob.cpp b/jdk/src/windows/native/sun/windows/WPrinterJob.cpp index 33395e43a49..d64a8e314f2 100644 --- a/jdk/src/windows/native/sun/windows/WPrinterJob.cpp +++ b/jdk/src/windows/native/sun/windows/WPrinterJob.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,14 +23,14 @@ * have any questions. */ +#include "awt.h" + #include "stdhdrs.h" #include #include #include #include -#include "awt.h" -#include "awt_dlls.h" #include "awt_Toolkit.h" #include "awt_PrintControl.h" @@ -74,7 +74,6 @@ Java_sun_print_Win32PrintServiceLookup_getDefaultPrinterName(JNIEnv *env, TRY; TCHAR cBuffer[250]; - BOOL bFlag; OSVERSIONINFO osv; PRINTER_INFO_2 *ppi2 = NULL; DWORD dwNeeded = 0; @@ -86,39 +85,8 @@ Java_sun_print_Win32PrintServiceLookup_getDefaultPrinterName(JNIEnv *env, osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osv); - // If Windows 95 or 98, use EnumPrinters... - if (osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { - - // The first EnumPrinters() tells you how big our buffer should - // be in order to hold ALL of PRINTER_INFO_2. Note that this will - // usually return FALSE. This only means that the buffer (the 4th - // parameter) was not filled in. You don't want it filled in here... - - EnumPrinters(PRINTER_ENUM_DEFAULT, NULL, 2, - NULL, 0, &dwNeeded, &dwReturned); - if (dwNeeded == 0) { - return NULL; - } - - // Allocate enough space for PRINTER_INFO_2... - ppi2 = (PRINTER_INFO_2 *)GlobalAlloc(GPTR, dwNeeded); - if (!ppi2) { - return NULL; - } - - // The second EnumPrinters() will fill in all the current information. - bFlag = EnumPrinters(PRINTER_ENUM_DEFAULT, NULL, 2, - (LPBYTE)ppi2, dwNeeded, &dwNeeded, &dwReturned); - if (!bFlag) { - GlobalFree(ppi2); - return NULL; - } - - jPrinterName = JNU_NewStringPlatform(env, ppi2->pPrinterName); - GlobalFree(ppi2); - return jPrinterName; - - } else if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) { + // If Windows 2000, XP, Vista + if (osv.dwPlatformId == VER_PLATFORM_WIN32_NT) { // Retrieve the default string from Win.ini (the registry). // String will be in form "printername,drivername,portname". @@ -165,62 +133,32 @@ Java_sun_print_Win32PrintServiceLookup_getAllPrinterNames(JNIEnv *env, jobjectArray nameArray; try { - if (IS_NT) { - ::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, - NULL, 4, NULL, 0, &cbNeeded, &cReturned); - pPrinterEnum = new BYTE[cbNeeded]; - ::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, - NULL, 4, pPrinterEnum, cbNeeded, &cbNeeded, - &cReturned); + ::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, + NULL, 4, NULL, 0, &cbNeeded, &cReturned); + pPrinterEnum = new BYTE[cbNeeded]; + ::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, + NULL, 4, pPrinterEnum, cbNeeded, &cbNeeded, + &cReturned); - if (cReturned > 0) { - nameArray = env->NewObjectArray(cReturned, clazz, NULL); - if (nameArray == NULL) { - throw std::bad_alloc(); - } - } else { - nameArray = NULL; - } - - - for (DWORD i = 0; i < cReturned; i++) { - PRINTER_INFO_4 *info4 = (PRINTER_INFO_4 *) - (pPrinterEnum + i * sizeof(PRINTER_INFO_4)); - utf_str = JNU_NewStringPlatform(env, info4->pPrinterName); - if (utf_str == NULL) { - throw std::bad_alloc(); - } - env->SetObjectArrayElement(nameArray, i, utf_str); - env->DeleteLocalRef(utf_str); + if (cReturned > 0) { + nameArray = env->NewObjectArray(cReturned, clazz, NULL); + if (nameArray == NULL) { + throw std::bad_alloc(); } } else { - ::EnumPrinters(PRINTER_ENUM_LOCAL, - NULL, 5, NULL, 0, &cbNeeded, &cReturned); - pPrinterEnum = new BYTE[cbNeeded]; - ::EnumPrinters(PRINTER_ENUM_LOCAL, - NULL, 5, pPrinterEnum, cbNeeded, &cbNeeded, - &cReturned); + nameArray = NULL; + } - if (cReturned > 0) { - nameArray = env->NewObjectArray(cReturned, clazz, NULL); - if (nameArray == NULL) { - throw std::bad_alloc(); - } - } else { - nameArray = NULL; - } - - - for (DWORD i = 0; i < cReturned; i++) { - PRINTER_INFO_5 *info5 = (PRINTER_INFO_5 *) - (pPrinterEnum + i * sizeof(PRINTER_INFO_5)); - utf_str = JNU_NewStringPlatform(env, info5->pPrinterName); - if (utf_str == NULL) { - throw std::bad_alloc(); - } - env->SetObjectArrayElement(nameArray, i, utf_str); - env->DeleteLocalRef(utf_str); + + for (DWORD i = 0; i < cReturned; i++) { + PRINTER_INFO_4 *info4 = (PRINTER_INFO_4 *) + (pPrinterEnum + i * sizeof(PRINTER_INFO_4)); + utf_str = JNU_NewStringPlatform(env, info4->pPrinterName); + if (utf_str == NULL) { + throw std::bad_alloc(); } + env->SetObjectArrayElement(nameArray, i, utf_str); + env->DeleteLocalRef(utf_str); } } catch (std::bad_alloc&) { delete [] pPrinterEnum; @@ -872,7 +810,7 @@ Java_sun_print_Win32PrintService_getDefaultSettings(JNIEnv *env, int numSizes = ::DeviceCapabilities(printerName, printerPort, DC_PAPERS, NULL, NULL); if (numSizes > 0) { - LPWORD papers = (LPWORD)safe_Malloc(numSizes * sizeof(WORD)); + LPTSTR papers = (LPTSTR)safe_Malloc(numSizes * sizeof(WORD)); if (papers != NULL && ::DeviceCapabilities(printerName, printerPort, DC_PAPERS, papers, NULL) != -1) { diff --git a/jdk/src/windows/native/sun/windows/awt.h b/jdk/src/windows/native/sun/windows/awt.h index 389aba67db3..cd4791fd257 100644 --- a/jdk/src/windows/native/sun/windows/awt.h +++ b/jdk/src/windows/native/sun/windows/awt.h @@ -26,10 +26,21 @@ #ifndef _AWT_H_ #define _AWT_H_ +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0600 +#endif + +#ifndef _WIN32_IE +#define _WIN32_IE 0x0600 +#endif + +//#ifndef NTDDI_VERSION +//#define NTDDI_VERSION NTDDI_LONGHORN +//#endif + #include "stdhdrs.h" #include "alloc.h" #include "awt_Debug.h" -#include "UnicowsLoader.h" extern COLORREF DesktopColor2RGB(int colorIndex); @@ -129,40 +140,23 @@ typedef AwtObject* PDATA; /* /NEW JNI */ /* - * IS_NT returns TRUE on NT, 2000, XP - * IS_WIN2000 returns TRUE on 2000, XP - * IS_WINXP returns TRUE on XP - * IS_WIN95 returns TRUE on 95, 98, ME - * IS_WIN98 returns TRUE on 98, ME - * IS_WINME returns TRUE on ME - * IS_WIN32 returns TRUE on 32-bit Pentium and - * 64-bit Itanium. * IS_WIN64 returns TRUE on 64-bit Itanium - * - * uname -s returns Windows_95 on 95 - * uname -s returns Windows_98 on 98 and ME - * uname -s returns Windows_NT on NT and 2000 and XP */ -#if defined (WIN32) - #define IS_WIN32 TRUE -#else - #define IS_WIN32 FALSE -#endif #if defined (_WIN64) #define IS_WIN64 TRUE #else #define IS_WIN64 FALSE #endif -#define IS_NT (IS_WIN32 && !(::GetVersion() & 0x80000000)) -#define IS_WIN2000 (IS_NT && LOBYTE(LOWORD(::GetVersion())) >= 5) -#define IS_WIN2003 (IS_NT && LOBYTE(LOWORD(::GetVersion())) == 5 && HIBYTE(LOWORD(::GetVersion())) >= 2) -#define IS_WINXP (IS_NT && (IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5) -#define IS_WINVISTA (IS_NT && LOBYTE(LOWORD(::GetVersion())) >= 6) -#define IS_WIN32S (IS_WIN32 && !IS_NT && LOBYTE(LOWORD(::GetVersion())) < 4) -#define IS_WIN95 (IS_WIN32 && !IS_NT && LOBYTE(LOWORD(::GetVersion())) >= 4) -#define IS_WIN98 (IS_WIN95 && HIBYTE(LOWORD(::GetVersion())) >= 10) -#define IS_WINME (IS_WIN95 && HIBYTE(LOWORD(::GetVersion())) >= 90) -#define IS_WIN4X (IS_WIN32 && LOBYTE(::GetVersion()) >= 4) + +/* + * IS_WIN2000 returns TRUE on 2000, XP and Vista + * IS_WINXP returns TRUE on XP and Vista + * IS_WINVISTA returns TRUE on Vista + */ +#define IS_WIN2000 (LOBYTE(LOWORD(::GetVersion())) >= 5) +#define IS_WINXP ((IS_WIN2000 && HIBYTE(LOWORD(::GetVersion())) >= 1) || LOBYTE(LOWORD(::GetVersion())) > 5) +#define IS_WINVISTA (LOBYTE(LOWORD(::GetVersion())) >= 6) + #define IS_WINVER_ATLEAST(maj, min) \ ((maj) < LOBYTE(LOWORD(::GetVersion())) || \ (maj) == LOBYTE(LOWORD(::GetVersion())) && \ @@ -177,6 +171,12 @@ typedef AwtObject* PDATA; extern JavaVM *jvm; +// Platform encoding is Unicode (UTF-16), re-define JNU_ functions +// to proper JNI functions. +#define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast(x), static_cast(_tcslen(x))) +#define JNU_GetStringPlatformChars(env, x, y) reinterpret_cast(env->GetStringChars(x, y)) +#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast(y)) + /* * Itanium symbols needed for 64-bit compilation. * These are defined in winuser.h in the August 2001 MSDN update. @@ -211,17 +211,12 @@ extern JavaVM *jvm; * NOTE: float.h must be defined if using these macros */ #define SAVE_CONTROLWORD \ - unsigned int fpu_cw = _CW_DEFAULT; \ - if (IS_WIN95) { \ - fpu_cw = _control87(0, 0); \ - } + unsigned int fpu_cw = _control87(0, 0); -#define RESTORE_CONTROLWORD \ - if (IS_WIN95) { \ - if ( _control87(0, 0) != fpu_cw) { \ - _control87(fpu_cw, 0xfffff); \ - } \ - } +#define RESTORE_CONTROLWORD \ + if (_control87(0, 0) != fpu_cw) { \ + _control87(fpu_cw, 0xffffffff); \ + } /* * checks if the current thread is/isn't the toolkit thread diff --git a/jdk/src/windows/native/sun/windows/awt_Button.cpp b/jdk/src/windows/native/sun/windows/awt_Button.cpp index e4895915df0..3764655cba4 100644 --- a/jdk/src/windows/native/sun/windows/awt_Button.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Button.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ * have any questions. */ -#include +#include "awt.h" #include "awt_Object.h" /* wop_pDataID */ #include "awt_Toolkit.h" @@ -106,7 +106,7 @@ AwtButton* AwtButton::Create(jobject self, jobject parent) if (label == NULL) { labelStr = L""; } else { - labelStr = env->GetStringChars(label, JNI_FALSE); + labelStr = JNU_GetStringPlatformChars(env, label, JNI_FALSE); } style = 0; @@ -128,7 +128,7 @@ AwtButton* AwtButton::Create(jobject self, jobject parent) c->m_backgroundColorSet = TRUE; // suppress inheriting parent's color c->UpdateBackground(env, target); if (label != NULL) - env->ReleaseStringChars(label, labelStr); + JNU_ReleaseStringPlatformChars(env, label, labelStr); } catch (...) { env->DeleteLocalRef(target); if (label != NULL) diff --git a/jdk/src/windows/native/sun/windows/awt_Checkbox.cpp b/jdk/src/windows/native/sun/windows/awt_Checkbox.cpp index b0a73679d0b..2e8cf9923db 100644 --- a/jdk/src/windows/native/sun/windows/awt_Checkbox.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Checkbox.cpp @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include "awt_Toolkit.h" #include "awt_Checkbox.h" #include "awt_KeyboardFocusManager.h" @@ -106,7 +107,7 @@ AwtCheckbox* AwtCheckbox::Create(jobject peer, jobject parent) label = (jstring)env->GetObjectField(target, AwtCheckbox::labelID); if (label != NULL) { - labelStr = env->GetStringChars(label, 0); + labelStr = JNU_GetStringPlatformChars(env, label, 0); } if (labelStr != 0) { jint x = env->GetIntField(target, AwtComponent::xID); @@ -123,7 +124,7 @@ AwtCheckbox* AwtCheckbox::Create(jobject peer, jobject parent) peer); if (labelStr != defaultLabelStr) { - env->ReleaseStringChars(label, labelStr); + JNU_ReleaseStringPlatformChars(env, label, labelStr); } } else { throw std::bad_alloc(); diff --git a/jdk/src/windows/native/sun/windows/awt_Choice.cpp b/jdk/src/windows/native/sun/windows/awt_Choice.cpp index 27145ea6e6c..ca7adb0ed6e 100644 --- a/jdk/src/windows/native/sun/windows/awt_Choice.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Choice.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -206,7 +206,7 @@ int AwtChoice::GetFieldHeight() fieldHeight =(int)::SendMessage(GetHWnd(), CB_GETITEMHEIGHT, (UINT)-1, 0); // add top and bottom border lines; border size is different for // Win 4.x (3d edge) vs 3.x (1 pixel line) - borderHeight = ::GetSystemMetrics(IS_WIN4X ? SM_CYEDGE : SM_CYBORDER); + borderHeight = ::GetSystemMetrics(SM_CYEDGE); fieldHeight += borderHeight*2; return fieldHeight; } @@ -424,6 +424,9 @@ AwtChoice::WmKillFocus(HWND hWndGotFocus) case mrPassAlong: return AwtComponent::WmKillFocus(hWndGotFocus); } + + DASSERT(false); // must never reach here + return mrDoDefault; } MsgRouting diff --git a/jdk/src/windows/native/sun/windows/awt_Color.cpp b/jdk/src/windows/native/sun/windows/awt_Color.cpp index b1c6cb90548..bc9b2f13f32 100644 --- a/jdk/src/windows/native/sun/windows/awt_Color.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Color.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -97,7 +97,7 @@ Java_sun_awt_windows_WColor_getDefaultColor(JNIEnv *env, jclass cls, iColor = COLOR_MENUTEXT; break; case sun_awt_windows_WColor_BUTTON_BKGND: - iColor = (IS_NT) ? COLOR_BTNFACE : COLOR_3DFACE; + iColor = COLOR_BTNFACE; break; case sun_awt_windows_WColor_BUTTON_TEXT: iColor = COLOR_BTNTEXT; diff --git a/jdk/src/windows/native/sun/windows/awt_Component.cpp b/jdk/src/windows/native/sun/windows/awt_Component.cpp index 5b017c97810..a46627dbab0 100644 --- a/jdk/src/windows/native/sun/windows/awt_Component.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp @@ -23,7 +23,8 @@ * have any questions. */ -#include "windows.h" +#include "awt.h" + #include #include @@ -42,7 +43,6 @@ #include "awt_MouseEvent.h" #include "awt_Palette.h" #include "awt_Toolkit.h" -#include "awt_Unicode.h" #include "awt_Window.h" #include "awt_Win32GraphicsDevice.h" #include "Hashtable.h" @@ -67,30 +67,10 @@ #include // Begin -- Win32 SDK include files -#include #include #include // End -- Win32 SDK include files -#ifndef GET_KEYSTATE_WPARAM // defined for (_WIN32_WINNT >= 0x0400) -#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam)) -#endif - -#ifndef GET_WHEEL_DELTA_WPARAM // defined for (_WIN32_WINNT >= 0x0500) -#define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam)) -#endif - -// -#if !defined(__int3264) -#define GetWindowLongPtr GetWindowLong -#define SetWindowLongPtr SetWindowLong -#define GWLP_USERDATA GWL_USERDATA -#define GWLP_WNDPROC GWL_WNDPROC -typedef __int32 LONG_PTR; -typedef unsigned __int32 ULONG_PTR; -#endif // __int3264 -// - #include LPCTSTR szAwtComponentClassName = TEXT("SunAwtComponent"); @@ -207,10 +187,6 @@ LANGID AwtComponent::m_idLang = LOWORD(::GetKeyboardLayout(0)); UINT AwtComponent::m_CodePage = AwtComponent::LangToCodePage(m_idLang); -BOOL AwtComponent::m_isWin95 = IS_WIN95; -BOOL AwtComponent::m_isWin2000 = IS_WIN2000; -BOOL AwtComponent::m_isWinNT = IS_NT; - static BOOL bLeftShiftIsDown = false; static BOOL bRightShiftIsDown = false; static UINT lastShiftKeyPressed = 0; // init to safe value @@ -544,7 +520,7 @@ AwtComponent::CreateHWnd(JNIEnv *env, LPCWSTR title, jobject createError = NULL; if (dw == ERROR_OUTOFMEMORY) { - jstring errorMsg = env->NewStringUTF("too many window handles"); + jstring errorMsg = JNU_NewStringPlatform(env, L"too many window handles"); createError = JNU_NewObjectByName(env, "java/lang/OutOfMemoryError", "(Ljava/lang/String;)V", errorMsg); @@ -1347,17 +1323,9 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) return (LRESULT)TRUE; } - UINT switchMessage; - if (IS_WIN95 && !IS_WIN98 && message == Wheel95GetMsg()) { - // Wheel message is generated dynamically on 95. A quick swap and - // we're good to go. - DTRACE_PRINTLN1("got wheel event on 95. msg is %i\n", message); - switchMessage = WM_MOUSEWHEEL; - } - else { - switchMessage = message; - } + DWORD curPos = 0; + UINT switchMessage = message; switch (switchMessage) { case WM_AWT_GETDC: { @@ -1648,63 +1616,55 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSEWHEEL: case WM_AWT_MOUSEENTER: case WM_AWT_MOUSEEXIT: - { - DWORD curPos = ::GetMessagePos(); + curPos = ::GetMessagePos(); POINT myPos; myPos.x = GET_X_LPARAM(curPos); myPos.y = GET_Y_LPARAM(curPos); ::ScreenToClient(GetHWnd(), &myPos); switch(switchMessage) { case WM_AWT_MOUSEENTER: - mr = WmMouseEnter(static_cast(wParam), myPos.x, myPos.y); break; + mr = WmMouseEnter(static_cast(wParam), myPos.x, myPos.y); + break; case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK: - mr = WmMouseDown(static_cast(wParam), myPos.x, myPos.y, - LEFT_BUTTON); break; - case WM_LBUTTONUP: - mr = WmMouseUp(static_cast(wParam), myPos.x, myPos.y, - LEFT_BUTTON); break; - case WM_MOUSEMOVE: - mr = WmMouseMove(static_cast(wParam), myPos.x, myPos.y); break; - case WM_MBUTTONDOWN: - case WM_MBUTTONDBLCLK: - mr = WmMouseDown(static_cast(wParam), myPos.x, myPos.y, - MIDDLE_BUTTON); break; - case WM_RBUTTONDOWN: - case WM_RBUTTONDBLCLK: - mr = WmMouseDown(static_cast(wParam), myPos.x, myPos.y, - RIGHT_BUTTON); break; - case WM_RBUTTONUP: - mr = WmMouseUp(static_cast(wParam), myPos.x, myPos.y, - RIGHT_BUTTON); - break; - case WM_MBUTTONUP: - mr = WmMouseUp(static_cast(wParam), myPos.x, myPos.y, - MIDDLE_BUTTON); - break; - case WM_AWT_MOUSEEXIT: - mr = WmMouseExit(static_cast(wParam), myPos.x, myPos.y); - break; - case WM_MOUSEWHEEL: - if (IS_WIN95 && !IS_WIN98) { - // On 95, the wParam doesn't contain the keystate flags, just - // the wheel rotation. The keystates are fetched in WmMouseWheel - // using GetJavaModifiers(). - mr = WmMouseWheel(0, - GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), - (int)wParam); - return FALSE; - } - else { + mr = WmMouseDown(static_cast(wParam), myPos.x, myPos.y, + LEFT_BUTTON); + break; + case WM_LBUTTONUP: + mr = WmMouseUp(static_cast(wParam), myPos.x, myPos.y, + LEFT_BUTTON); + break; + case WM_MOUSEMOVE: + mr = WmMouseMove(static_cast(wParam), myPos.x, myPos.y); + break; + case WM_MBUTTONDOWN: + case WM_MBUTTONDBLCLK: + mr = WmMouseDown(static_cast(wParam), myPos.x, myPos.y, + MIDDLE_BUTTON); + break; + case WM_RBUTTONDOWN: + case WM_RBUTTONDBLCLK: + mr = WmMouseDown(static_cast(wParam), myPos.x, myPos.y, + RIGHT_BUTTON); + break; + case WM_RBUTTONUP: + mr = WmMouseUp(static_cast(wParam), myPos.x, myPos.y, + RIGHT_BUTTON); + break; + case WM_MBUTTONUP: + mr = WmMouseUp(static_cast(wParam), myPos.x, myPos.y, + MIDDLE_BUTTON); + break; + case WM_AWT_MOUSEEXIT: + mr = WmMouseExit(static_cast(wParam), myPos.x, myPos.y); + break; + case WM_MOUSEWHEEL: mr = WmMouseWheel(GET_KEYSTATE_WPARAM(wParam), GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), GET_WHEEL_DELTA_WPARAM(wParam)); + break; } break; - } - } - break; - case WM_SETCURSOR: mr = mrDoDefault; if (LOWORD(lParam) == HTCLIENT) { @@ -2649,21 +2609,10 @@ MsgRouting AwtComponent::WmMouseWheel(UINT flags, int x, int y, jdouble preciseWheelRotation = (jdouble) wheelRotation / (-1 * WHEEL_DELTA); MSG msg; - - if (IS_WIN95 && !IS_WIN98) { - // 95 doesn't understand the SPI_GETWHEELSCROLLLINES - get the user - // preference by other means - DTRACE_PRINTLN("WmMouseWheel: using 95 branch"); - platformLines = Wheel95GetScrLines(); - result = true; - InitMessage(&msg, lastMessage, wheelRotation, MAKELPARAM(x, y)); - } - else { - result = ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, - &platformLines, 0); - InitMessage(&msg, lastMessage, MAKEWPARAM(flags, wheelRotation), - MAKELPARAM(x, y)); - } + result = ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, + &platformLines, 0); + InitMessage(&msg, lastMessage, MAKEWPARAM(flags, wheelRotation), + MAKELPARAM(x, y)); if (result) { if (platformLines == WHEEL_PAGESCROLL) { @@ -2743,156 +2692,21 @@ jint AwtComponent::GetShiftKeyLocation(UINT vkey, UINT flags) "AwtComponent::GetShiftKeyLocation vkey = %d = 0x%x scan = %d", vkey, vkey, keyScanCode); - if (m_isWinNT) { - leftShiftScancode = ::MapVirtualKey(VK_LSHIFT, 0); - rightShiftScancode = ::MapVirtualKey(VK_RSHIFT, 0); + leftShiftScancode = ::MapVirtualKey(VK_LSHIFT, 0); + rightShiftScancode = ::MapVirtualKey(VK_RSHIFT, 0); - if (keyScanCode == leftShiftScancode) { - return java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } - if (keyScanCode == rightShiftScancode) { - return java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } - - DASSERT(false); - // Note: the above should not fail on NT (or 2000), - // but just in case it does, try the more complicated method - // we use for Win9x below. + if (keyScanCode == leftShiftScancode) { + return java_awt_event_KeyEvent_KEY_LOCATION_LEFT; + } + if (keyScanCode == rightShiftScancode) { + return java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; } - // "Transition" bit = 0 if keyPressed, 1 if keyReleased - BOOL released = ((1<<15) & flags); + DASSERT(false); + // Note: the above should not fail on NT (or 2000) - DTRACE_PRINTLN2( - "AwtComponent::GetShiftKeyLocation bLeftShiftIsDown = %d bRightShiftIsDown == %d", - bLeftShiftIsDown, bRightShiftIsDown); - DTRACE_PRINTLN2( - "AwtComponent::GetShiftKeyLocation lastShiftKeyPressed = %d released = %d", - lastShiftKeyPressed, released); - - jint keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN; - - // It is possible for somebody to hold down one or both - // Shift keys, causing repeat key events. We need to - // handle all the cases. - // - // Just a side-note: if two or more keys are being held down, - // and then one key is released, whether more key presses are - // generated for the keys that are still held down depends on - // which keys they are, and whether you released the right or - // the left shift/ctrl/etc. key first. This also differs - // between Win9x and NT. Just plain screwy. - // - // Note: on my PC, the repeat count is always 1. Yup, we need - // 16 bits to handle that, all right. - - // Handle the case where only one of the Shift keys - // was down before this event took place - if (bLeftShiftIsDown && !bRightShiftIsDown) { - if (released) { - // This is a left Shift release - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } else { - // This is a right Shift press - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } - } else if (!bLeftShiftIsDown && bRightShiftIsDown) { - if (released) { - // This is a right Shift release - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } else { - // This is a left Shift press - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } - } - - // Handle the case where neither of the Shift keys - // were down before this event took place - if (!bLeftShiftIsDown && !bRightShiftIsDown) { - DASSERT(!released); - if (HIBYTE(::GetKeyState(VK_LSHIFT)) != 0) { - // This is a left Shift press - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } else if (HIBYTE(::GetKeyState(VK_RSHIFT)) != 0) { - // This is a right Shift press - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } else { - DASSERT(false); - } - } - - // Handle the case where both Shift keys were down before - // this event took place - if (bLeftShiftIsDown && bRightShiftIsDown) { - // If this is a key release event, we can just check to see - // what the keyboard state is after the event - if (released) { - if (HIBYTE(::GetKeyState(VK_RSHIFT)) == 0) { - // This is a right Shift release - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } else if (HIBYTE(::GetKeyState(VK_LSHIFT)) == 0) { - // This is a left Shift release - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } else { - DASSERT(false); - } - } else { - // If this is a key press event, and both Shift keys were - // already down, this is going to be a repeat of the last - // Shift press - if (lastShiftKeyPressed == VK_LSHIFT) { - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } else if (lastShiftKeyPressed == VK_RSHIFT) { - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } else { - DASSERT(false); - } - } - } - - if (keyLocation == java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN) { - // Nothing we tried above worked for some reason. Sigh. - // Make a last-ditch effort to guess what happened: - // guess that the Shift scancodes are usually the same - // from system to system, even though this isn't guaranteed. - DTRACE_PRINTLN("Last-ditch effort at guessing Shift keyLocation"); - - // Tested on a couple of Windows keyboards: these are standard values - leftShiftScancode = 42; - rightShiftScancode = 54; - - if (keyScanCode == leftShiftScancode) { - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_LEFT; - } else if (keyScanCode == rightShiftScancode) { - keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_RIGHT; - } - } - - // Set the Shift flags with the new key state. - bLeftShiftIsDown = (HIBYTE(::GetKeyState(VK_LSHIFT)) != 0); - bRightShiftIsDown = (HIBYTE(::GetKeyState(VK_RSHIFT)) != 0); - - // Update lastShiftKeyPressed - if (released) { - // At most one shift key is down now, so just check which one - if (bLeftShiftIsDown) { - lastShiftKeyPressed = VK_LSHIFT; - DASSERT(!bRightShiftIsDown); - } else if (bRightShiftIsDown) { - lastShiftKeyPressed = VK_RSHIFT; - } else { - lastShiftKeyPressed = 0; - } - } else { - // It was a press, so at least one shift key is down now - if (keyLocation == java_awt_event_KeyEvent_KEY_LOCATION_LEFT) { - lastShiftKeyPressed = VK_LSHIFT; - } else if (keyLocation == java_awt_event_KeyEvent_KEY_LOCATION_RIGHT) { - lastShiftKeyPressed = VK_RSHIFT; - } - } - - return keyLocation; + // default value + return java_awt_event_KeyEvent_KEY_LOCATION_LEFT; } /* Returns Java extended InputEvent modifieres. @@ -3786,22 +3600,6 @@ MsgRouting AwtComponent::WmChar(UINT character, UINT repCnt, UINT flags, // via WM_AWT_FORWARD_BYTE, but the Edit classes don't seem to // like that. - // Begin pollution - if (!m_isWinNT && IsDBCSLeadByteEx(GetCodePage(), BYTE(character))) { - if (GetDBCSEditHandle() != NULL) { - return mrDoDefault; - } else { - // Kludge: Some Chinese IMEs, e.g. QuanPin, sends two WM_CHAR - // messages for some punctuations (e.g. full stop) without sending - // WM_IME_CHAR message beforehand. - if (m_PendingLeadByte == 0) { - m_PendingLeadByte = character; - return mrConsume; - } - } - } - // End pollution - // We will simply create Java events here. UINT message = system ? WM_SYSCHAR : WM_CHAR; @@ -3861,43 +3659,8 @@ MsgRouting AwtComponent::WmChar(UINT character, UINT repCnt, UINT flags, MsgRouting AwtComponent::WmForwardChar(WCHAR character, LPARAM lParam, BOOL synthetic) { - if (m_isWinNT) { - // just post WM_CHAR with unicode key value - DefWindowProc(WM_CHAR, (WPARAM)character, lParam); - return mrConsume; - } - - // This message is sent from the Java key event handler. - CHAR mbChar[2] = {'\0', '\0'}; - - int cBytes = ::WideCharToMultiByte(GetCodePage(), 0, &character, 1, mbChar, 2, NULL, NULL); - if (cBytes!=1 && cBytes!=2) return mrConsume; - - HWND hDBCSEditHandle = GetDBCSEditHandle(); - - if (hDBCSEditHandle != NULL && cBytes==2) - { - // The first WM_CHAR message will get handled by the WmChar, but - // the second WM_CHAR message will get picked off by the Edit class. - // WmChar will never see it. - // If an Edit class gets a lead byte, it immediately calls PeekMessage - // and pulls the trail byte out of the message queue. - ::PostMessage(hDBCSEditHandle, WM_CHAR, mbChar[0] & 0x00ff, lParam); - ::PostMessage(hDBCSEditHandle, WM_CHAR, mbChar[1] & 0x00ff, lParam); - } - else - { - MSG* pMsg; - pMsg = CreateMessage(WM_CHAR, mbChar[0] & 0x00ff, lParam); - ::PostMessage(GetHWnd(), WM_AWT_FORWARD_BYTE, (WPARAM)synthetic, - (LPARAM)pMsg); - if (mbChar[1]) - { - pMsg = CreateMessage(WM_CHAR, mbChar[1] & 0x00ff, lParam); - ::PostMessage(GetHWnd(), WM_AWT_FORWARD_BYTE, (WPARAM)synthetic, - (LPARAM)pMsg); - } - } + // just post WM_CHAR with unicode key value + DefWindowProc(WM_CHAR, (WPARAM)character, lParam); return mrConsume; } @@ -4543,7 +4306,7 @@ MsgRouting AwtComponent::WmPrint(HDC hDC, LPARAM flags) // Special case for components with a sunken border. Windows does not // print the border correctly on PCL printers, so we have to do it ourselves. - if (IS_WIN4X && (GetStyleEx() & WS_EX_CLIENTEDGE)) { + if (GetStyleEx() & WS_EX_CLIENTEDGE) { RECT r; VERIFY(::GetWindowRect(GetHWnd(), &r)); VERIFY(::OffsetRect(&r, -r.left, -r.top)); @@ -4559,7 +4322,7 @@ MsgRouting AwtComponent::WmPrint(HDC hDC, LPARAM flags) * We will first print the non-client area with the original offset, * then the client area with a corrected offset. */ - if (IS_WIN4X && (GetStyleEx() & WS_EX_CLIENTEDGE)) { + if (GetStyleEx() & WS_EX_CLIENTEDGE) { int nEdgeWidth = ::GetSystemMetrics(SM_CXEDGE); int nEdgeHeight = ::GetSystemMetrics(SM_CYEDGE); @@ -5319,18 +5082,8 @@ void AwtComponent::SynthesizeMouseMessage(JNIEnv *env, jobject mouseEvent) // convert Java wheel amount value to Win32 wheelAmt *= -1 * WHEEL_DELTA; - if (IS_WIN95 && !IS_WIN98) { - // 95 doesn't understand WM_MOUSEWHEEL, so plug in value of - // mouse wheel event on 95 - DTRACE_PRINTLN("awt_C::synthmm - 95 case"); - DASSERT(Wheel95GetMsg() != NULL); - message = Wheel95GetMsg(); - wParam = wheelAmt; - } - else { - message = WM_MOUSEWHEEL; - wParam = MAKEWPARAM(wLow, wheelAmt); - } + message = WM_MOUSEWHEEL; + wParam = MAKEWPARAM(wLow, wheelAmt); break; default: @@ -5445,45 +5198,6 @@ void AwtComponent::Enable(BOOL bEnable) VerifyState(); } -/* Initialization of MouseWheel support on Windows 95 */ -void AwtComponent::Wheel95Init() { - DASSERT(IS_WIN95 && !IS_WIN98); - - HWND mwHWND = NULL; - UINT wheelMSG = WM_NULL; - UINT suppMSG = WM_NULL; - UINT linesMSG = WM_NULL; - BOOL wheelActive; - INT lines; - - mwHWND = HwndMSWheel(&wheelMSG, &suppMSG, &linesMSG, &wheelActive, &lines); - if (mwHWND != WM_NULL) { - sm_95WheelMessage = wheelMSG; - sm_95WheelSupport = suppMSG; - } -} - -/* Win95 only - * Return the user's preferred number of lines of test to scroll when the - * mouse wheel is rotated. - */ -UINT AwtComponent::Wheel95GetScrLines() { - DASSERT(IS_WIN95 && !IS_WIN98); - DASSERT(sm_95WheelSupport != NULL); - - HWND mwHWND = NULL; - UINT linesMSG = WM_NULL; - INT numLines = 3; - - linesMSG = RegisterWindowMessage(MSH_SCROLL_LINES); - mwHWND = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE); - - if (mwHWND && linesMSG) { - numLines = (INT)::SendMessage(mwHWND, linesMSG, 0, 0); - } - return numLines; -} - /* * associate an AwtDropTarget with this AwtComponent */ @@ -5983,7 +5697,7 @@ void AwtComponent::_SetFont(void *param) { AwtFont *awtFont = (AwtFont *)env->GetLongField(font, AwtFont::pDataID); if (awtFont == NULL) { - /*arguments of AwtFont::Create are changed for multifont component */ + /*arguments of AwtFont::Create are changed for multifont component */ awtFont = AwtFont::Create(env, font); } env->SetLongField(font, AwtFont::pDataID, (jlong)awtFont); @@ -7025,20 +6739,6 @@ Java_sun_awt_windows_WComponentPeer_isObscured(JNIEnv* env, CATCH_BAD_ALLOC_RET(NULL); } -/* - * Class: sun_awt_windows_WComponentPeer - * Method: wheelInit - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_sun_awt_windows_WComponentPeer_wheelInit(JNIEnv *env, jclass cls) -{ - // Only necessary on Win95 - if (IS_WIN95 && !IS_WIN98) { - AwtComponent::Wheel95Init(); - } -} - JNIEXPORT jboolean JNICALL Java_sun_awt_windows_WComponentPeer_processSynchronousLightweightTransfer(JNIEnv *env, jclass cls, jobject heavyweight, @@ -7217,7 +6917,9 @@ void AwtComponent::VerifyState() "getName", "()Ljava/lang/String;").l; DASSERT(!safe_ExceptionOccurred(env)); - printf("\t%S\n", TO_WSTRING(targetStr)); + LPCWSTR targetStrW = JNU_GetStringPlatformChars(env, targetStr, NULL); + printf("\t%S\n", targetStrW); + JNU_ReleaseStringPlatformChars(env, targetStr, targetStrW); } printf("\twas: [%d,%d,%dx%d]\n", x, y, width, height); if (!fSizeValid) { diff --git a/jdk/src/windows/native/sun/windows/awt_Component.h b/jdk/src/windows/native/sun/windows/awt_Component.h index f73980c28b4..dbd6110c69e 100644 --- a/jdk/src/windows/native/sun/windows/awt_Component.h +++ b/jdk/src/windows/native/sun/windows/awt_Component.h @@ -675,10 +675,6 @@ public: static HWND sm_focusOwner; static HWND sm_focusedWindow; - static BOOL m_isWin95; - static BOOL m_isWin2000; - static BOOL m_isWinNT; - static BOOL sm_bMenuLoop; static INLINE BOOL isMenuLoopActive() { return sm_bMenuLoop; diff --git a/jdk/src/windows/native/sun/windows/awt_Cursor.cpp b/jdk/src/windows/native/sun/windows/awt_Cursor.cpp index f524a465c01..c1f3d84e077 100644 --- a/jdk/src/windows/native/sun/windows/awt_Cursor.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Cursor.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -79,10 +79,6 @@ AwtCursor::AwtCursor(JNIEnv *env, HCURSOR hCur, jobject jCur, int xH, int yH, custom = TRUE; dirty = FALSE; - - if (IsWin95Cursor()) { - customCursors.Add(this); - } } AwtCursor::~AwtCursor() @@ -96,9 +92,6 @@ void AwtCursor::Dispose() if (custom) { ::DestroyIcon(hCursor); - if (IsWin95Cursor()) { - customCursors.Remove(this); - } } JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); @@ -256,16 +249,6 @@ void AwtCursor::UpdateCursor(AwtComponent *comp) { env->DeleteLocalRef(jcomp); } -void AwtCursor::DirtyAllCustomCursors() { - if (IsWin95Cursor()) { - AwtObjectListItem *cur = customCursors.m_head; - while (cur != NULL) { - ((AwtCursor *)(cur->obj))->dirty = TRUE; - cur = cur->next; - } - } -} - void AwtCursor::Rebuild() { if (!dirty) { return; @@ -294,23 +277,6 @@ void AwtCursor::Rebuild() { dirty = FALSE; } -/* Bug fix for 4205805: - Custom cursor on WIN95 needs more effort, the same API works fine on NT - and WIN98. On Win95, DDB has to be passed in when calling createIconIndirect - Since DDB depends on the DISPLAY, we have to rebuild all the custom cursors - when user changes the display settings. -*/ -BOOL AwtCursor::IsWin95Cursor() { - static BOOL val; - static BOOL known = FALSE; - if (!known) { - val = (IS_WIN32 && !IS_NT && LOBYTE(LOWORD(::GetVersion())) == 4 && - HIBYTE(LOWORD(::GetVersion())) == 0); - known = TRUE; - } - return val; -} - extern "C" { /************************************************************************ diff --git a/jdk/src/windows/native/sun/windows/awt_Cursor.h b/jdk/src/windows/native/sun/windows/awt_Cursor.h index 7e59a899dcd..69c2931a2b8 100644 --- a/jdk/src/windows/native/sun/windows/awt_Cursor.h +++ b/jdk/src/windows/native/sun/windows/awt_Cursor.h @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,7 +66,6 @@ public: } static AwtCursor * CreateSystemCursor(jobject jCursor); static void UpdateCursor(AwtComponent *comp); - static void DirtyAllCustomCursors(); static HCURSOR GetCursor(JNIEnv *env, AwtComponent *comp); static void setPData(jobject cursor, jlong pdata) { @@ -76,7 +75,6 @@ public: private: void Rebuild(); - static BOOL IsWin95Cursor(); HCURSOR hCursor; jweak jCursor; diff --git a/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp b/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp index 8cd5be4542e..5028b2a3e9d 100644 --- a/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp +++ b/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,12 +24,11 @@ */ #include "awt.h" -#include "awt_dlls.h" #include "awt_DataTransferer.h" #include "awt_DnDDT.h" #include "awt_TextComponent.h" -#include "awt_Unicode.h" #include +#include #include #include @@ -271,9 +270,7 @@ Java_sun_awt_windows_WDataTransferer_dragQueryFile hdrop = (HDROP)bBytes; - load_shell_procs(); - - UINT nFilenames = (*do_drag_query_file)(hdrop, 0xFFFFFFFF, NULL, 0); + UINT nFilenames = ::DragQueryFile(hdrop, 0xFFFFFFFF, NULL, 0); jclass str_clazz = env->FindClass("java/lang/String"); DASSERT(str_clazz != NULL); @@ -287,12 +284,12 @@ Java_sun_awt_windows_WDataTransferer_dragQueryFile buffer = (LPTSTR)safe_Malloc(bufsize*sizeof(TCHAR)); for (UINT i = 0; i < nFilenames; i++) { - UINT size = (*do_drag_query_file)(hdrop, i, NULL, 0); + UINT size = ::DragQueryFile(hdrop, i, NULL, 0); if (size > bufsize) { bufsize = size; buffer = (LPTSTR)safe_Realloc(buffer, bufsize*sizeof(TCHAR)); } - (*do_drag_query_file)(hdrop, i, buffer, bufsize); + ::DragQueryFile(hdrop, i, buffer, bufsize); jstring name = JNU_NewStringPlatform(env, buffer); if (name == NULL) { @@ -454,11 +451,6 @@ Java_sun_awt_windows_WDataTransferer_platformImageBytesToImageData( width = p.x; height = -p.y; - // Win9X supports only 16-bit signed coordinates. - if (IS_WIN95) { - if (width > 0x7FFF) { width = 0x7FFF; } - if (height > 0x7FFF) { height = 0x7FFF; } - } free(lpemh); } break; diff --git a/jdk/src/windows/native/sun/windows/awt_Desktop.cpp b/jdk/src/windows/native/sun/windows/awt_Desktop.cpp index f232a728231..4462ca12e4f 100644 --- a/jdk/src/windows/native/sun/windows/awt_Desktop.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Desktop.cpp @@ -23,8 +23,8 @@ * have any questions. */ +#include "awt.h" #include -#include #include #include @@ -40,32 +40,32 @@ extern "C" { JNIEXPORT jstring JNICALL Java_sun_awt_windows_WDesktopPeer_ShellExecute (JNIEnv *env, jclass cls, jstring uri_j, jstring verb_j) { - const WCHAR* uri_c = env->GetStringChars(uri_j, JNI_FALSE); - const WCHAR* verb_c = env->GetStringChars(verb_j, JNI_FALSE); + LPCWSTR uri_c = JNU_GetStringPlatformChars(env, uri_j, JNI_FALSE); + LPCWSTR verb_c = JNU_GetStringPlatformChars(env, verb_j, JNI_FALSE); // 6457572: ShellExecute possibly changes FPU control word - saving it here unsigned oldcontrol87 = _control87(0, 0); - HINSTANCE retval = ShellExecuteW(NULL, verb_c, uri_c, NULL, NULL, SW_SHOWNORMAL); + HINSTANCE retval = ::ShellExecute(NULL, verb_c, uri_c, NULL, NULL, SW_SHOWNORMAL); _control87(oldcontrol87, 0xffffffff); - env->ReleaseStringChars(uri_j, uri_c); - env->ReleaseStringChars(verb_j, verb_c); + JNU_ReleaseStringPlatformChars(env, uri_j, uri_c); + JNU_ReleaseStringPlatformChars(env, verb_j, verb_c); if ((int)retval <= 32) { // ShellExecute failed. - LPVOID buffer; - int len = FormatMessageW( + LPTSTR buffer = NULL; + int len = ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPWSTR) &buffer, + (LPTSTR)&buffer, 0, NULL ); - jstring errmsg = env->NewString((LPCWSTR)buffer, len); + jstring errmsg = JNU_NewStringPlatform(env, buffer, len); LocalFree(buffer); return errmsg; } diff --git a/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp b/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp index 10c00fe2c29..1475dee38ab 100644 --- a/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp +++ b/jdk/src/windows/native/sun/windows/awt_DesktopProperties.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,17 +23,17 @@ * have any questions. */ -#include "stdhdrs.h" +#include "awt.h" #include "mmsystem.h" #include "jlong.h" -#include "awt.h" #include "awt_DesktopProperties.h" -#include "awt_dlls.h" +#include "awt_Toolkit.h" #include "sun_awt_windows_WDesktopProperties.h" #include "java_awt_Font.h" #include "awtmsg.h" -#include "Zmouse.h" -#include "shellapi.h" +#include "zmouse.h" +#include +#include // WDesktopProperties fields jfieldID AwtDesktopProperties::pDataID = 0; @@ -44,10 +44,6 @@ jmethodID AwtDesktopProperties::setColorPropertyID = 0; jmethodID AwtDesktopProperties::setFontPropertyID = 0; jmethodID AwtDesktopProperties::setSoundPropertyID = 0; -typedef VOID (WINAPI *SHGetSettingsType)(LPSHELLFLAGSTATE, DWORD); -static HMODULE libShell32 = NULL; -static SHGetSettingsType fn_SHGetSettings; - AwtDesktopProperties::AwtDesktopProperties(jobject self) { this->self = GetEnv()->NewGlobalRef(self); GetEnv()->SetLongField( self, AwtDesktopProperties::pDataID, @@ -431,14 +427,12 @@ void CheckFontSmoothingSettings(HWND hWnd) { void AwtDesktopProperties::GetColorParameters() { - if (IS_WIN98 || IS_WIN2000) { - SetColorProperty(TEXT("win.frame.activeCaptionGradientColor"), - GetSysColor(COLOR_GRADIENTACTIVECAPTION)); - SetColorProperty(TEXT("win.frame.inactiveCaptionGradientColor"), - GetSysColor(COLOR_GRADIENTINACTIVECAPTION)); - SetColorProperty(TEXT("win.item.hotTrackedColor"), - GetSysColor(COLOR_HOTLIGHT)); - } + SetColorProperty(TEXT("win.frame.activeCaptionGradientColor"), + GetSysColor(COLOR_GRADIENTACTIVECAPTION)); + SetColorProperty(TEXT("win.frame.inactiveCaptionGradientColor"), + GetSysColor(COLOR_GRADIENTINACTIVECAPTION)); + SetColorProperty(TEXT("win.item.hotTrackedColor"), + GetSysColor(COLOR_HOTLIGHT)); SetColorProperty(TEXT("win.3d.darkShadowColor"), GetSysColor(COLOR_3DDKSHADOW)); SetColorProperty(TEXT("win.3d.backgroundColor"), GetSysColor(COLOR_3DFACE)); SetColorProperty(TEXT("win.3d.highlightColor"), GetSysColor(COLOR_3DHIGHLIGHT)); @@ -510,40 +504,18 @@ void AwtDesktopProperties::GetOtherParameters() { // This property is called "win.frame.fullWindowDragsOn" above // This is one of the properties that don't trigger WM_SETTINGCHANGE SetBooleanProperty(TEXT("awt.dynamicLayoutSupported"), GetBooleanParameter(SPI_GETDRAGFULLWINDOWS)); - - // 95 MouseWheel support - // More or less copied from the MSH_MOUSEWHEEL MSDN entry - if (IS_WIN95 && !IS_WIN98) { - HWND hdlMSHWHEEL = NULL; - UINT msgMSHWheelSupported = NULL; - BOOL wheelSupported = FALSE; - - msgMSHWheelSupported = RegisterWindowMessage(MSH_WHEELSUPPORT); - hdlMSHWHEEL = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE); - if (hdlMSHWHEEL && msgMSHWheelSupported) { - wheelSupported = (BOOL)::SendMessage(hdlMSHWHEEL, - msgMSHWheelSupported, 0, 0); - } - SetBooleanProperty(TEXT("awt.wheelMousePresent"), wheelSupported); - } - else { - SetBooleanProperty(TEXT("awt.wheelMousePresent"), - ::GetSystemMetrics(SM_MOUSEWHEELPRESENT)); - } + SetBooleanProperty(TEXT("awt.wheelMousePresent"), + ::GetSystemMetrics(SM_MOUSEWHEELPRESENT)); // END cross-platform properties - if (IS_WIN98 || IS_WIN2000) { - //DWORD menuShowDelay; - //SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &menuShowDelay, 0); - // SetIntegerProperty(TEXT("win.menu.showDelay"), menuShowDelay); - SetBooleanProperty(TEXT("win.frame.captionGradientsOn"), GetBooleanParameter(SPI_GETGRADIENTCAPTIONS)); - SetBooleanProperty(TEXT("win.item.hotTrackingOn"), GetBooleanParameter(SPI_GETHOTTRACKING)); - } + //DWORD menuShowDelay; + //SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &menuShowDelay, 0); + // SetIntegerProperty(TEXT("win.menu.showDelay"), menuShowDelay); + SetBooleanProperty(TEXT("win.frame.captionGradientsOn"), GetBooleanParameter(SPI_GETGRADIENTCAPTIONS)); + SetBooleanProperty(TEXT("win.item.hotTrackingOn"), GetBooleanParameter(SPI_GETHOTTRACKING)); - if (IS_WIN2000) { - SetBooleanProperty(TEXT("win.menu.keyboardCuesOn"), GetBooleanParameter(SPI_GETKEYBOARDCUES)); - } + SetBooleanProperty(TEXT("win.menu.keyboardCuesOn"), GetBooleanParameter(SPI_GETKEYBOARDCUES)); // High contrast accessibility property HIGHCONTRAST contrast; @@ -557,21 +529,19 @@ void AwtDesktopProperties::GetOtherParameters() { SetBooleanProperty(TEXT("win.highContrast.on"), FALSE); } - if (fn_SHGetSettings != NULL) { - SHELLFLAGSTATE sfs; - fn_SHGetSettings(&sfs, SSF_SHOWALLOBJECTS | SSF_SHOWATTRIBCOL); - if (sfs.fShowAllObjects) { - SetBooleanProperty(TEXT("awt.file.showHiddenFiles"), TRUE); - } - else { - SetBooleanProperty(TEXT("awt.file.showHiddenFiles"), FALSE); - } - if (sfs.fShowAttribCol) { - SetBooleanProperty(TEXT("awt.file.showAttribCol"), TRUE); - } - else { - SetBooleanProperty(TEXT("awt.file.showAttribCol"), FALSE); - } + SHELLFLAGSTATE sfs; + ::SHGetSettings(&sfs, SSF_SHOWALLOBJECTS | SSF_SHOWATTRIBCOL); + if (sfs.fShowAllObjects) { + SetBooleanProperty(TEXT("awt.file.showHiddenFiles"), TRUE); + } + else { + SetBooleanProperty(TEXT("awt.file.showHiddenFiles"), FALSE); + } + if (sfs.fShowAttribCol) { + SetBooleanProperty(TEXT("awt.file.showAttribCol"), TRUE); + } + else { + SetBooleanProperty(TEXT("awt.file.showAttribCol"), FALSE); } LPTSTR value; @@ -667,7 +637,7 @@ UINT AwtDesktopProperties::GetIntegerParameter(UINT spi) { } void AwtDesktopProperties::SetStringProperty(LPCTSTR propName, LPTSTR value) { - jstring key = JNU_NewStringPlatform(GetEnv(), propName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setStringPropertyID, key, JNU_NewStringPlatform(GetEnv(), value)); @@ -675,7 +645,7 @@ void AwtDesktopProperties::SetStringProperty(LPCTSTR propName, LPTSTR value) { } void AwtDesktopProperties::SetIntegerProperty(LPCTSTR propName, int value) { - jstring key = JNU_NewStringPlatform(GetEnv(), propName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setIntegerPropertyID, key, (jint)value); @@ -683,7 +653,7 @@ void AwtDesktopProperties::SetIntegerProperty(LPCTSTR propName, int value) { } void AwtDesktopProperties::SetBooleanProperty(LPCTSTR propName, BOOL value) { - jstring key = JNU_NewStringPlatform(GetEnv(), propName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setBooleanPropertyID, key, value ? JNI_TRUE : JNI_FALSE); @@ -691,7 +661,7 @@ void AwtDesktopProperties::SetBooleanProperty(LPCTSTR propName, BOOL value) { } void AwtDesktopProperties::SetColorProperty(LPCTSTR propName, DWORD value) { - jstring key = JNU_NewStringPlatform(GetEnv(), propName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setColorPropertyID, key, GetRValue(value), GetGValue(value), @@ -743,7 +713,7 @@ void AwtDesktopProperties::SetFontProperty(HDC dc, int fontID, style |= java_awt_Font_ITALIC; } - jstring key = JNU_NewStringPlatform(GetEnv(), propName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setFontPropertyID, key, fontName, style, pointSize); @@ -761,7 +731,7 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon jint pointSize; jint style; - fontName = JNU_NewStringPlatform(GetEnv(), font.lfFaceName); + fontName = JNU_NewStringPlatform(GetEnv(), const_cast(font.lfFaceName)); #if 0 HDC hdc; @@ -784,7 +754,7 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon style |= java_awt_Font_ITALIC; } - jstring key = JNU_NewStringPlatform(GetEnv(), propName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setFontPropertyID, key, fontName, style, pointSize); @@ -793,8 +763,8 @@ void AwtDesktopProperties::SetFontProperty(LPCTSTR propName, const LOGFONT & fon } void AwtDesktopProperties::SetSoundProperty(LPCTSTR propName, LPCTSTR winEventName) { - jstring key = JNU_NewStringPlatform(GetEnv(), propName); - jstring event = JNU_NewStringPlatform(GetEnv(), winEventName); + jstring key = JNU_NewStringPlatform(GetEnv(), const_cast(propName)); + jstring event = JNU_NewStringPlatform(GetEnv(), const_cast(winEventName)); GetEnv()->CallVoidMethod(self, AwtDesktopProperties::setSoundPropertyID, key, event); @@ -805,9 +775,9 @@ void AwtDesktopProperties::SetSoundProperty(LPCTSTR propName, LPCTSTR winEventNa void AwtDesktopProperties::PlayWindowsSound(LPCTSTR event) { // stop any currently playing sounds - AwtWinMM::PlaySoundWrapper(NULL, NULL, SND_PURGE); + ::PlaySound(NULL, NULL, SND_PURGE); // play the sound for the given event name - AwtWinMM::PlaySoundWrapper(event, NULL, SND_ASYNC|SND_ALIAS|SND_NODEFAULT); + ::PlaySound(event, NULL, SND_ASYNC|SND_ALIAS|SND_NODEFAULT); } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -852,16 +822,6 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_WDesktopProperties_init(JNIEnv *env, jobject self) { TRY; - // Open shell32.dll, get the symbol for SHGetSettings - libShell32 = LoadLibrary(TEXT("shell32.dll")); - if (libShell32 == NULL) { - fn_SHGetSettings = NULL; - } - else { - fn_SHGetSettings = (SHGetSettingsType)GetProcAddress( - libShell32, "SHGetSettings"); - } - new AwtDesktopProperties(self); CATCH_BAD_ALLOC; diff --git a/jdk/src/windows/native/sun/windows/awt_Dialog.cpp b/jdk/src/windows/native/sun/windows/awt_Dialog.cpp index 948fc0883ed..ecf74549d46 100644 --- a/jdk/src/windows/native/sun/windows/awt_Dialog.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Dialog.cpp @@ -132,14 +132,13 @@ AwtDialog* AwtDialog::Create(jobject peer, jobject parent) dialog = new AwtDialog(); { - int colorId = IS_WIN4X ? COLOR_3DFACE : COLOR_WINDOW; + int colorId = COLOR_3DFACE; DWORD style = WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN; if (hwndParent != NULL) { style |= WS_POPUP; } style &= ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX); - DWORD exStyle = IS_WIN4X ? WS_EX_WINDOWEDGE | WS_EX_DLGMODALFRAME - : 0; + DWORD exStyle = WS_EX_WINDOWEDGE | WS_EX_DLGMODALFRAME; if (GetRTL()) { exStyle |= WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR; @@ -663,7 +662,7 @@ void AwtDialog::_SetIMMOption(void *param) int badAlloc = 0; LPCTSTR coption; - LPTSTR empty = TEXT("InputMethod"); + LPCTSTR empty = TEXT("InputMethod"); AwtDialog *d = NULL; PDATA pData; diff --git a/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp b/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp index 31ee7edcbe3..bb2ac566493 100644 --- a/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp +++ b/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include "jlong.h" #include "awt_DataTransferer.h" #include "awt_DnDDS.h" @@ -36,8 +37,6 @@ #include "sun_awt_dnd_SunDragSourceContextPeer.h" #include "sun_awt_windows_WDragSourceContextPeer.h" -#include -#include #include #include diff --git a/jdk/src/windows/native/sun/windows/awt_DnDDT.cpp b/jdk/src/windows/native/sun/windows/awt_DnDDT.cpp index 8940a30266a..fce80f468b2 100644 --- a/jdk/src/windows/native/sun/windows/awt_DnDDT.cpp +++ b/jdk/src/windows/native/sun/windows/awt_DnDDT.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,11 +30,8 @@ #include "awt_Toolkit.h" #include "java_awt_dnd_DnDConstants.h" #include "sun_awt_windows_WDropTargetContextPeer.h" -#include "awt_dlls.h" #include "awt_Container.h" -#include -#include #include #include @@ -555,8 +552,7 @@ jobject AwtDropTarget::GetData(jlong fmt) { break; } case TYMED_FILE: { - jobject local = JNU_NewStringPlatform(env, (LPCTSTR) - stgmedium.lpszFileName); + jobject local = JNU_NewStringPlatform(env, stgmedium.lpszFileName); jstring fileName = (jstring)env->NewGlobalRef(local); env->DeleteLocalRef(local); diff --git a/jdk/src/windows/native/sun/windows/awt_DrawingSurface.cpp b/jdk/src/windows/native/sun/windows/awt_DrawingSurface.cpp index d1ef0568494..b7b7913b780 100644 --- a/jdk/src/windows/native/sun/windows/awt_DrawingSurface.cpp +++ b/jdk/src/windows/native/sun/windows/awt_DrawingSurface.cpp @@ -24,6 +24,8 @@ */ #define _JNI_IMPLEMENTATION_ + +#include "awt.h" #include "awt_DrawingSurface.h" #include "awt_Component.h" diff --git a/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp b/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp index 08d839fc44f..84339e40eee 100644 --- a/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp +++ b/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ #include "awt_FileDialog.h" #include "awt_Dialog.h" #include "awt_Toolkit.h" -#include "awt_dlls.h" #include "ComCtl32Util.h" #include #include @@ -65,7 +64,7 @@ AwtFileDialog::Initialize(JNIEnv *env, jstring filterDescription) { int length = env->GetStringLength(filterDescription); DASSERT(length + 1 < MAX_FILTER_STRING); - LPCTSTR tmp = (LPTSTR)JNU_GetStringPlatformChars(env, filterDescription, NULL); + LPCTSTR tmp = JNU_GetStringPlatformChars(env, filterDescription, NULL); _tcscpy(s_fileFilterString, tmp); JNU_ReleaseStringPlatformChars(env, filterDescription, tmp); @@ -156,7 +155,7 @@ FileDialogHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) LPITEMIDLIST pidl = (LPITEMIDLIST)notifyEx->pidl; // Get the filename and directory TCHAR szPath[MAX_PATH]; - if (!get_path_from_idlist(pidl,szPath)) { + if (!::SHGetPathFromIDList(pidl, szPath)) { return TRUE; } jstring strPath = JNU_NewStringPlatform(env, szPath); @@ -190,7 +189,7 @@ AwtFileDialog::Show(void *p) WCHAR unicodeChar = L' '; LPTSTR fileBuffer = NULL; LPTSTR currentDirectory = NULL; - AWTOPENFILENAME ofn; + OPENFILENAME ofn; jint mode = 0; BOOL result = FALSE; DWORD dlgerr; @@ -222,7 +221,7 @@ AwtFileDialog::Show(void *p) HWND hwndOwner = awtParent ? awtParent->GetHWnd() : NULL; if (title == NULL || env->GetStringLength(title)==0) { - title = env->NewString(&unicodeChar, 1); + title = JNU_NewStringPlatform(env, &unicodeChar); } JavaStringBuffer titleBuffer(env, title); @@ -243,14 +242,7 @@ AwtFileDialog::Show(void *p) memset(&ofn, 0, sizeof(ofn)); - // According to the MSDN docs, lStructSize must be set to - // OPENFILENAME_SIZE_VERSION_400 on NT4.0. - if (IS_NT && !(IS_WIN2000)) { - ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400; - } - else { ofn.lStructSize = sizeof(ofn); - } ofn.lpstrFilter = s_fileFilterString; ofn.nFilterIndex = 1; /* @@ -289,9 +281,6 @@ AwtFileDialog::Show(void *p) mode = env->GetIntField(target, AwtFileDialog::modeID); - // Fix for 4364256 : call load_shell_procs() - load_shell_procs(); - AwtDialog::CheckInstallModalHook(); // show the Win32 file dialog @@ -304,7 +293,7 @@ AwtFileDialog::Show(void *p) // If the dialog is not shown because of invalid file name // replace the file name by empty string. if (!result) { - dlgerr = AwtCommDialog::CommDlgExtendedError(); + dlgerr = ::CommDlgExtendedError(); if (dlgerr == FNERR_INVALIDFILENAME) { _tcscpy(fileBuffer, TEXT("")); if (mode == java_awt_FileDialog_LOAD) { @@ -326,7 +315,7 @@ AwtFileDialog::Show(void *p) // Report result to peer. if (result) { jstring tmpJString = (_tcslen(ofn.lpstrFile) == 0 ? - env->NewStringUTF("") : + JNU_NewStringPlatform(env, L"") : JNU_NewStringPlatform(env, ofn.lpstrFile)); env->CallVoidMethod(peer, AwtFileDialog::handleSelectedMID, tmpJString); env->DeleteLocalRef(tmpJString); @@ -362,20 +351,18 @@ AwtFileDialog::Show(void *p) } BOOL -AwtFileDialog::GetOpenFileName(LPAWTOPENFILENAME data) { - AwtCommDialog::load_comdlg_procs(); +AwtFileDialog::GetOpenFileName(LPOPENFILENAME data) { return static_cast(reinterpret_cast( AwtToolkit::GetInstance().InvokeFunction((void*(*)(void*)) - AwtCommDialog::GetOpenFileNameWrapper, data))); + ::GetOpenFileName, data))); } BOOL -AwtFileDialog::GetSaveFileName(LPAWTOPENFILENAME data) { - AwtCommDialog::load_comdlg_procs(); +AwtFileDialog::GetSaveFileName(LPOPENFILENAME data) { return static_cast(reinterpret_cast( AwtToolkit::GetInstance().InvokeFunction((void *(*)(void *)) - AwtCommDialog::GetSaveFileNameWrapper, data))); + ::GetSaveFileName, data))); } diff --git a/jdk/src/windows/native/sun/windows/awt_FileDialog.h b/jdk/src/windows/native/sun/windows/awt_FileDialog.h index 9a324f68f34..82638d30752 100644 --- a/jdk/src/windows/native/sun/windows/awt_FileDialog.h +++ b/jdk/src/windows/native/sun/windows/awt_FileDialog.h @@ -1,5 +1,5 @@ /* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,43 +36,6 @@ #include "java_awt_FileDialog.h" #include "sun_awt_windows_WFileDialogPeer.h" -// The VC6 headers don't include this, but it's necessary for -// backward-compatibility with NT4.0, so we fake it. -#ifndef OPENFILENAME_SIZE_VERSION_400 - // Determined via sizeof(OPENFILENAME) - #define OPENFILENAME_SIZE_VERSION_400 76 -#endif - -// 4859390 -// For the Places Bar to show up, we need the "full" OPENFILENAME struct -typedef struct tagAWTOFN { - DWORD lStructSize; - HWND hwndOwner; - HINSTANCE hInstance; - LPCTSTR lpstrFilter; - LPTSTR lpstrCustomFilter; - DWORD nMaxCustFilter; - DWORD nFilterIndex; - LPTSTR lpstrFile; - DWORD nMaxFile; - LPTSTR lpstrFileTitle; - DWORD nMaxFileTitle; - LPCTSTR lpstrInitialDir; - LPCTSTR lpstrTitle; - DWORD Flags; - WORD nFileOffset; - WORD nFileExtension; - LPCTSTR lpstrDefExt; - LPARAM lCustData; - LPOFNHOOKPROC lpfnHook; - LPCTSTR lpTemplateName; -//#if (_WIN32_WINNT >= 0x0500) - void * pvReserved; - DWORD dwReserved; - DWORD FlagsEx; -//#endif // (_WIN32_WINNT >= 0x0500) -} AWTOPENFILENAME, *LPAWTOPENFILENAME; - /************************************************************************ * AwtFileDialog class */ @@ -96,8 +59,8 @@ public: static void Initialize(JNIEnv *env, jstring filterDescription); static void Show(void *peer); - static BOOL GetOpenFileName(LPAWTOPENFILENAME); - static BOOL GetSaveFileName(LPAWTOPENFILENAME); + static BOOL GetOpenFileName(LPOPENFILENAME); + static BOOL GetSaveFileName(LPOPENFILENAME); virtual BOOL InheritsNativeMouseWheelBehavior(); diff --git a/jdk/src/windows/native/sun/windows/awt_Font.cpp b/jdk/src/windows/native/sun/windows/awt_Font.cpp index 8dc9d5a67b5..6815b1afab1 100644 --- a/jdk/src/windows/native/sun/windows/awt_Font.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Font.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include #include "jlong.h" #include "awt_Font.h" @@ -195,7 +196,7 @@ AwtFont* AwtFont::GetFont(JNIEnv *env, jobject font, } // Get suitable CHARSET from charset string provided by font configuration. -static int GetNativeCharset(WCHAR* name) +static int GetNativeCharset(LPCWSTR name) { if (wcsstr(name, L"ANSI_CHARSET")) return ANSI_CHARSET; @@ -259,7 +260,7 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale) cfnum = 0; } - WCHAR* wName; + LPCWSTR wName; awtFont = new AwtFont(cfnum, env, font); @@ -269,9 +270,7 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale) if (cfnum > 0) { // Ask peer class for the text component font name jstring jTextComponentFontName = GetTextComponentFontName(env, font); - WCHAR* textComponentFontName = TO_WSTRING(jTextComponentFontName); - - env->DeleteLocalRef(jTextComponentFontName); + LPCWSTR textComponentFontName = JNU_GetStringPlatformChars(env, jTextComponentFontName, NULL); awtFont->m_textInput = -1; for (int i = 0; i < cfnum; i++) { @@ -282,13 +281,13 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale) jstring nativeName = (jstring)env->GetObjectField(fontDescriptor, AwtFont::nativeNameID); - wName = TO_WSTRING(nativeName); + wName = JNU_GetStringPlatformChars(env, nativeName, NULL); DASSERT(wName); //On NT platforms, if the font is not Symbol or Dingbats //use "W" version of Win32 APIs directly, info the FontDescription //no need to convert characters from Unicode to locale encodings. - if (IS_NT && GetNativeCharset(wName) != SYMBOL_CHARSET) { + if (GetNativeCharset(wName) != SYMBOL_CHARSET) { env->SetBooleanField(fontDescriptor, AwtFont::useUnicodeID, TRUE); } @@ -299,10 +298,12 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale) (wcscmp(wName, textComponentFontName) == 0)) { awtFont->m_textInput = i; } - HFONT hfonttmp = CreateHFont(wName, fontStyle, fontSize, + HFONT hfonttmp = CreateHFont(const_cast(wName), fontStyle, fontSize, angle, awScale); awtFont->m_hFont[i] = hfonttmp; + JNU_ReleaseStringPlatformChars(env, nativeName, wName); + env->DeleteLocalRef(fontDescriptor); env->DeleteLocalRef(nativeName); } @@ -311,11 +312,14 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale) // to first component awtFont->m_textInput = 0; } + + JNU_ReleaseStringPlatformChars(env, jTextComponentFontName, textComponentFontName); + env->DeleteLocalRef(jTextComponentFontName); } else { // Instantiation for English version. jstring fontName = (jstring)env->GetObjectField(font, AwtFont::nameID); - wName = TO_WSTRING(fontName); + wName = JNU_GetStringPlatformChars(env, fontName, NULL); WCHAR* wEName; if (!wcscmp(wName, L"Helvetica") || !wcscmp(wName, L"SansSerif")) { @@ -338,6 +342,9 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale) awtFont->m_textInput = 0; awtFont->m_hFont[0] = CreateHFont(wEName, fontStyle, fontSize, angle, awScale); + + JNU_ReleaseStringPlatformChars(env, fontName, wName); + env->DeleteLocalRef(fontName); } /* The several callers of this method also set the pData field. @@ -381,7 +388,7 @@ static void strip_tail(wchar_t* text, wchar_t* tail) { // strips tail and any po } -static HFONT CreateHFont_sub(WCHAR* name, int style, int height, +static HFONT CreateHFont_sub(LPCWSTR name, int style, int height, int angle=0, float awScale=1.0f) { LOGFONTW logFont; @@ -420,18 +427,7 @@ static HFONT CreateHFont_sub(WCHAR* name, int style, int height, strip_tail(tmpname,L"Italic"); strip_tail(tmpname,L"Bold"); wcscpy(&(logFont.lfFaceName[0]), tmpname); - HFONT hFont; - if (IS_WIN95) { -#ifdef WIN32 - DASSERT(IS_WIN95); -#endif - HDC hdc = ::GetDC(NULL); - ::EnumFontFamiliesEx(hdc, &logFont, (FONTENUMPROC)FindFamilyName, - (LPARAM)tmpname, 0L); - ::ReleaseDC(NULL, hdc); - wcscpy(&logFont.lfFaceName[0], tmpname); - } - hFont = ::CreateFontIndirectW(&logFont); + HFONT hFont = ::CreateFontIndirect(&logFont); DASSERT(hFont != NULL); // get a expanded or condensed version if its specified. if (awScale != 1.0f) { @@ -446,7 +442,7 @@ static HFONT CreateHFont_sub(WCHAR* name, int style, int height, } avgWidth = tm.tmAveCharWidth; logFont.lfWidth = (LONG)((fabs)(avgWidth*awScale)); - hFont = CreateFontIndirectW(&logFont); + hFont = ::CreateFontIndirect(&logFont); DASSERT(hFont != NULL); VERIFY(::ReleaseDC(0, hDC)); } @@ -460,15 +456,8 @@ HFONT AwtFont::CreateHFont(WCHAR* name, int style, int height, WCHAR longName[80]; // 80 > (max face name(=30) + strlen("CHINESEBIG5_CHARSET")) // longName doesn't have to be printable. So, it is OK not to convert. - if (IS_NT) { - //wsprintfW only works on NT. See bugid 4123362 - wsprintfW(longName, L"%ls-%d-%d", name, style, height); - } else { -#ifdef WIN32 - DASSERT(IS_WIN95); -#endif - swprintf(longName, L"%ls-%d-%d", name, style, height); - } + + wsprintf(longName, L"%ls-%d-%d", name, style, height); HFONT hFont = NULL; @@ -682,28 +671,16 @@ SIZE AwtFont::DrawStringSize_sub(jstring str, HDC hDC, if (arrayLength == 0) { int length = env->GetStringLength(str); - WCHAR* string = TO_WSTRING(str); + LPCWSTR strW = JNU_GetStringPlatformChars(env, str, NULL); VERIFY(::SelectObject(hDC, awtFont->GetHFont())); if (AwtComponent::GetRTLReadingOrder()){ - if (IS_WIN95) { - // Start of conversion Code to fix arabic shaping problems - // with unicode support in win 95 - LPSTR buffer = (LPSTR) alloca((wcslen(string) + 1) * 2); - int count = ::WideCharToMultiByte(codePage, 0, string, length, - buffer, - static_cast((wcslen(string) + 1) * 2), - NULL, NULL); - VERIFY(!draw || ::ExtTextOutA(hDC, x, y, ETO_RTLREADING, NULL, - buffer, count, NULL)); - // End Of Conversion Code - } else { - VERIFY(!draw || ::ExtTextOutW(hDC, x, y, ETO_RTLREADING, NULL, - string, length, NULL)); - } + VERIFY(!draw || ::ExtTextOut(hDC, x, y, ETO_RTLREADING, NULL, + strW, length, NULL)); } else { - VERIFY(!draw || ::TextOutW(hDC, x, y, string, length)); + VERIFY(!draw || ::TextOut(hDC, x, y, strW, length)); } - VERIFY(::GetTextExtentPoint32W(hDC, string, length, &size)); + VERIFY(::GetTextExtentPoint32(hDC, strW, length, &size)); + JNU_ReleaseStringPlatformChars(env, str, strW); } else { for (int i = 0; i < arrayLength; i = i + 2) { jobject fontDescriptor = env->GetObjectArrayElement(array, i); @@ -732,7 +709,7 @@ SIZE AwtFont::DrawStringSize_sub(jstring str, HDC hDC, * extend buflen and bad things will happen. */ unsigned char* buffer = NULL; - jboolean unicodeUsed = env->GetBooleanField(fontDescriptor,AwtFont::useUnicodeID); + jboolean unicodeUsed = env->GetBooleanField(fontDescriptor, AwtFont::useUnicodeID); try { buffer = (unsigned char *) env->GetPrimitiveArrayCritical(convertedBytes, 0); @@ -1231,7 +1208,7 @@ class CSegTableComponent public: CSegTableComponent(); virtual ~CSegTableComponent(); - virtual void Create(LPWSTR name); + virtual void Create(LPCWSTR name); virtual BOOL In(USHORT iChar) { DASSERT(FALSE); return FALSE; }; LPWSTR GetFontName(){ DASSERT(m_lpszFontName != NULL); return m_lpszFontName; @@ -1254,7 +1231,7 @@ CSegTableComponent::~CSegTableComponent() } } -void CSegTableComponent::Create(LPWSTR name) +void CSegTableComponent::Create(LPCWSTR name) { if (m_lpszFontName != NULL) { free(m_lpszFontName); @@ -1453,7 +1430,7 @@ public: CStdSegTable(); virtual ~CStdSegTable(); BOOL IsEUDC() { return FALSE; }; - virtual void Create(LPWSTR name); + virtual void Create(LPCWSTR name); protected: void GetData(DWORD dwOffset, LPVOID lpData, DWORD cbData); @@ -1481,7 +1458,7 @@ inline void CStdSegTable::GetData(DWORD dwOffset, DASSERT(nBytes != GDI_ERROR); } -void CStdSegTable::Create(LPWSTR name) +void CStdSegTable::Create(LPCWSTR name) { CSegTableComponent::Create(name); @@ -1509,7 +1486,7 @@ public: CEUDCSegTable(); virtual ~CEUDCSegTable(); BOOL IsEUDC() { return TRUE; }; - virtual void Create(LPWSTR name); + virtual void Create(LPCWSTR name); protected: void GetData(DWORD dwOffset, LPVOID lpData, DWORD cbData); @@ -1543,7 +1520,7 @@ inline void CEUDCSegTable::GetData(DWORD dwOffset, DASSERT(dwRead == cbData); } -void CEUDCSegTable::Create(LPWSTR name) +void CEUDCSegTable::Create(LPCWSTR name) { typedef struct tagHEAD{ FIXED sfnt_version; @@ -1564,19 +1541,8 @@ typedef struct tagENTRY{ // create EUDC font file and make EUDCSegTable // after wrapper function for CreateFileW, we use only CreateFileW - if (IS_NT) { - m_hTmpFile = ::CreateFileW(name, GENERIC_READ, - FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - } else { -#ifdef WIN32 - DASSERT(IS_WIN95); -#endif - char szFileName[_MAX_PATH]; - ::WideCharToMultiByte(CP_ACP, 0, name, -1, - szFileName, sizeof(szFileName), NULL, NULL); - m_hTmpFile = ::CreateFileA(szFileName, GENERIC_READ, - FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - } + m_hTmpFile = ::CreateFile(name, GENERIC_READ, + FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (m_hTmpFile == INVALID_HANDLE_VALUE){ m_hTmpFile = NULL; return; @@ -1654,10 +1620,10 @@ void CSegTableManagerComponent::MakeBiggerTable() class CSegTableManager : public CSegTableManagerComponent { public: - CSegTable* GetTable(LPWSTR lpszFontName, BOOL fEUDC); + CSegTable* GetTable(LPCWSTR lpszFontName, BOOL fEUDC); }; -CSegTable* CSegTableManager::GetTable(LPWSTR lpszFontName, BOOL fEUDC) +CSegTable* CSegTableManager::GetTable(LPCWSTR lpszFontName, BOOL fEUDC) { for (int i = 0; i < m_nTable; i++) { if ((((CSegTable*)m_tables[i])->IsEUDC() == fEUDC) && @@ -1685,7 +1651,7 @@ class CCombinedSegTable : public CSegTableComponent { public: CCombinedSegTable(); - void Create(LPWSTR name); + void Create(LPCWSTR name); BOOL In(USHORT iChar); private: @@ -1807,7 +1773,7 @@ void CCombinedSegTable::GetEUDCFileName(LPWSTR lpszFileName, int cchFileName) wcscpy(m_szDefaultEUDCFile, lpszFileName); } -void CCombinedSegTable::Create(LPWSTR name) +void CCombinedSegTable::Create(LPCWSTR name) { CSegTableComponent::Create(name); @@ -1840,10 +1806,10 @@ BOOL CCombinedSegTable::In(USHORT iChar) class CCombinedSegTableManager : public CSegTableManagerComponent { public: - CCombinedSegTable* GetTable(LPWSTR lpszFontName); + CCombinedSegTable* GetTable(LPCWSTR lpszFontName); }; -CCombinedSegTable* CCombinedSegTableManager::GetTable(LPWSTR lpszFontName) +CCombinedSegTable* CCombinedSegTableManager::GetTable(LPCWSTR lpszFontName) { for (int i = 0; i < m_nTable; i++) { if (wcscmp(m_tables[i]->GetFontName(),lpszFontName) == 0) @@ -1901,8 +1867,9 @@ Java_sun_awt_windows_WDefaultFontCharset_canConvert(JNIEnv *env, jobject self, jstring fontName = (jstring)env->GetObjectField(self, AwtFont::fontNameID); DASSERT(fontName != NULL); - LPWSTR fontNameWStr = TO_WSTRING(fontName); - CCombinedSegTable* pTable = tableManager.GetTable(fontNameWStr); + LPCWSTR fontNameW = JNU_GetStringPlatformChars(env, fontName, NULL); + CCombinedSegTable* pTable = tableManager.GetTable(fontNameW); + JNU_ReleaseStringPlatformChars(env, fontName, fontNameW); return (pTable->In((USHORT) ch) ? JNI_TRUE : JNI_FALSE); CATCH_BAD_ALLOC_RET(FALSE); diff --git a/jdk/src/windows/native/sun/windows/awt_Font.h b/jdk/src/windows/native/sun/windows/awt_Font.h index c1edd9d0eab..ac537a122b0 100644 --- a/jdk/src/windows/native/sun/windows/awt_Font.h +++ b/jdk/src/windows/native/sun/windows/awt_Font.h @@ -28,7 +28,6 @@ #include "awt.h" #include "awt_Object.h" -#include "awt_Unicode.h" #include "java_awt_Font.h" #include "sun_awt_windows_WFontMetrics.h" diff --git a/jdk/src/windows/native/sun/windows/awt_Frame.cpp b/jdk/src/windows/native/sun/windows/awt_Frame.cpp index 37e8546ed49..60738e69357 100644 --- a/jdk/src/windows/native/sun/windows/awt_Frame.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Frame.cpp @@ -1472,7 +1472,7 @@ void AwtFrame::_SetIMMOption(void *param) int badAlloc = 0; LPCTSTR coption; - LPTSTR empty = TEXT("InputMethod"); + LPCTSTR empty = TEXT("InputMethod"); AwtFrame *f = NULL; PDATA pData; diff --git a/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp b/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp index ff944b0e8e7..bd78cdaf3ef 100644 --- a/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp +++ b/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -580,18 +580,10 @@ HKL getDefaultKeyboardLayout() { DWORD cbHKL = 16; LPTSTR end; - if (IS_NT) { - ret = ::RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Preload"), NULL, KEY_READ, &hKey); - } else { - ret = ::RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("keyboard layout\\preload\\1"), NULL, KEY_READ, &hKey); - } + ret = ::RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Preload"), NULL, KEY_READ, &hKey); if (ret == ERROR_SUCCESS) { - if (IS_NT) { - ret = ::RegQueryValueEx(hKey, TEXT("1"), 0, 0, szHKL, &cbHKL); - } else { - ret = ::RegQueryValueEx(hKey, NULL, 0, 0, szHKL, &cbHKL); - } + ret = ::RegQueryValueEx(hKey, TEXT("1"), 0, 0, szHKL, &cbHKL); if (ret == ERROR_SUCCESS) { hkl = reinterpret_cast(static_cast( diff --git a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp index 82f54a4ead8..d904a5e9636 100644 --- a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp +++ b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,10 +22,9 @@ * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. */ -#include -#include -#include + #include "awt.h" +#include #include "awt_Component.h" #include "awt_InputTextInfor.h" @@ -91,12 +90,12 @@ AwtInputTextInfor::GetContextData(HIMC hIMC, const LPARAM flags) { LONG cbData[5] = {0}; LPVOID lpData[5] = {NULL}; for (int i = startIndex, j = 0; i <= endIndex; i++, j++) { - cbData[j] = ImmGetCompositionStringW(hIMC, GCS_INDEX[i], NULL, 0); + cbData[j] = ::ImmGetCompositionString(hIMC, GCS_INDEX[i], NULL, 0); if (cbData[j] == 0) { lpData[j] = NULL; } else { LPBYTE lpTemp = new BYTE[cbData[j]]; - cbData[j] = ImmGetCompositionStringW(hIMC, GCS_INDEX[i], lpTemp, cbData[j]); + cbData[j] = ::ImmGetCompositionString(hIMC, GCS_INDEX[i], lpTemp, cbData[j]); if (IMM_ERROR_GENERAL != cbData[j]) { lpData[j] = (LPVOID)lpTemp; } else { @@ -126,13 +125,13 @@ AwtInputTextInfor::GetContextData(HIMC hIMC, const LPARAM flags) { // Get the cursor position if (flags & GCS_COMPSTR) { - m_cursorPosW = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, + m_cursorPosW = ::ImmGetCompositionString(hIMC, GCS_CURSORPOS, NULL, 0); } JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); if (m_cStrW > 0) { - m_jtext = MakeJavaString(env, m_lpStrW, m_cStrW); + m_jtext = MakeJavaString(env, m_lpStrW); } // Merge the string if necessary @@ -183,11 +182,13 @@ AwtInputTextInfor::~AwtInputTextInfor() { } -jstring AwtInputTextInfor::MakeJavaString(JNIEnv* env, LPWSTR lpStrW, int cStrW) { +jstring AwtInputTextInfor::MakeJavaString(JNIEnv* env, LPWSTR lpStrW) { - if (env == NULL || lpStrW == NULL || cStrW == 0) return NULL; - - return env->NewString(lpStrW, cStrW); + if (env == NULL || lpStrW == NULL) { + return NULL; + } else { + return JNU_NewStringPlatform(env, lpStrW); + } } // @@ -232,7 +233,7 @@ int AwtInputTextInfor::GetClauseInfor(int*& lpBndClauseW, jstring*& lpReadingCla LCID lcJPN = MAKELCID(MAKELANGID(LANG_JAPANESE,SUBLANG_DEFAULT),SORT_DEFAULT); // Reading string is given in half width katakana in Japanese Windows // Convert it to full width katakana. - int cFWStrW = LCMapStringW( lcJPN, LCMAP_FULLWIDTH, lpHWStrW, cHWStrW, NULL, 0 ); + int cFWStrW = ::LCMapString(lcJPN, LCMAP_FULLWIDTH, lpHWStrW, cHWStrW, NULL, 0); LPWSTR lpFWStrW; try { lpFWStrW = new WCHAR[cFWStrW]; @@ -244,15 +245,15 @@ int AwtInputTextInfor::GetClauseInfor(int*& lpBndClauseW, jstring*& lpReadingCla throw; } - LCMapStringW( lcJPN, LCMAP_FULLWIDTH, lpHWStrW, cHWStrW, lpFWStrW, cFWStrW ); - readingClauseW[cls] = MakeJavaString(env, lpFWStrW, cFWStrW); + ::LCMapString(lcJPN, LCMAP_FULLWIDTH, lpHWStrW, cHWStrW, lpFWStrW, cFWStrW); + readingClauseW[cls] = MakeJavaString(env, lpFWStrW); delete [] lpFWStrW; } else { - readingClauseW[cls] = MakeJavaString(env, lpHWStrW, cHWStrW); + readingClauseW[cls] = MakeJavaString(env, lpHWStrW); } } else { - readingClauseW[cls] = MakeJavaString(env, (LPWSTR)NULL, 0); + readingClauseW[cls] = MakeJavaString(env, (LPWSTR)NULL); } } diff --git a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h index 4244fcf8b5d..13626e78b48 100644 --- a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h +++ b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h @@ -58,7 +58,7 @@ class AwtInputTextInfor { ~AwtInputTextInfor(); private: /* helper function to return a java string.*/ - static jstring MakeJavaString(JNIEnv* env, LPWSTR lpStrW, int cStrW); + static jstring MakeJavaString(JNIEnv* env, LPWSTR lpStrW); LPARAM m_flags; /* The message LPARAM. */ diff --git a/jdk/src/windows/native/sun/windows/awt_List.cpp b/jdk/src/windows/native/sun/windows/awt_List.cpp index 9000aaa685a..20844de7875 100644 --- a/jdk/src/windows/native/sun/windows/awt_List.cpp +++ b/jdk/src/windows/native/sun/windows/awt_List.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ #include "awt_KeyboardFocusManager.h" #include "awt_Canvas.h" #include "awt_Dimension.h" -#include "awt_Unicode.h" #include "awt_Toolkit.h" #include "awt_Window.h" @@ -112,9 +111,8 @@ AwtList* AwtList::Create(jobject peer, jobject parent) DWORD wrapExStyle = 0; DWORD style = WS_CHILD | WS_CLIPSIBLINGS | WS_VSCROLL | WS_HSCROLL | - LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | LBS_OWNERDRAWFIXED | - (IS_WIN4X ? 0 : WS_BORDER); - DWORD exStyle = IS_WIN4X ? WS_EX_CLIENTEDGE : 0; + LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | LBS_OWNERDRAWFIXED; + DWORD exStyle = WS_EX_CLIENTEDGE; /* * NOTE: WS_VISIBLE is always set for the listbox. Listbox @@ -571,10 +569,10 @@ MsgRouting AwtList::HandleEvent(MSG *msg, BOOL synthetic) // operate WM_PRINT to be compatible with the "smooth scrolling" feature. MsgRouting AwtList::WmPrint(HDC hDC, LPARAM flags) { - if (!isWrapperPrint && IS_WIN4X - && (flags & PRF_CLIENT) - && (GetStyleEx() & WS_EX_CLIENTEDGE)) { - + if (!isWrapperPrint && + (flags & PRF_CLIENT) && + (GetStyleEx() & WS_EX_CLIENTEDGE)) + { int nOriginalDC = ::SaveDC(hDC); DASSERT(nOriginalDC != 0); // Save a copy of the DC for WmPrintClient diff --git a/jdk/src/windows/native/sun/windows/awt_MMStub.cpp b/jdk/src/windows/native/sun/windows/awt_MMStub.cpp deleted file mode 100644 index 675f48e784b..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_MMStub.cpp +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#include "awt_MMStub.h" - -//--------------------------------------------------------------------------- -// Basic API -//--------------------------------------------------------------------------- - -int (WINAPI* g_pfnGetSystemMetrics) (int); -MHND (WINAPI* g_pfnMonitorFromWindow) (HWND,BOOL); -MHND (WINAPI* g_pfnMonitorFromRect) (LPCRECT,BOOL); -MHND (WINAPI* g_pfnMonitorFromPoint) (POINT,BOOL); -BOOL (WINAPI* g_pfnGetMonitorInfo) (MHND,PMONITOR_INFO); -BOOL (WINAPI* g_pfnEnumDisplayMonitors) (HDC,LPCRECT,MON_ENUM_CALLBACK_PROC,LPARAM); -BOOL (WINAPI* g_pfnEnumDisplayDevices) (LPVOID,int,P_DISPLAY_DEVICE,DWORD); - -BOOL __initMultipleMonitorStubs(void); -BOOL __initMultipleMonitorStubs(void) -{ - static BOOL fInitDone; - HMODULE hUser32; - HMODULE hUnicows = UnicowsLoader::GetModuleHandle(); - BOOL retCode = FALSE; - - if (fInitDone) - { - retCode = g_pfnGetMonitorInfo != NULL; - goto _RET_; - } - - if ((hUser32 = GetModuleHandle(TEXT("USER32"))) && - (*(FARPROC*)&g_pfnGetSystemMetrics = GetProcAddress(hUser32,"GetSystemMetrics")) && - (*(FARPROC*)&g_pfnMonitorFromWindow = GetProcAddress(hUser32,"MonitorFromWindow")) && - (*(FARPROC*)&g_pfnMonitorFromRect = GetProcAddress(hUser32,"MonitorFromRect")) && - (*(FARPROC*)&g_pfnMonitorFromPoint = GetProcAddress(hUser32,"MonitorFromPoint")) && - (*(FARPROC*)&g_pfnEnumDisplayMonitors = GetProcAddress(hUser32,"EnumDisplayMonitors")) && - (*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(IS_WIN95 ? hUnicows : hUser32,"GetMonitorInfoW")) && - (*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(IS_WIN95 ? hUnicows : hUser32,"EnumDisplayDevicesW")) && - (GetSystemMetrics(SM_CXVSCREEN) >= GetSystemMetrics(SM_CXSCREEN)) && - (GetSystemMetrics(SM_CYVSCREEN) >= GetSystemMetrics(SM_CYSCREEN)) ) - { - fInitDone = TRUE; - retCode = TRUE; - goto _RET_; - } - g_pfnGetSystemMetrics = NULL; - g_pfnMonitorFromWindow = NULL; - g_pfnMonitorFromRect = NULL; - g_pfnMonitorFromPoint = NULL; - g_pfnGetMonitorInfo = NULL; - g_pfnEnumDisplayMonitors = NULL; - g_pfnEnumDisplayDevices = NULL; - - fInitDone = TRUE; - retCode = FALSE; - -_RET_: - return retCode; -} - -int WINAPI _getSystemMetrics(int nCode) -{ - int retCode; - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnGetSystemMetrics(nCode); - goto _RET_; - } - - switch( nCode ) - { - case SM_CMONITORS: - case SM_SAMEDSPLFORMAT: - return 1; - - case SM_XVSCREEN: - case SM_YVSCREEN: - return 0; - - case SM_CXVSCREEN: - nCode = SM_CXSCREEN; - break; - - case SM_CYVSCREEN: - nCode = SM_CYSCREEN; - break; - } - - retCode = GetSystemMetrics(nCode); -_RET_: - return retCode; -} - - -MHND WINAPI _monitorFromRect(LPCRECT prScreen, UINT nFlags) -{ - MHND retCode = NULL; - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnMonitorFromRect(prScreen, nFlags); - goto _RET_; - } - - if( (prScreen->right < 0) || (prScreen->bottom < 0) ) - { - goto _RET_; - } - { - POINT pP = {0,0}; - - pP.x = prScreen->left; - pP.y = prScreen->top; - - retCode = _monitorFromPoint(pP,nFlags); - } - -_RET_: - return retCode; -} - -MHND WINAPI _monitorFromWindow(HWND hwProbe, UINT nFlags) -{ - RECT rR; - MHND retCode = NULL; - - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnMonitorFromWindow(hwProbe, nFlags); - goto _RET_; - } - - if( nFlags & (MONITOR_DEFAULT_TO_PRIMARY | MONITOR_DEFAULT_TO_NEAR) ) - { - retCode = PRIMARY_MONITOR; - goto _RET_; - } - - if( GetWindowRect(hwProbe, &rR) ) - { - retCode = _monitorFromRect(&rR, nFlags); - goto _RET_; - } - -_RET_: - return retCode; -} - -MHND WINAPI _monitorFromPoint(POINT ptProbe, UINT nFlags) -{ - MHND retCode = NULL; - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnMonitorFromPoint(ptProbe,nFlags); - goto _RET_; - } - - if( nFlags & (MONITOR_DEFAULT_TO_PRIMARY | MONITOR_DEFAULT_TO_NEAR) ) - { - goto _ASSIGN_; - } - - if( (ptProbe.x <= 0) || (ptProbe.x > GetSystemMetrics(SM_CXSCREEN)) ) - { - goto _RET_; - } - - if( (ptProbe.y <= 0) || (ptProbe.y < GetSystemMetrics(SM_CYSCREEN)) ) - { - goto _RET_; - } -_ASSIGN_: - retCode = PRIMARY_MONITOR; - -_RET_: - return retCode; -} - -BOOL WINAPI _getMonitorInfo(MHND mhMon, PMONITOR_INFO pmMonInfo) -{ - RECT rArea; - BOOL retCode = FALSE; - - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnGetMonitorInfo(mhMon, pmMonInfo); - goto _RET_; - } - - if( mhMon != PRIMARY_MONITOR ) - { - goto _RET_; - } - - if( NULL == pmMonInfo ) - { - goto _RET_; - } - - if( FALSE == SystemParametersInfo(SPI_GETWORKAREA,0,&rArea,0) ) - { - goto _RET_; - } - - if( pmMonInfo->dwSize >= sizeof(MONITOR_INFO) ) - { - pmMonInfo->rMonitor.left = 0; - pmMonInfo->rMonitor.top = 0; - pmMonInfo->rMonitor.right = GetSystemMetrics(SM_CXSCREEN); - pmMonInfo->rMonitor.bottom = GetSystemMetrics(SM_CYSCREEN); - pmMonInfo->rWork = rArea; - pmMonInfo->dwFlags = MONITOR_INFO_FLAG_PRIMARY; - - if( pmMonInfo->dwSize >= sizeof(MONITOR_INFO_EXTENDED)) - { - lstrcpy(((PMONITOR_INFO_EXTENDED)pmMonInfo)->strDevice, - TEXT("DISPLAY") ); - } - - retCode = TRUE; - } - -_RET_: - return retCode; -} - -BOOL WINAPI _enumDisplayMonitors( - HDC hDC,LPCRECT lrcSect, - MON_ENUM_CALLBACK_PROC lpfnEnumProc, - LPARAM lData - ) -{ - BOOL retCode = FALSE; - RECT rToPass = {0,0,0,0}; - RECT rBorder = {0,0,0,0}; - - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnEnumDisplayMonitors ( - hDC, lrcSect, - lpfnEnumProc,lData - ); - goto _RET_; - } - - if( !lpfnEnumProc ) - { - goto _RET_; - } - - rBorder.left = 0; - rBorder.top = 0; - rBorder.right = GetSystemMetrics(SM_CXSCREEN); - rBorder.bottom = GetSystemMetrics(SM_CYSCREEN); - - if( hDC ) - { - RECT rSect = {0,0,0,0}; - HWND hWnd = NULL; - - if( NULL == (hWnd = WindowFromDC(hDC)) ) - { - goto _RET_; - } - - switch( GetClipBox(hDC,&rSect) ) - { - case NULLREGION: - goto _ASSIGN_; - case ERROR: - goto _RET_; - default: - MapWindowPoints(NULL, hWnd, (LPPOINT)&rBorder, 2); - if( TRUE == IntersectRect(&rToPass,&rSect,&rBorder) ) - { - break; - } - } - - rBorder = rToPass; - } - - if( (NULL == lrcSect) || (TRUE == IntersectRect(&rToPass,lrcSect,&rBorder)) ) - { - lpfnEnumProc(PRIMARY_MONITOR,hDC,&rToPass,lData); - } -_ASSIGN_: - retCode = TRUE; -_RET_: - return retCode; -} - -BOOL WINAPI _enumDisplayDevices ( - LPVOID lpReserved, int iDeviceNum, - _DISPLAY_DEVICE * pDisplayDevice, DWORD dwFlags - ) -{ - BOOL retCode = FALSE; - if( __initMultipleMonitorStubs() ) - { - retCode = g_pfnEnumDisplayDevices(lpReserved,iDeviceNum,pDisplayDevice,dwFlags); - } - - return retCode; -} - - -//--------------------------------------------------------------------------- -// Extended API. -//--------------------------------------------------------------------------- -// Globais -int g_nMonitorCounter; -int g_nMonitorLimit; -MHND* g_hmpMonitors; -// Callbacks -BOOL WINAPI clb_fCountMonitors(MHND,HDC,LPRECT,LPARAM); -BOOL WINAPI clb_fCountMonitors(MHND hMon,HDC hDC,LPRECT rRect,LPARAM lP) -{ - g_nMonitorCounter ++; - return TRUE; -} -BOOL WINAPI clb_fCollectMonitors(MHND,HDC,LPRECT,LPARAM); -BOOL WINAPI clb_fCollectMonitors(MHND hMon,HDC hDC,LPRECT rRect,LPARAM lP) -{ - - if( (g_nMonitorCounter < g_nMonitorLimit) && (NULL != g_hmpMonitors) ) - { - g_hmpMonitors[g_nMonitorCounter] = hMon; - g_nMonitorCounter ++; - } - - return TRUE; -} -// Tools -void __normaRectPos(RECT*,RECT,RECT); -HWND __createWindow0(MHND,LPCTSTR,LPCTSTR,DWORD,int,int,int,int,HWND,HMENU,HANDLE,LPVOID); -HWND __createWindow1(MHND,LPCTSTR,LPCTSTR,DWORD,int,int,int,int,HWND,HMENU,HANDLE,LPVOID); -void __normaRectPos(RECT* rDest,RECT rSrc,RECT rNorma) -{ - int nDX = rSrc.right - rSrc.left; - int nDY = rSrc.bottom - rSrc.top; - - rDest->left = rSrc.left + rNorma.left; - rDest->top = rSrc.top + rNorma.top; - - rDest->right = rDest->left + nDX; - rDest->bottom = rDest->top + nDY; -} -HWND __createWindow0( MHND hmMonitor,LPCTSTR lpClassName,LPCTSTR lpWindowName, - DWORD dwStyle,int x,int y,int nWidth, - int nHeight,HWND hWndParent,HMENU hMenu, - HANDLE hInstance,LPVOID lpParam ) -{ - HWND retCode = NULL; - - if( (NULL != hmMonitor) && (NULL != lpClassName) && - (NULL != lpWindowName) && (NULL != hInstance) ) - { - RECT rRW = {0,0,0,0}; - RECT rRM = {0,0,0,0}; - RECT rSect = {0,0,0,0}; - - SetRect(&rRW,x,y,x+nWidth,y+nHeight); - - if( TRUE == _monitorBounds(hmMonitor,&rRM) ) - { - __normaRectPos(&rRW,rRW,rRM); - - IntersectRect(&rSect,&rRM,&rRW); - - if( TRUE == EqualRect(&rSect,&rRW) ) - { - x = rSect.left; - y = rSect.top; - nWidth = rSect.right - rSect.left; - nHeight = rSect.bottom - rSect.top; - retCode = CreateWindow( - lpClassName,lpWindowName, - dwStyle,x,y,nWidth, - nHeight,hWndParent,hMenu, - (HINSTANCE)hInstance,lpParam - ); - } else { - // A coisa indefinida. Nao tenho sabdoria o que - // fazer aqui mesmo - // E necessario perguntar Jeannette - } - } - } - - return retCode; -} -HWND __createWindow1( MHND hmMonitor,LPCTSTR lpClassName,LPCTSTR lpWindowName, - DWORD dwStyle,int x,int y,int nWidth, - int nHeight,HWND hWndParent,HMENU hMenu, - HANDLE hInstance,LPVOID lpParam ) -{ - HWND retCode = NULL; - - if( (NULL != hmMonitor) && (NULL != lpClassName) && - (NULL != lpWindowName) && (NULL != hInstance) ) - { - RECT rRM = {0,0,0,0}; - - if( TRUE == _monitorBounds(hmMonitor,&rRM) ) - { - HWND wW = NULL; - BOOL wasVisible = (0 != (dwStyle & WS_VISIBLE)); - - if( TRUE == wasVisible ) - { - dwStyle &= ~WS_VISIBLE; - } - - if( NULL != (wW = CreateWindow( - lpClassName,lpWindowName, - dwStyle,x,y,nWidth, - nHeight,hWndParent,hMenu, - (HINSTANCE)hInstance,lpParam - )) ) - { - RECT rRW = {0,0,0,0}; - RECT rSect = {0,0,0,0}; - - GetWindowRect(wW,&rRW); - - __normaRectPos(&rRW,rRW,rRM); - - IntersectRect(&rSect,&rRM,&rRW); - - if( TRUE == EqualRect(&rSect,&rRW) ) - { - x = rSect.left; - y = rSect.top; - nWidth = rSect.right - rSect.left; - nHeight = rSect.bottom - rSect.top; - - MoveWindow(wW,x,y,nWidth,nHeight,FALSE); - - if( TRUE == wasVisible ) - { - UpdateWindow(wW); - ShowWindow(wW,SW_SHOW); - } - - retCode = wW; - } else { - // A coisa indefinida. Nao sei o que - // fazer aqui. E necessario perguntar Jeannette - DestroyWindow(wW); - } - } - } - } - - return retCode; -} - -// Implementations -int WINAPI _countMonitors(void) -{ - g_nMonitorCounter = 0; - - _enumDisplayMonitors(NULL,NULL,clb_fCountMonitors,0L); - - return g_nMonitorCounter; - -} -int WINAPI _collectMonitors(MHND* hmpMonitors,int nNum) -{ - int retCode = 0; - - if( NULL != hmpMonitors ) - { - g_nMonitorCounter = 0; - g_nMonitorLimit = nNum; - g_hmpMonitors = hmpMonitors; - - _enumDisplayMonitors(NULL,NULL,clb_fCollectMonitors,0L); - - retCode = g_nMonitorCounter; - - g_nMonitorCounter = 0; - g_nMonitorLimit = 0; - g_hmpMonitors = NULL; - - } - return retCode; -} -BOOL WINAPI _monitorBounds(MHND hmMonitor,RECT* rpBounds) -{ - BOOL retCode = FALSE; - - if( (NULL != hmMonitor) && (NULL != rpBounds) ) - { - MONITOR_INFO miInfo; - - memset((void*)(&miInfo),0,sizeof(MONITOR_INFO)); - miInfo.dwSize = sizeof(MONITOR_INFO); - - if( TRUE == (retCode = _getMonitorInfo(hmMonitor,&(miInfo))) ) - { - (*rpBounds) = miInfo.rMonitor; - } - } - return retCode; -} - -HDC WINAPI _makeDCFromMonitor(MHND hmMonitor) { - HDC retCode = NULL; - - if( NULL != hmMonitor ) { - - MONITOR_INFO_EXTENDED mieInfo; - - memset((void*)(&mieInfo),0,sizeof(MONITOR_INFO_EXTENDED)); - mieInfo.dwSize = sizeof(MONITOR_INFO_EXTENDED); - - if( TRUE == _getMonitorInfo(hmMonitor,(PMONITOR_INFO)(&mieInfo)) ) { - HDC hDC = CreateDC(mieInfo.strDevice,NULL,NULL,NULL); - - if( NULL != hDC ) { - retCode = hDC; - } - } - } - return retCode; -} - -HWND WINAPI _createWindowOM( MHND hmMonitor,LPCTSTR lpClassName,LPCTSTR lpWindowName, - DWORD dwStyle,int x,int y,int nWidth, - int nHeight,HWND hWndParent,HMENU hMenu, - HANDLE hInstance,LPVOID lpParam ) -{ - if( (CW_USEDEFAULT == x) || (CW_USEDEFAULT == y) || - (CW_USEDEFAULT == nWidth) || (CW_USEDEFAULT == nHeight) ) - { - return __createWindow1 ( - hmMonitor,lpClassName,lpWindowName, - dwStyle,x,y,nWidth, - nHeight,hWndParent,hMenu, - hInstance,lpParam - ); - } - return __createWindow0 ( - hmMonitor,lpClassName,lpWindowName, - dwStyle,x,y,nWidth, - nHeight,hWndParent,hMenu, - hInstance,lpParam - ); -} diff --git a/jdk/src/windows/native/sun/windows/awt_MMStub.h b/jdk/src/windows/native/sun/windows/awt_MMStub.h deleted file mode 100644 index ec73dd74f37..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_MMStub.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ -#ifndef _INC_MMSTUB -#define _INC_MMSTUB - -#ifndef _WINDOWS_ -#include "windows.h" -#endif - -#ifndef _AWT_H_ -#include "awt.h" -#endif - -#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500) - -/* Cdecl for C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Constants */ -#define SM_XVSCREEN 76 -#define SM_YVSCREEN 77 -#define SM_CXVSCREEN 78 -#define SM_CYVSCREEN 79 -#define SM_CMONITORS 80 -#define SM_SAMEDSPLFORMAT 81 - -#define MONITOR_DEFAULT_TO_NULL 0x00000000 -#define MONITOR_DEFAULT_TO_PRIMARY 0x00000001 -#define MONITOR_DEFAULT_TO_NEAR 0x00000002 - - - -#define MONITOR_INFO_FLAG_PRIMARY 0x00000001 - -#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 -#define DISPLAY_DEVICE_MULTY_DRIVER 0x00000002 -#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004 -#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008 - - -#define DISPLAY_DEVICE_VGA 0x00000010 - -#define ENUM_CURRENT_SETTINGS ((DWORD)-1) -#define ENUM_REGISTRY_SETTINGS ((DWORD)-2) - -#define PRIMARY_MONITOR ((MHND)0x42) - - -#define DEV_NAME_LEN 32 -#define DEV_STR_LEN 128 - - -// Datatypes -typedef HANDLE MHND; -typedef BOOL (CALLBACK* MON_ENUM_CALLBACK_PROC)(MHND,HDC,LPRECT,LPARAM); - -typedef struct tagMONITOR_INFO -{ - DWORD dwSize; - RECT rMonitor; - RECT rWork; - DWORD dwFlags; -} MONITOR_INFO, *PMONITOR_INFO; - -typedef struct tagMONITOR_INFO_EXTENDED -{ - DWORD dwSize; - RECT rMonitor; - RECT rWork; - DWORD dwFlags; - TCHAR strDevice[DEV_NAME_LEN]; -} MONITOR_INFO_EXTENDED, *PMONITOR_INFO_EXTENDED; - -typedef struct tagDISPLAY_DEVICE -{ - DWORD dwSize; - WCHAR strDevName[DEV_NAME_LEN]; - WCHAR strDevString[DEV_STR_LEN]; - DWORD dwFlags; - WCHAR deviceID[128]; - WCHAR deviceKey[128]; -} _DISPLAY_DEVICE, *P_DISPLAY_DEVICE; - -/* Basic API's */ -BOOL WINAPI _enumDisplayMonitors(HDC,LPCRECT,MON_ENUM_CALLBACK_PROC,LPARAM); -BOOL WINAPI _enumDisplayDevices (LPVOID,int,P_DISPLAY_DEVICE,DWORD); -BOOL WINAPI _getMonitorInfo (MHND,PMONITOR_INFO); -MHND WINAPI _monitorFromPoint (POINT,UINT); -MHND WINAPI _monitorFromWindow (HWND,UINT); -MHND WINAPI _monitorFromRect (LPCRECT,UINT); -int WINAPI _getSystemMetrics (int); - -/* Additional API's */ -int WINAPI _countMonitors (void); -int WINAPI _collectMonitors (MHND*,int); -BOOL WINAPI _monitorBounds (MHND,RECT*); -HDC WINAPI _makeDCFromMonitor (MHND); -HWND WINAPI _createWindowOM (MHND,LPCTSTR,LPCTSTR,DWORD,int,int,int, - int,HWND,HMENU,HANDLE,LPVOID); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500) */ - -#endif /* _INC_MMSTUB */ diff --git a/jdk/src/windows/native/sun/windows/awt_MenuItem.cpp b/jdk/src/windows/native/sun/windows/awt_MenuItem.cpp index 626b3a31368..51fc47718cb 100644 --- a/jdk/src/windows/native/sun/windows/awt_MenuItem.cpp +++ b/jdk/src/windows/native/sun/windows/awt_MenuItem.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include "awt_MenuItem.h" #include "awt_Menu.h" #include "awt_MenuBar.h" @@ -70,7 +71,6 @@ jmethodID AwtMenuItem::getDefaultFontMID; LANGID AwtMenuItem::m_idLang = LOWORD(GetKeyboardLayout(0)); UINT AwtMenuItem::m_CodePage = AwtMenuItem::LangToCodePage(AwtMenuItem::m_idLang); -BOOL AwtMenuItem::m_isWin95 = IS_WIN95; BOOL AwtMenuItem::sm_rtl = PRIMARYLANGID(GetInputLanguage()) == LANG_ARABIC || PRIMARYLANGID(GetInputLanguage()) == LANG_HEBREW; BOOL AwtMenuItem::sm_rtlReadingOrder = @@ -150,7 +150,7 @@ BOOL AwtMenuItem::CheckMenuCreation(JNIEnv *env, jobject self, HMENU hMenu) jobject createError = NULL; if (dw == ERROR_OUTOFMEMORY) { - jstring errorMsg = env->NewStringUTF("too many menu handles"); + jstring errorMsg = JNU_NewStringPlatform(env, L"too many menu handles"); createError = JNU_NewObjectByName(env, "java/lang/OutOfMemoryError", "(Ljava/lang/String;)V", errorMsg); @@ -435,16 +435,7 @@ void AwtMenuItem::DrawItem(DRAWITEMSTRUCT& drawInfo) if (drawInfo.itemID != m_Id) return; - /* Fixed bug 4349969. Since the problem occurs on Windows 98 and not on - Windows NT, the fix is to check for Windows 95/98 and to check if the - handle to the menu of the item to be drawn is the same as the handle to the - menu of the menu object. If they're not the same, just return and don't do - the drawing. - */ - if ( IS_WIN95 && drawInfo.hwndItem != (HWND)this->m_menuContainer->GetHMenu()) { - return; - } else - DrawSelf(drawInfo); + DrawSelf(drawInfo); } void AwtMenuItem::MeasureSelf(HDC hDC, MEASUREITEMSTRUCT& measureInfo) @@ -802,8 +793,9 @@ BOOL AwtMenuItem::IsSeparator() { jobject jitem = GetTarget(env); jstring label = (jstring)(env)->GetObjectField(jitem, AwtMenuItem::labelID); - LPWSTR labelW = TO_WSTRING(label); + LPCWSTR labelW = JNU_GetStringPlatformChars(env, label, NULL); BOOL isSeparator = (labelW && (wcscmp(labelW, L"-") == 0)); + JNU_ReleaseStringPlatformChars(env, label, labelW); env->DeleteLocalRef(label); env->DeleteLocalRef(jitem); diff --git a/jdk/src/windows/native/sun/windows/awt_Multimon.h b/jdk/src/windows/native/sun/windows/awt_Multimon.h deleted file mode 100644 index f2b371e3499..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_Multimon.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ -#ifndef _INC_MULTIMON_ -#define _INC_MULTIMON_ -#endif -// -// build defines that replace the regular APIs with our versions -// -#undef GetMonitorInfo -#undef GetSystemMetrics -#undef MonitorFromWindow -#undef MonitorFromRect -#undef MonitorFromPoint -#undef EnumDisplayMonitors -#undef EnumDisplayDevices - -#include "awt_MMStub.h" - -#define GetSystemMetricsMM _getSystemMetrics -#define MonitorFromWindow _monitorFromWindow -#define MonitorFromRect _monitorFromRect -#define MonitorFromPoint _monitorFromPoint -#define GetMonitorInfo _getMonitorInfo -#define EnumDisplayMonitors _enumDisplayMonitors -#define EnumDisplayDevices _enumDisplayDevices - - -#define CountMonitors _countMonitors -#define CollectMonitors _collectMonitors -#define MonitorBounds _monitorBounds -#define MakeDCFromMonitor _makeDCFromMonitor -#define CreateWindowOnMonitor _createWindowOM diff --git a/jdk/src/windows/native/sun/windows/awt_Object.cpp b/jdk/src/windows/native/sun/windows/awt_Object.cpp index aab7e98b502..b6b999be2a7 100644 --- a/jdk/src/windows/native/sun/windows/awt_Object.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Object.cpp @@ -25,9 +25,6 @@ #include "awt_Object.h" #include "ObjectList.h" -#ifdef DEBUG -#include "awt_Unicode.h" -#endif #ifdef DEBUG static BOOL reportEvents = FALSE; @@ -116,8 +113,9 @@ AwtObject::DoCallback(const char* methodName, const char* methodSig, ...) "getName", "()Ljava/lang/String;").l; DASSERT(!safe_ExceptionOccurred(env)); - printf("Posting %s%s method to %S\n", methodName, methodSig, - TO_WSTRING(targetStr)); + LPCWSTR targetStrW = JNU_GetStringPlatformChars(env, targetStr, NULL); + printf("Posting %s%s method to %S\n", methodName, methodSig, targetStrW); + JNU_ReleaseStringPlatformChars(env, targetStr, targetStrW); } #endif /* caching would do much good here */ @@ -148,8 +146,11 @@ void AwtObject::SendEvent(jobject event) (jstring)JNU_CallMethodByName(env, NULL, GetTarget(env),"getName", "()Ljava/lang/String;").l; DASSERT(!safe_ExceptionOccurred(env)); - printf("Posting %S to %S\n", TO_WSTRING(eventStr), - TO_WSTRING(targetStr)); + LPCWSTR eventStrW = JNU_GetStringPlatformChars(env, eventStr, NULL); + LPCWSTR targetStrW = JNU_GetStringPlatformChars(env, targetStr, NULL); + printf("Posting %S to %S\n", eventStrW, targetStrW); + JNU_ReleaseStringPlatformChars(env, eventStr, eventStrW); + JNU_ReleaseStringPlatformChars(env, targetStr, targetStrW); } #endif /* Post event to the system EventQueue. */ diff --git a/jdk/src/windows/native/sun/windows/awt_Palette.cpp b/jdk/src/windows/native/sun/windows/awt_Palette.cpp index ea0488e816f..a567c246d86 100644 --- a/jdk/src/windows/native/sun/windows/awt_Palette.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Palette.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ * have any questions. */ -#include +#include "awt.h" #include "awt_Palette.h" #include "awt_Component.h" #include "img_util_md.h" diff --git a/jdk/src/windows/native/sun/windows/awt_PopupMenu.cpp b/jdk/src/windows/native/sun/windows/awt_PopupMenu.cpp index 8862b86bda7..794277eda24 100644 --- a/jdk/src/windows/native/sun/windows/awt_PopupMenu.cpp +++ b/jdk/src/windows/native/sun/windows/awt_PopupMenu.cpp @@ -234,11 +234,13 @@ void AwtPopupMenu::Enable(BOOL isEnabled) jobject jitem = item->GetTarget(env); BOOL bItemEnabled = isEnabled && (jboolean)env->GetBooleanField(jitem, AwtMenuItem::enabledID); - LPWSTR labelW = TO_WSTRING((jstring)env->GetObjectField(jitem, - AwtMenuItem::labelID)); - if (labelW != NULL && wcscmp(labelW,L"-") != 0) { + jstring labelStr = static_cast(env->GetObjectField(jitem, AwtMenuItem::labelID)); + LPCWSTR labelStrW = JNU_GetStringPlatformChars(env, labelStr, NULL); + if (labelStrW && wcscmp(labelStrW, L"-") != 0) { item->Enable(bItemEnabled); } + JNU_ReleaseStringPlatformChars(env, labelStr, labelStrW); + env->DeleteLocalRef(labelStr); env->DeleteLocalRef(jitem); } env->DeleteLocalRef(target); diff --git a/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp b/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp index 486d9f66950..cc562ec0056 100644 --- a/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp +++ b/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -108,16 +108,13 @@ BOOL AwtPrintControl::FindPrinter(jstring printerName, LPBYTE pPrinterEnum, { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); - BOOL nt = IS_NT; DWORD cReturned = 0; if (pPrinterEnum == NULL) { // Compute size of buffer DWORD cbNeeded = 0; - if (nt) { - ::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, + ::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, NULL, 2, NULL, 0, &cbNeeded, &cReturned); - } ::EnumPrinters(PRINTER_ENUM_LOCAL, NULL, 5, NULL, 0, pcbBuf, &cReturned); if (cbNeeded > (*pcbBuf)) { @@ -139,65 +136,63 @@ BOOL AwtPrintControl::FindPrinter(jstring printerName, LPBYTE pPrinterEnum, // doesn't support port searches. So, if the user has specified the // printer name as "LPT1:" (even though this is actually a port // name), we won't find the printer here. - if (nt) { - if (!::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, - NULL, 4, pPrinterEnum, cbBuf, &dummyWord, &cReturned)) { - return FALSE; - } + if (!::EnumPrinters(PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, + NULL, 4, pPrinterEnum, cbBuf, &dummyWord, &cReturned)) { + return FALSE; + } - for (DWORD i = 0; i < cReturned; i++) { - PRINTER_INFO_4 *info4 = (PRINTER_INFO_4 *) - (pPrinterEnum + i * sizeof(PRINTER_INFO_4)); - if (info4->pPrinterName != NULL && - _tcsicmp(lpcPrinterName, info4->pPrinterName) == 0) { + for (DWORD i = 0; i < cReturned; i++) { + PRINTER_INFO_4 *info4 = (PRINTER_INFO_4 *) + (pPrinterEnum + i * sizeof(PRINTER_INFO_4)); + if (info4->pPrinterName != NULL && + _tcsicmp(lpcPrinterName, info4->pPrinterName) == 0) { - // Fix for BugTraq Id 4281380. - // Get the port name since some drivers may require - // this name to be passed to ::DeviceCapabilities(). - HANDLE hPrinter = NULL; - if (::OpenPrinter(info4->pPrinterName, &hPrinter, NULL)) { - // Fix for BugTraq Id 4286812. - // Some drivers don't support PRINTER_INFO_5. - // In this case we try PRINTER_INFO_2, and if that - // isn't supported as well return NULL port name. - try { - if (AwtPrintControl::IsSupportedLevel(hPrinter, 5)) { - VERIFY(::GetPrinter(hPrinter, 5, pPrinterEnum, cbBuf, - &dummyWord)); - PRINTER_INFO_5 *info5 = (PRINTER_INFO_5 *)pPrinterEnum; - *foundPrinter = info5->pPrinterName; - // pPortName may specify multiple ports. We only want one. - *foundPort = (info5->pPortName != NULL) - ? _tcstok(info5->pPortName, TEXT(",")) : NULL; - } else if (AwtPrintControl::IsSupportedLevel(hPrinter, 2)) { - VERIFY(::GetPrinter(hPrinter, 2, pPrinterEnum, cbBuf, - &dummyWord)); - PRINTER_INFO_2 *info2 = (PRINTER_INFO_2 *)pPrinterEnum; - *foundPrinter = info2->pPrinterName; - // pPortName may specify multiple ports. We only want one. - *foundPort = (info2->pPortName != NULL) - ? _tcstok(info2->pPortName, TEXT(",")) : NULL; - } else { - *foundPrinter = info4->pPrinterName; - // We failed to determine port name for the found printer. - *foundPort = NULL; - } - } catch (std::bad_alloc&) { - VERIFY(::ClosePrinter(hPrinter)); - throw; + // Fix for BugTraq Id 4281380. + // Get the port name since some drivers may require + // this name to be passed to ::DeviceCapabilities(). + HANDLE hPrinter = NULL; + if (::OpenPrinter(info4->pPrinterName, &hPrinter, NULL)) { + // Fix for BugTraq Id 4286812. + // Some drivers don't support PRINTER_INFO_5. + // In this case we try PRINTER_INFO_2, and if that + // isn't supported as well return NULL port name. + try { + if (AwtPrintControl::IsSupportedLevel(hPrinter, 5)) { + VERIFY(::GetPrinter(hPrinter, 5, pPrinterEnum, cbBuf, + &dummyWord)); + PRINTER_INFO_5 *info5 = (PRINTER_INFO_5 *)pPrinterEnum; + *foundPrinter = info5->pPrinterName; + // pPortName may specify multiple ports. We only want one. + *foundPort = (info5->pPortName != NULL) + ? _tcstok(info5->pPortName, TEXT(",")) : NULL; + } else if (AwtPrintControl::IsSupportedLevel(hPrinter, 2)) { + VERIFY(::GetPrinter(hPrinter, 2, pPrinterEnum, cbBuf, + &dummyWord)); + PRINTER_INFO_2 *info2 = (PRINTER_INFO_2 *)pPrinterEnum; + *foundPrinter = info2->pPrinterName; + // pPortName may specify multiple ports. We only want one. + *foundPort = (info2->pPortName != NULL) + ? _tcstok(info2->pPortName, TEXT(",")) : NULL; + } else { + *foundPrinter = info4->pPrinterName; + // We failed to determine port name for the found printer. + *foundPort = NULL; } - + } catch (std::bad_alloc&) { VERIFY(::ClosePrinter(hPrinter)); - - return TRUE; + throw; } - return FALSE; + VERIFY(::ClosePrinter(hPrinter)); + + return TRUE; } + + return FALSE; } } - // We still haven't found the printer, or we're using 95/98. + // We still haven't found the printer, /* or we're using 95/98. */ // PRINTER_INFO_5 supports both printer name and port name, so // we'll test both. On NT, PRINTER_ENUM_LOCAL means just local // printers. This is what we want, because we already tested all @@ -213,28 +208,17 @@ BOOL AwtPrintControl::FindPrinter(jstring printerName, LPBYTE pPrinterEnum, for (DWORD i = 0; i < cReturned; i++) { PRINTER_INFO_5 *info5 = (PRINTER_INFO_5 *) (pPrinterEnum + i * sizeof(PRINTER_INFO_5)); - if (nt) { - // pPortName can specify multiple ports. Test them one at - // a time. - if (info5->pPortName != NULL) { - LPTSTR port = _tcstok(info5->pPortName, TEXT(",")); - while (port != NULL) { - if (_tcsicmp(lpcPrinterName, port) == 0) { - *foundPrinter = info5->pPrinterName; - *foundPort = port; - return TRUE; - } - port = _tcstok(NULL, TEXT(",")); + // pPortName can specify multiple ports. Test them one at + // a time. + if (info5->pPortName != NULL) { + LPTSTR port = _tcstok(info5->pPortName, TEXT(",")); + while (port != NULL) { + if (_tcsicmp(lpcPrinterName, port) == 0) { + *foundPrinter = info5->pPrinterName; + *foundPort = port; + return TRUE; } - } - } else { - if ((info5->pPrinterName != NULL && - _tcsicmp(lpcPrinterName, info5->pPrinterName) == 0) || - (info5->pPortName != NULL && - _tcsicmp(lpcPrinterName, info5->pPortName) == 0)) { - *foundPrinter = info5->pPrinterName; - *foundPort = info5->pPortName; - return TRUE; + port = _tcstok(NULL, TEXT(",")); } } } @@ -400,13 +384,11 @@ BOOL AwtPrintControl::CreateDevModeAndDevNames(PRINTDLG *ppd, } // Create DEVNAMES. - if (IS_NT) { - if (pPortName != NULL) { - info2->pPortName = pPortName; - } else if (info2->pPortName != NULL) { - // pPortName may specify multiple ports. We only want one. - info2->pPortName = _tcstok(info2->pPortName, TEXT(",")); - } + if (pPortName != NULL) { + info2->pPortName = pPortName; + } else if (info2->pPortName != NULL) { + // pPortName may specify multiple ports. We only want one. + info2->pPortName = _tcstok(info2->pPortName, TEXT(",")); } size_t lenDriverName = ((info2->pDriverName != NULL) diff --git a/jdk/src/windows/native/sun/windows/awt_PrintDialog.cpp b/jdk/src/windows/native/sun/windows/awt_PrintDialog.cpp index d9e738411ae..762ae2673eb 100644 --- a/jdk/src/windows/native/sun/windows/awt_PrintDialog.cpp +++ b/jdk/src/windows/native/sun/windows/awt_PrintDialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,10 @@ * have any questions. */ +#include "awt.h" #include "awt_PrintDialog.h" #include "awt_Dialog.h" #include "awt_PrintControl.h" -#include "awt_dlls.h" #include "awt_Window.h" #include "ComCtl32Util.h" #include @@ -39,11 +39,9 @@ jmethodID AwtPrintDialog::setHWndMID; BOOL AwtPrintDialog::PrintDlg(LPPRINTDLG data) { - AwtCommDialog::load_comdlg_procs(); return static_cast(reinterpret_cast( AwtToolkit::GetInstance().InvokeFunction( - reinterpret_cast(AwtCommDialog::PrintDlgWrapper), - data))); + reinterpret_cast(::PrintDlg), data))); } LRESULT CALLBACK PrintDialogWndProc(HWND hWnd, UINT message, diff --git a/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp b/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp index 0ecd0388ac0..9136b786412 100644 --- a/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp +++ b/jdk/src/windows/native/sun/windows/awt_PrintJob.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include #include #include @@ -30,10 +31,9 @@ #include #include -#include "awt.h" -#include "awt_dlls.h" #include "awt_Toolkit.h" #include "awt_Component.h" +#include "awt_Dialog.h" #include "awt_Font.h" #include "awt_PrintDialog.h" #include "awt_PrintControl.h" @@ -422,7 +422,7 @@ Java_sun_awt_windows_WPageDialogPeer__1show(JNIEnv *env, jobject peer) */ if (AwtPrintControl::getPrintHDMode(env, self) == NULL || AwtPrintControl::getPrintHDName(env,self) == NULL) { - (void)AwtCommDialog::PageSetupDlg(&setup); + (void)::PageSetupDlg(&setup); /* check if hDevMode and hDevNames are set. * If both are null, then there is no default printer. */ @@ -460,7 +460,7 @@ Java_sun_awt_windows_WPageDialogPeer__1show(JNIEnv *env, jobject peer) AwtDialog::CheckInstallModalHook(); - BOOL ret = AwtCommDialog::PageSetupDlg(&setup); + BOOL ret = ::PageSetupDlg(&setup); if (ret) { jobject paper = getPaper(env, page); @@ -733,7 +733,7 @@ Java_sun_awt_windows_WPrinterJob_validatePaper(JNIEnv *env, jobject self, pd.lStructSize = sizeof(PRINTDLG); pd.Flags = PD_RETURNDEFAULT | PD_RETURNDC; - if (AwtCommDialog::PrintDlg(&pd)) { + if (::PrintDlg(&pd)) { printDC = pd.hDC; hDevMode = pd.hDevMode; hDevNames = pd.hDevNames; @@ -1838,10 +1838,6 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_windows_WPrinterJob_selectStylePen (JNIEnv *env, jobject self, jlong printDC, jlong cap, jlong join, jfloat width, jint red, jint green, jint blue) { - /* End cap and line join styles are not supported in Win 9x. */ - if (IS_WIN95) - return JNI_FALSE; - TRY; LOGBRUSH logBrush; @@ -1879,23 +1875,13 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_windows_WPrinterJob_setFont { jboolean didSetFont = JNI_FALSE; - if (IS_NT) { - didSetFont = jFontToWFontW(env, (HDC)printDC, + didSetFont = jFontToWFontW(env, (HDC)printDC, fontName, fontSize, isBold, isItalic, rotation, awScale); - } else { - didSetFont = jFontToWFontA(env, (HDC)printDC, - fontName, - fontSize, - isBold, - isItalic, - rotation, - awScale); - } return didSetFont; } @@ -1919,7 +1905,7 @@ static jboolean jFontToWFontA(JNIEnv *env, HDC printDC, jstring fontName, memset(&matchedLogFont, 0, sizeof(matchedLogFont)); - WCHAR* name = TO_WSTRING(fontName); + LPCWSTR fontNameW = JNU_GetStringPlatformChars(env, fontName, NULL); /* Some fontnames of Non-ASCII fonts like 'MS Minchou' are themselves @@ -1928,14 +1914,14 @@ static jboolean jFontToWFontA(JNIEnv *env, HDC printDC, jstring fontName, */ int maxlen = static_cast(sizeof(lf.lfFaceName)) - 1; // maxlen is int due to cbMultiByte parameter is int - int destLen = WideCharToMultiByte(CP_ACP, // convert to ASCII code page - 0, // flags - name, // Unicode string - -1, // Unicode length is calculated automatically + int destLen = WideCharToMultiByte(CP_ACP, // convert to ASCII code page + 0, // flags + fontNameW, // Unicode string + -1, // Unicode length is calculated automatically lf.lfFaceName, // Put ASCII string here - maxlen, // max len - NULL, // default handling of unmappables - NULL);// do not care if def char is used + maxlen, // max len + NULL, // default handling of unmappables + NULL); // do not care if def char is used /* If WideCharToMultiByte succeeded then the number * of bytes it copied into the face name buffer will @@ -2018,9 +2004,10 @@ static jboolean jFontToWFontA(JNIEnv *env, HDC printDC, jstring fontName, } else { foundFont = false; } - } + JNU_ReleaseStringPlatformChars(env, fontName, fontNameW); + return foundFont ? JNI_TRUE : JNI_FALSE; } @@ -2043,27 +2030,29 @@ static jboolean jFontToWFontW(JNIEnv *env, HDC printDC, jstring fontName, memset(&matchedLogFont, 0, sizeof(matchedLogFont)); + LPCWSTR fontNameW = JNU_GetStringPlatformChars(env, fontName, NULL); + /* Describe the GDI fonts we want enumerated. We * simply supply the java font name and let GDI * do the matching. If the java font name is * longer than the GDI maximum font lenght then * we can't convert the font. */ - WCHAR* name = TO_WSTRING(fontName); - size_t nameLen = wcslen(name); - + size_t nameLen = wcslen(fontNameW); if (nameLen < (sizeof(lf.lfFaceName) / sizeof(lf.lfFaceName[0]))) { - wcscpy(lf.lfFaceName, name); + wcscpy(lf.lfFaceName, fontNameW); lf.lfCharSet = DEFAULT_CHARSET; lf.lfPitchAndFamily = 0; - foundFont = !EnumFontFamiliesExW((HDC)printDC, &lf, + foundFont = !::EnumFontFamiliesEx((HDC)printDC, &lf, (FONTENUMPROCW) fontEnumProcW, (LPARAM) &matchedLogFont, 0); } + JNU_ReleaseStringPlatformChars(env, fontName, fontNameW); + if (!foundFont) { return JNI_FALSE; } @@ -2100,7 +2089,7 @@ static jboolean jFontToWFontW(JNIEnv *env, HDC printDC, jstring fontName, //Debug: dumpLogFont(&matchedLogFont); - HFONT font = CreateFontIndirectW(&matchedLogFont); + HFONT font = ::CreateFontIndirect(&matchedLogFont); if (font == NULL) { return JNI_FALSE; } @@ -2123,7 +2112,7 @@ static jboolean jFontToWFontW(JNIEnv *env, HDC printDC, jstring fontName, GetTextMetrics(printDC, &tm); avgWidth = tm.tmAveCharWidth; matchedLogFont.lfWidth = (LONG)((fabs)(avgWidth*awScale)); - font = CreateFontIndirectW(&matchedLogFont); + font = ::CreateFontIndirect(&matchedLogFont); if (font == NULL) { return JNI_FALSE; } @@ -2230,14 +2219,11 @@ JNIEXPORT jint JNICALL Java_sun_awt_windows_WPrinterJob_getGDIAdvance (JNIEnv *env, jobject self, jlong printDC, jstring text) { SIZE size; - LPWSTR wText = TO_WSTRING(text); + LPCWSTR wText = JNU_GetStringPlatformChars(env, text, NULL); size_t strLen = wcslen(wText); BOOL ok = GetTextExtentPoint32((HDC)printDC, wText, (int)strLen, &size); - if (ok) { - return size.cx; - } else { - return 0; - } + JNU_ReleaseStringPlatformChars(env, text, wText); + return ok ? size.cx : 0; } @@ -2288,7 +2274,7 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_WPrinterJob_textOut long posX = ROUND_TO_LONG(x); long posY = ROUND_TO_LONG(y); int flags = (glyphCodes !=0) ? ETO_GLYPH_INDEX : 0; - LPWSTR wText = TO_WSTRING(text); + LPCWSTR wText = JNU_GetStringPlatformChars(env, text, NULL); int *advances = NULL, *xadvances = NULL, *xyadvances = NULL; BOOL useYAdvances = FALSE; @@ -2359,7 +2345,7 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_WPrinterJob_textOut *inxyAdvances = 0; } - if (useYAdvances && IS_WIN2000) { + if (useYAdvances) { advances = xyadvances; flags |= J2D_ETO_PDY; } else { @@ -2371,7 +2357,7 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_WPrinterJob_textOut env->ReleaseFloatArrayElements(positions, glyphPos, JNI_ABORT); } - BOOL drawn = ::ExtTextOutW( (HDC)printDC, + BOOL drawn = ::ExtTextOut((HDC)printDC, posX, posY, // starting position for the text flags, // glyphCodes?, y advances? NULL, // optional clipping-opaquing rectangle @@ -2385,6 +2371,8 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_WPrinterJob_textOut if (xyadvances != NULL) { free(xyadvances); } + + JNU_ReleaseStringPlatformChars(env, text, wText); } /** @@ -2968,7 +2956,7 @@ static HDC getDefaultPrinterDC(JNIEnv *env, jobject printerJob) { pd.lStructSize = sizeof(PRINTDLG); pd.Flags = PD_RETURNDEFAULT | PD_RETURNDC; - if (AwtCommDialog::PrintDlg(&pd)) { + if (::PrintDlg(&pd)) { printDC = pd.hDC; /* Find out how many copies the driver can do, and use driver's diff --git a/jdk/src/windows/native/sun/windows/awt_Robot.cpp b/jdk/src/windows/native/sun/windows/awt_Robot.cpp index 15a9a243fd1..013236e0b42 100644 --- a/jdk/src/windows/native/sun/windows/awt_Robot.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Robot.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * have any questions. */ +#include "awt.h" #include "awt_Toolkit.h" #include "awt_Component.h" #include "awt_Robot.h" @@ -44,11 +45,11 @@ AwtRobot::~AwtRobot() } #ifndef SPI_GETMOUSESPEED -#define SPI_GETMOUSESPEED 112 +#define SPI_GETMOUSESPEED 112 #endif #ifndef SPI_SETMOUSESPEED -#define SPI_SETMOUSESPEED 113 +#define SPI_SETMOUSESPEED 113 #endif void AwtRobot::MouseMove( jint x, jint y) @@ -141,45 +142,7 @@ void AwtRobot::MouseRelease( jint buttonMask ) } void AwtRobot::MouseWheel (jint wheelAmt) { - if (IS_WIN95 && !IS_WIN98) { - // Other win32 platforms do nothing for mouse_event(0), so - // do nothing on 95, too. - if (wheelAmt == 0) { - return; - } - - // Win95 doesn't understand MOUSEEVENTF_WHEEL, so use PostEvent - POINT curPos; - HWND mouseOver = NULL; - HWND topLevel = NULL; - UINT wheelMsg = NULL; - - if (::GetCursorPos((LPPOINT)&curPos) == 0) { - return; - } - // get hwnd of top-level container - mouseOver = ::WindowFromPoint(curPos); - DASSERT(mouseOver); - topLevel = AwtComponent::GetTopLevelParentForWindow(mouseOver); - DASSERT(topLevel); - - if (::ScreenToClient(topLevel, (LPPOINT)&curPos) == 0) { - return; - } - wheelMsg = AwtComponent::Wheel95GetMsg(); - - if (wheelMsg == NULL) { - return; - } - - ::PostMessage(topLevel, - wheelMsg, - wheelAmt * -1 * WHEEL_DELTA, - MAKELPARAM((WORD)curPos.x, (WORD)curPos.y)); - } - else { - mouse_event(MOUSEEVENTF_WHEEL, 0, 0, wheelAmt * -1 * WHEEL_DELTA, 0); - } + mouse_event(MOUSEEVENTF_WHEEL, 0, 0, wheelAmt * -1 * WHEEL_DELTA, 0); } inline jint AwtRobot::WinToJavaPixel(USHORT r, USHORT g, USHORT b) diff --git a/jdk/src/windows/native/sun/windows/awt_ScrollPane.cpp b/jdk/src/windows/native/sun/windows/awt_ScrollPane.cpp index 3975a3fd8d5..4d41e0b0cbe 100644 --- a/jdk/src/windows/native/sun/windows/awt_ScrollPane.cpp +++ b/jdk/src/windows/native/sun/windows/awt_ScrollPane.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -108,13 +108,6 @@ AwtScrollPane* AwtScrollPane::Create(jobject self, jobject parent) { DWORD style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; - if (!IS_WIN4X) { - /* - * It's been decided by the UI folks that 3.X ScrollPanes - * should have borders... - */ - style |= WS_BORDER; - } jint scrollbarDisplayPolicy = env->GetIntField(target, scrollbarDisplayPolicyID); @@ -122,7 +115,7 @@ AwtScrollPane* AwtScrollPane::Create(jobject self, jobject parent) == java_awt_ScrollPane_SCROLLBARS_ALWAYS) { style |= WS_HSCROLL | WS_VSCROLL; } - DWORD exStyle = IS_WIN4X ? WS_EX_CLIENTEDGE : 0; + DWORD exStyle = WS_EX_CLIENTEDGE; if (GetRTL()) { exStyle |= WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR; @@ -225,15 +218,8 @@ void AwtScrollPane::RecalcSizes(int parentWidth, int parentHeight, } /* Determine border width without scrollbars. */ - int horzBorder; - int vertBorder; - if (IS_WIN4X) { - horzBorder = ::GetSystemMetrics(SM_CXEDGE); - vertBorder = ::GetSystemMetrics(SM_CYEDGE); - } else { - horzBorder = ::GetSystemMetrics(SM_CXBORDER); - vertBorder = ::GetSystemMetrics(SM_CYBORDER); - } + int horzBorder = ::GetSystemMetrics(SM_CXEDGE);; + int vertBorder = ::GetSystemMetrics(SM_CYEDGE);; parentWidth -= (horzBorder * 2); parentHeight -= (vertBorder * 2); diff --git a/jdk/src/windows/native/sun/windows/awt_TextArea.cpp b/jdk/src/windows/native/sun/windows/awt_TextArea.cpp index 3c42ce494fc..e0d4c6158c2 100644 --- a/jdk/src/windows/native/sun/windows/awt_TextArea.cpp +++ b/jdk/src/windows/native/sun/windows/awt_TextArea.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,8 @@ #include "awt_Toolkit.h" #include "awt_TextArea.h" #include "awt_TextComponent.h" -#include "awt_dlls.h" #include "awt_KeyboardFocusManager.h" #include "awt_Canvas.h" -#include "awt_Unicode.h" #include "awt_Window.h" /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code. @@ -50,7 +48,6 @@ struct ReplaceTextStruct { jfieldID AwtTextArea::scrollbarVisibilityID; WNDPROC AwtTextArea::sm_pDefWindowProc = NULL; -BOOL AwtTextArea::sm_RichEdit20 = (IS_WIN98 || IS_NT); /************************************************************************ * AwtTextArea methods @@ -78,8 +75,12 @@ void AwtTextArea::Dispose() } LPCTSTR AwtTextArea::GetClassName() { - load_rich_edit_library(); - return sm_RichEdit20 ? RICHEDIT_CLASS : TEXT("RICHEDIT"); + static BOOL richedLibraryLoaded = FALSE; + if (!richedLibraryLoaded) { + ::LoadLibrary(TEXT("RICHED20.DLL")); + richedLibraryLoaded = TRUE; + } + return RICHEDIT_CLASS; } /* Create a new AwtTextArea object and window. */ @@ -134,9 +135,8 @@ AwtTextArea* AwtTextArea::Create(jobject peer, jobject parent) * scrollbars instead of hiding them when not needed. */ DWORD style = WS_CHILD | WS_CLIPSIBLINGS | ES_LEFT | ES_MULTILINE | - ES_WANTRETURN | scroll_style | - (IS_WIN4X ? 0 : WS_BORDER) | ES_DISABLENOSCROLL; - DWORD exStyle = IS_WIN4X ? WS_EX_CLIENTEDGE : 0; + ES_WANTRETURN | scroll_style | ES_DISABLENOSCROLL; + DWORD exStyle = WS_EX_CLIENTEDGE; if (GetRTL()) { exStyle |= WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR; if (GetRTLReadingOrder()) @@ -169,9 +169,7 @@ AwtTextArea* AwtTextArea::Create(jobject peer, jobject parent) // end-of-document marker or carriage return, // to format paragraphs. // kdm@sparc.spb.su - if (sm_RichEdit20) { - c->SendMessage(EM_SETTEXTMODE, TM_PLAINTEXT, 0); - } + c->SendMessage(EM_SETTEXTMODE, TM_PLAINTEXT, 0); c->m_backgroundColorSet = TRUE; /* suppress inheriting parent's color. */ @@ -242,7 +240,7 @@ size_t AwtTextArea::CountNewLines(JNIEnv *env, jstring jStr, size_t maxlen) */ size_t length = env->GetStringLength(jStr) + 1; WCHAR *string = new WCHAR[length]; - env->GetStringRegion(jStr, 0, static_cast(length - 1), string); + env->GetStringRegion(jStr, 0, static_cast(length - 1), reinterpret_cast(string)); string[length-1] = '\0'; for (size_t i = 0; i < maxlen && i < length - 1; i++) { if (string[i] == L'\n') { @@ -461,12 +459,7 @@ AwtTextArea::WmContextMenu(HWND hCtrl, UINT xPos, UINT yPos) { /* Check if all the text is selected. */ if (cr.cpMin == 0) { - int len = 0; - if (m_isWin95) { - len = ::GetWindowTextLengthA(GetHWnd()); - } else { - len = ::GetWindowTextLengthW(GetHWnd()); - } + int len = ::GetWindowTextLength(GetHWnd()); if (cr.cpMin == 0 && cr.cpMax >= len) { /* * All the text is selected in RichEdit - select all the @@ -738,14 +731,8 @@ AwtTextArea::HandleEvent(MSG *msg, BOOL synthetic) // kdm@sparc.spb.su UINT platfScrollLines = 3; // Retrieve a number of scroll lines. - if (!sm_RichEdit20) { - // 95 doesn't understand the SPI_GETWHEELSCROLLLINES - get the user - // preference by other means - platfScrollLines = Wheel95GetScrLines(); - } else { - ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, - &platfScrollLines, 0); - } + ::SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, + &platfScrollLines, 0); if (platfScrollLines > 0) { HWND hWnd = GetHWnd(); @@ -838,23 +825,6 @@ AwtTextArea::HandleEvent(MSG *msg, BOOL synthetic) return returnVal; } -int AwtTextArea::GetText(LPTSTR buffer, int size) -{ - // Due to a known limitation of the MSLU, GetWindowText cannot be - // issued for the Unicode RichEdit control on Win9x. Use EM_GETTEXTEX instead. - if (sm_RichEdit20 && !IS_NT) { - GETTEXTEX gte; - gte.cb = size * sizeof(TCHAR); - gte.flags = GT_USECRLF; - gte.codepage = 1200; // implies Unicode - gte.lpDefaultChar = NULL; - gte.lpUsedDefChar = NULL; - return (int)SendMessage(EM_GETTEXTEX, (WPARAM)>e, (LPARAM)buffer); - } else { - return ::GetWindowText(GetHWnd(), buffer, size); - } -} - /* * WM_CTLCOLOR is not sent by rich edit controls. * Use EM_SETCHARFORMAT and EM_SETBKGNDCOLOR to set @@ -984,16 +954,16 @@ void AwtTextArea::_ReplaceText(void *param) jsize length = env->GetStringLength(text) + 1; // Bugid 4141477 - Can't use TO_WSTRING here because it uses alloca // WCHAR* buffer = TO_WSTRING(text); - WCHAR *buffer = new WCHAR[length]; - env->GetStringRegion(text, 0, length-1, buffer); + TCHAR *buffer = new TCHAR[length]; + env->GetStringRegion(text, 0, length-1, reinterpret_cast(buffer)); buffer[length-1] = '\0'; c->CheckLineSeparator(buffer); c->RemoveCR(buffer); // Fix for 5003402: added restoring/hiding selection to enable automatic scrolling c->SendMessage(EM_HIDESELECTION, FALSE, TRUE); - c->SendMessageW(EM_SETSEL, start, end); - c->SendMessageW(EM_REPLACESEL, FALSE, (LPARAM)buffer); + c->SendMessage(EM_SETSEL, start, end); + c->SendMessage(EM_REPLACESEL, FALSE, (LPARAM)buffer); c->SendMessage(EM_HIDESELECTION, TRUE, TRUE); delete[] buffer; @@ -1187,12 +1157,11 @@ AwtTextArea::OleCallback::QueryAcceptData(LPDATAOBJECT pdataobj, HGLOBAL hMetaPict) { if (reco == RECO_PASTE) { // If CF_TEXT format is available edit controls will select it, - // otherwise if it is WinNT or Win2000 and CF_UNICODETEXT is - // available it will be selected, otherwise if CF_OEMTEXT is - // available it will be selected. + // otherwise if it is CF_UNICODETEXT is available it will be + // selected, otherwise if CF_OEMTEXT is available it will be selected. if (::IsClipboardFormatAvailable(CF_TEXT)) { *pcfFormat = CF_TEXT; - } else if (!m_isWin95 && ::IsClipboardFormatAvailable(CF_UNICODETEXT)) { + } else if (::IsClipboardFormatAvailable(CF_UNICODETEXT)) { *pcfFormat = CF_UNICODETEXT; } else if (::IsClipboardFormatAvailable(CF_OEMTEXT)) { *pcfFormat = CF_OEMTEXT; diff --git a/jdk/src/windows/native/sun/windows/awt_TextArea.h b/jdk/src/windows/native/sun/windows/awt_TextArea.h index 7e054f61079..12ba0baa658 100644 --- a/jdk/src/windows/native/sun/windows/awt_TextArea.h +++ b/jdk/src/windows/native/sun/windows/awt_TextArea.h @@ -1,5 +1,5 @@ /* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,8 +73,6 @@ public: MsgRouting WmNcHitTest(UINT x, UINT y, LRESULT &retVal); MsgRouting HandleEvent(MSG *msg, BOOL synthetic); - INLINE virtual int GetText(LPTSTR buffer, int size); - INLINE void SetIgnoreEnChange(BOOL b) { m_bIgnoreEnChange = b; } virtual void SetColor(COLORREF c); @@ -96,10 +94,6 @@ protected: void EditGetSel(CHARRANGE &cr); LONG EditGetCharFromPos(POINT& pt); private: - - // TRUE if the rich edit version is 2.0 - static BOOL sm_RichEdit20; - // RichEdit 1.0 control generates EN_CHANGE notifications not only // on text changes, but also on any character formatting change. // This flag is true when the latter case is detected. diff --git a/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp b/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp index 1be6d9f1450..9920b925254 100644 --- a/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp +++ b/jdk/src/windows/native/sun/windows/awt_TextComponent.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -326,7 +326,7 @@ jstring AwtTextComponent::_GetText(void *param) WCHAR* buf = new WCHAR[len + 1]; c->GetText(buf, len + 1); c->RemoveCR(buf); - result = env->NewString(buf, static_cast(wcslen(buf))); + result = JNU_NewStringPlatform(env, buf); delete [] buf; } } @@ -362,7 +362,7 @@ void AwtTextComponent::_SetText(void *param) { int length = env->GetStringLength(text); WCHAR* buffer = new WCHAR[length + 1]; - env->GetStringRegion(text, 0, length, buffer); + env->GetStringRegion(text, 0, length, reinterpret_cast(buffer)); buffer[length] = 0; c->CheckLineSeparator(buffer); c->RemoveCR(buffer); diff --git a/jdk/src/windows/native/sun/windows/awt_TextComponent.h b/jdk/src/windows/native/sun/windows/awt_TextComponent.h index 2eff0505715..32a430baf38 100644 --- a/jdk/src/windows/native/sun/windows/awt_TextComponent.h +++ b/jdk/src/windows/native/sun/windows/awt_TextComponent.h @@ -1,5 +1,5 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,15 +70,6 @@ public: static jstring _GetText(void *param); BOOL ActMouseMessage(MSG* pMsg); - /* - * For TextComponents that contains WCHAR strings or messages with - * WCHAR parameters. - */ - INLINE LRESULT SendMessageW(UINT msg, WPARAM wParam = 0, LPARAM lParam = 0) - { - DASSERT(GetHWnd()); - return ::SendMessageW(GetHWnd(), msg, wParam, lParam); - } void SetFont(AwtFont* font); diff --git a/jdk/src/windows/native/sun/windows/awt_TextField.cpp b/jdk/src/windows/native/sun/windows/awt_TextField.cpp index 5b95495d067..975fd20bc0b 100644 --- a/jdk/src/windows/native/sun/windows/awt_TextField.cpp +++ b/jdk/src/windows/native/sun/windows/awt_TextField.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1996-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ #include "awt_Toolkit.h" #include "awt_TextField.h" #include "awt_TextComponent.h" -#include "awt_dlls.h" #include "awt_KeyboardFocusManager.h" #include "awt_Canvas.h" @@ -69,9 +68,8 @@ AwtTextField* AwtTextField::Create(jobject peer, jobject parent) { DWORD style = WS_CHILD | WS_CLIPSIBLINGS | - ES_LEFT | ES_AUTOHSCROLL | - (IS_WIN4X ? 0 : WS_BORDER); - DWORD exStyle = IS_WIN4X ? WS_EX_CLIENTEDGE : 0; + ES_LEFT | ES_AUTOHSCROLL; + DWORD exStyle = WS_EX_CLIENTEDGE; if (GetRTL()) { exStyle |= WS_EX_RIGHT | WS_EX_LEFTSCROLLBAR; if (GetRTLReadingOrder()) diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp index 3a9dfb24c7d..cea2627bc4c 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -23,15 +23,16 @@ * have any questions. */ +#include "awt.h" #include #include -#if defined(_DEBUG) && defined(_MSC_VER) && _MSC_VER >= 1000 -#include -#endif +//#if defined(_DEBUG) && defined(_MSC_VER) && _MSC_VER >= 1000 +//#include +//#endif #define _JNI_IMPLEMENTATION_ -#include "stdhdrs.h" + #include "awt_DrawingSurface.h" #include "awt_AWTEvent.h" #include "awt_Component.h" @@ -51,7 +52,6 @@ #include "awt_FileDialog.h" #include "CmdIDList.h" #include "awt_new.h" -#include "awt_Unicode.h" #include "debug_trace.h" #include "debug_mem.h" @@ -225,8 +225,7 @@ BOOL AwtToolkit::activateKeyboardLayout(HKL hkl) { HKL prev = ::ActivateKeyboardLayout(hkl, 0); // If the above call fails, try loading the layout in case of NT - if ((prev == 0) && IS_NT) { - + if (!prev) { // create input locale string, e.g., "00000409", from hkl. TCHAR inputLocale[9]; TCHAR buf[9]; @@ -297,7 +296,7 @@ JavaStringBuffer::JavaStringBuffer(JNIEnv *env, jstring jstr) { if (jstr != NULL) { int length = env->GetStringLength(jstr); buffer = new TCHAR[length + 1]; - LPCTSTR tmp = (LPCTSTR)JNU_GetStringPlatformChars(env, jstr, NULL); + LPCTSTR tmp = JNU_GetStringPlatformChars(env, jstr, NULL); _tcscpy(buffer, tmp); JNU_ReleaseStringPlatformChars(env, jstr, tmp); } else { @@ -490,8 +489,6 @@ BOOL AwtToolkit::Dispose() { ::CloseHandle(m_waitEvent); - ComCtl32Util::GetInstance().FreeLibraries(); - tk.m_isDisposed = TRUE; return TRUE; @@ -886,8 +883,6 @@ LRESULT CALLBACK AwtToolkit::WndProc(HWND hWnd, UINT message, return (DWORD)ImmGetOpenStatus((HIMC)wParam); } case WM_DISPLAYCHANGE: { - AwtCursor::DirtyAllCustomCursors(); - // Reinitialize screens initScreens(env); @@ -1161,9 +1156,7 @@ BOOL AwtToolkit::PreProcessMsg(MSG& msg) if (p && p->PreProcessMsg(msg) == mrConsume) return TRUE; - if ((msg.message >= WM_MOUSEFIRST && msg.message <= WM_AWT_MOUSELAST) || - (IS_WIN95 && !IS_WIN98 && - msg.message == AwtComponent::Wheel95GetMsg()) || + if ((msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST) || (msg.message >= WM_NCMOUSEMOVE && msg.message <= WM_NCMBUTTONDBLCLK)) { if (PreProcessMouseMsg(p, msg)) { return TRUE; @@ -1190,9 +1183,7 @@ BOOL AwtToolkit::PreProcessMouseMsg(AwtComponent* p, MSG& msg) return FALSE; } - if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_AWT_MOUSELAST || - (IS_WIN95 && !IS_WIN98 && msg.message == AwtComponent::Wheel95GetMsg())) - { + if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST) { mouseWParam = msg.wParam; mouseLParam = msg.lParam; } else { @@ -1287,21 +1278,6 @@ BOOL AwtToolkit::PreProcessMouseMsg(AwtComponent* p, MSG& msg) //window msg.hwnd = hWndForWheel; } - else if (IS_WIN95 && !IS_WIN98 && - msg.message == AwtComponent::Wheel95GetMsg() && - mouseWheelComp != NULL) { - - // On Win95, mouse wheels are _always_ delivered to the top level - // Frame. Default behavior only takes place if the message's hwnd - // remains that of the Frame. We only want to change the hwnd if - // we're changing it to a Component that DOESN'T handle the - // mousewheel natively. - - if (!mouseWheelComp->InheritsNativeMouseWheelBehavior()) { - DTRACE_PRINTLN("AwtT::PPMM: changing hwnd on 95"); - msg.hwnd = hWndForWheel; - } - } /* * Make sure we get at least one last chance to check for transitions @@ -1792,7 +1768,7 @@ Java_sun_awt_windows_WToolkit_getScreenInsets(JNIEnv *env, { jobject insets = NULL; RECT rRW; - MONITOR_INFO *miInfo; + LPMONITORINFO miInfo; TRY; @@ -1814,10 +1790,10 @@ Java_sun_awt_windows_WToolkit_getScreenInsets(JNIEnv *env, if (miInfo) { insets = env->NewObject(env->FindClass("java/awt/Insets"), AwtToolkit::insetsMID, - miInfo->rWork.top - miInfo->rMonitor.top, - miInfo->rWork.left - miInfo->rMonitor.left, - miInfo->rMonitor.bottom - miInfo->rWork.bottom, - miInfo->rMonitor.right - miInfo->rWork.right); + miInfo->rcWork.top - miInfo->rcMonitor.top, + miInfo->rcWork.left - miInfo->rcMonitor.left, + miInfo->rcMonitor.bottom - miInfo->rcWork.bottom, + miInfo->rcMonitor.right - miInfo->rcWork.right); } } @@ -2057,29 +2033,15 @@ Java_sun_awt_windows_WToolkit_getWindowsVersion(JNIEnv *env, jclass cls) swprintf(szVer, L"0x%x = %ld", version, version); int l = lstrlen(szVer); - if (IS_WIN95) { - if (IS_WIN98) { - if (IS_WINME) { - swprintf(szVer + l, L" (Windows ME)"); + if (IS_WIN2000) { + if (IS_WINXP) { + if (IS_WINVISTA) { + swprintf(szVer + l, L" (Windows Vista)"); } else { - swprintf(szVer + l, L" (Windows 98)"); + swprintf(szVer + l, L" (Windows XP)"); } } else { - swprintf(szVer + l, L" (Windows 95)"); - } - } else if (IS_NT) { - if (IS_WIN2000) { - if (IS_WINXP) { - if (IS_WINVISTA) { - swprintf(szVer + l, L" (Windows Vista)"); - } else { - swprintf(szVer + l, L" (Windows XP)"); - } - } else { - swprintf(szVer + l, L" (Windows 2000)"); - } - } else { - swprintf(szVer + l, L" (Windows NT)"); + swprintf(szVer + l, L" (Windows 2000)"); } } else { swprintf(szVer + l, L" (Unknown)"); diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.h b/jdk/src/windows/native/sun/windows/awt_Toolkit.h index fcee2d4ad5c..2a1d1ccb422 100644 --- a/jdk/src/windows/native/sun/windows/awt_Toolkit.h +++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.h @@ -50,7 +50,6 @@ #include "awt.h" #include "awtmsg.h" -#include "awt_Multimon.h" #include "Trace.h" #include "sun_awt_windows_WToolkit.h" @@ -89,11 +88,8 @@ class JNILocalFrame { */ class CriticalSection { public: - INLINE CriticalSection() { ::InitializeCriticalSection(&rep); - ::InitializeCriticalSection(&tryrep); - tryEntered = 0; } - INLINE ~CriticalSection() { ::DeleteCriticalSection(&rep); - ::DeleteCriticalSection(&tryrep); } + INLINE CriticalSection() { ::InitializeCriticalSection(&rep); } + INLINE ~CriticalSection() { ::DeleteCriticalSection(&rep); } class Lock { public: @@ -111,50 +107,18 @@ class CriticalSection { private: CRITICAL_SECTION rep; - CRITICAL_SECTION tryrep; - long tryEntered; - CriticalSection(const CriticalSection&); const CriticalSection& operator =(const CriticalSection&); public: - virtual void Enter (void) - { - ::EnterCriticalSection(&tryrep); - tryEntered++; - if (tryEntered == 1) { - ::EnterCriticalSection(&rep); - ::LeaveCriticalSection(&tryrep); - } else { - ::LeaveCriticalSection(&tryrep); - ::EnterCriticalSection(&rep); - } + virtual void Enter() { + ::EnterCriticalSection(&rep); } - // we cannot use ::TryEnterCriticalSection as it is not supported on Win9x/Me - virtual BOOL TryEnter (void) - { - BOOL result = FALSE; - ::EnterCriticalSection(&tryrep); - if (tryEntered == 0) { - ::EnterCriticalSection(&rep); - tryEntered++; - result = TRUE; - } - ::LeaveCriticalSection(&tryrep); - return result; + virtual BOOL TryEnter() { + return ::TryEnterCriticalSection(&rep); } - virtual void Leave (void) - { - ::EnterCriticalSection(&tryrep); - if (tryEntered > 0) { - tryEntered--; - } else { - // this may happen only if we call to Leave() before - // Enter() so this is definitely a bug - DASSERT(FALSE); - } + virtual void Leave() { ::LeaveCriticalSection(&rep); - ::LeaveCriticalSection(&tryrep); } }; diff --git a/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp b/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp index 0d3047b59e5..5be95cb6cd8 100644 --- a/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp +++ b/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp @@ -23,9 +23,10 @@ * have any questions. */ -#include +#include "awt.h" #include #include +#include #include "awt_Toolkit.h" #include "awt_TrayIcon.h" @@ -173,27 +174,20 @@ AwtTrayIcon* AwtTrayIcon::Create(jobject self, jobject parent) env->DeleteLocalRef(target); return awtTrayIcon; } -typedef struct _SDLLVERSIONINFO -{ - DWORD cbSize; - DWORD dwMajorVersion; // Major version - DWORD dwMinorVersion; // Minor version - DWORD dwBuildNumber; // Build number - DWORD dwPlatformID; // DLLVER_PLATFORM_* -} SDLLVERSIONINFO; -typedef HRESULT (CALLBACK* SDLLGETVERSIONPROC)(SDLLVERSIONINFO *); void AwtTrayIcon::InitNID(UINT uID) { // fix for 6271589: we MUST set the size of the structure to match // the shell version, otherwise some errors may occur (like missing // balloon messages on win2k) - SDLLVERSIONINFO dllVersionInfo; - dllVersionInfo.cbSize = sizeof(SDLLVERSIONINFO); - int shellVersion = 4; // WIN_98 + DLLVERSIONINFO dllVersionInfo; + dllVersionInfo.cbSize = sizeof(DLLVERSIONINFO); + int shellVersion = 5; // WIN_2000 + // MSDN: DllGetVersion should not be implicitly called, but rather + // loaded using GetProcAddress HMODULE hShell = LoadLibrary(TEXT("Shell32.dll")); if (hShell != NULL) { - SDLLGETVERSIONPROC proc = (SDLLGETVERSIONPROC)GetProcAddress(hShell, "DllGetVersion"); + DLLGETVERSIONPROC proc = (DLLGETVERSIONPROC)GetProcAddress(hShell, "DllGetVersion"); if (proc != NULL) { if (proc(&dllVersionInfo) == NOERROR) { shellVersion = dllVersionInfo.dwMajorVersion; @@ -202,14 +196,16 @@ void AwtTrayIcon::InitNID(UINT uID) } FreeLibrary(hShell); switch (shellVersion) { - case 5: // WIN_2000, WIN_ME + case 5: // WIN_2000 m_nid.cbSize = (BYTE *)(&m_nid.guidItem) - (BYTE *)(&m_nid.cbSize); break; case 6: // WIN_XP + // Uncomment these two lines when moving to VS2008 +// m_nid.cbSize = (BYTE *)(&m_nid.hBalloonIcon) - (BYTE *)(&m_nid.cbSize); +// break; + default: // WIN_VISTA? m_nid.cbSize = sizeof(m_nid); break; - default: // WIN_98, WIN_NT - m_nid.cbSize = (BYTE *)(&m_nid.szTip) - (BYTE *)(&m_nid.cbSize) + sizeof(m_nid.szTip) / 2; } m_nid.hWnd = AwtTrayIcon::sm_msgWindow; m_nid.uID = uID; @@ -217,7 +213,7 @@ void AwtTrayIcon::InitNID(UINT uID) m_nid.uCallbackMessage = WM_AWT_TRAY_NOTIFY; m_nid.hIcon = AwtToolkit::GetInstance().GetAwtIcon(); m_nid.szTip[0] = '\0'; - m_nid.uVersion = IS_WIN2000 ? AWT_NOTIFYICON_VERSION : 0; + m_nid.uVersion = NOTIFYICON_VERSION; } BOOL AwtTrayIcon::SendTrayMessage(DWORD dwMessage) @@ -304,13 +300,13 @@ MsgRouting AwtTrayIcon::WmAwtTrayNotify(WPARAM wParam, LPARAM lParam) case WM_CONTEXTMENU: mr = WmContextMenu(0, pos.x, pos.y); break; - case AWT_NIN_KEYSELECT: + case NIN_KEYSELECT: mr = WmKeySelect(0, pos.x, pos.y); break; - case AWT_NIN_SELECT: + case NIN_SELECT: mr = WmSelect(0, pos.x, pos.y); break; - case AWT_NIN_BALLOONUSERCLICK: + case NIN_BALLOONUSERCLICK: mr = WmBalloonUserClick(0, pos.x, pos.y); break; } @@ -473,7 +469,7 @@ MsgRouting AwtTrayIcon::WmTaskbarCreated() { BOOL result = item->m_trayIcon->SendTrayMessage(NIM_ADD); // 6270114: Instructs the taskbar to behave according to the Shell version 5.0 if (result) { - item->m_trayIcon->SendTrayMessage(AWT_NIM_SETVERSION); + item->m_trayIcon->SendTrayMessage(NIM_SETVERSION); } } return mrDoDefault; @@ -733,9 +729,9 @@ void AwtTrayIcon::_SetToolTip(void *param) goto ret; } - tooltipStr = env->GetStringChars(jtooltip, (jboolean *)NULL); + tooltipStr = JNU_GetStringPlatformChars(env, jtooltip, (jboolean *)NULL); trayIcon->SetToolTip(tooltipStr); - env->ReleaseStringChars(jtooltip, tooltipStr); + JNU_ReleaseStringPlatformChars(env, jtooltip, tooltipStr); ret: env->DeleteGlobalRef(self); env->DeleteGlobalRef(jtooltip); @@ -782,7 +778,7 @@ void AwtTrayIcon::_UpdateIcon(void *param) BOOL result = trayIcon->SendTrayMessage(jupdate == JNI_TRUE ? NIM_MODIFY : NIM_ADD); // 6270114: Instructs the taskbar to behave according to the Shell version 5.0 if (result && jupdate == JNI_FALSE) { - trayIcon->SendTrayMessage(AWT_NIM_SETVERSION); + trayIcon->SendTrayMessage(NIM_SETVERSION); } ret: env->DeleteGlobalRef(self); @@ -791,22 +787,19 @@ ret: void AwtTrayIcon::DisplayMessage(LPCTSTR caption, LPCTSTR text, LPCTSTR msgType) { - if (!IS_WIN2000) - return; - - m_nid.uFlags |= AWT_NIF_INFO; + m_nid.uFlags |= NIF_INFO; m_nid.uTimeout = 10000; if (lstrcmp(msgType, TEXT("ERROR")) == 0) { - m_nid.dwInfoFlags = AWT_NIIF_ERROR; + m_nid.dwInfoFlags = NIIF_ERROR; } else if (lstrcmp(msgType, TEXT("WARNING")) == 0) { - m_nid.dwInfoFlags = AWT_NIIF_WARNING; + m_nid.dwInfoFlags = NIIF_WARNING; } else if (lstrcmp(msgType, TEXT("INFO")) == 0) { - m_nid.dwInfoFlags = AWT_NIIF_INFO; + m_nid.dwInfoFlags = NIIF_INFO; } else if (lstrcmp(msgType, TEXT("NONE")) == 0) { - m_nid.dwInfoFlags = AWT_NIIF_NONE; + m_nid.dwInfoFlags = NIIF_NONE; } else { - m_nid.dwInfoFlags = AWT_NIIF_NONE; + m_nid.dwInfoFlags = NIIF_NONE; } if (caption[0] == '\0') { @@ -835,7 +828,7 @@ void AwtTrayIcon::DisplayMessage(LPCTSTR caption, LPCTSTR text, LPCTSTR msgType) } SendTrayMessage(NIM_MODIFY); - m_nid.uFlags &= ~AWT_NIF_INFO; + m_nid.uFlags &= ~NIF_INFO; } void AwtTrayIcon::_DisplayMessage(void *param) @@ -855,15 +848,15 @@ void AwtTrayIcon::_DisplayMessage(void *param) JNI_CHECK_PEER_GOTO(self, ret); trayIcon = (AwtTrayIcon *)pData; - captionStr = env->GetStringChars(jcaption, (jboolean *)NULL); - textStr = env->GetStringChars(jtext, (jboolean *)NULL); - msgTypeStr = env->GetStringChars(jmsgType, (jboolean *)NULL); + captionStr = JNU_GetStringPlatformChars(env, jcaption, (jboolean *)NULL); + textStr = JNU_GetStringPlatformChars(env, jtext, (jboolean *)NULL); + msgTypeStr = JNU_GetStringPlatformChars(env, jmsgType, (jboolean *)NULL); trayIcon->DisplayMessage(captionStr, textStr, msgTypeStr); - env->ReleaseStringChars(jcaption, captionStr); - env->ReleaseStringChars(jtext, textStr); - env->ReleaseStringChars(jmsgType, msgTypeStr); + JNU_ReleaseStringPlatformChars(env, jcaption, captionStr); + JNU_ReleaseStringPlatformChars(env, jtext, textStr); + JNU_ReleaseStringPlatformChars(env, jmsgType, msgTypeStr); ret: env->DeleteGlobalRef(self); env->DeleteGlobalRef(jcaption); @@ -1057,16 +1050,14 @@ Java_sun_awt_windows_WTrayIconPeer__1displayMessage(JNIEnv *env, jobject self, { TRY; - if (IS_WIN2000) { - DisplayMessageStruct *dms = new DisplayMessageStruct; - dms->trayIcon = env->NewGlobalRef(self); - dms->caption = (jstring)env->NewGlobalRef(caption); - dms->text = (jstring)env->NewGlobalRef(text); - dms->msgType = (jstring)env->NewGlobalRef(msgType); + DisplayMessageStruct *dms = new DisplayMessageStruct; + dms->trayIcon = env->NewGlobalRef(self); + dms->caption = (jstring)env->NewGlobalRef(caption); + dms->text = (jstring)env->NewGlobalRef(text); + dms->msgType = (jstring)env->NewGlobalRef(msgType); - AwtToolkit::GetInstance().SyncCall(AwtTrayIcon::_DisplayMessage, dms); - // global ref is deleted in _DisplayMessage - } + AwtToolkit::GetInstance().SyncCall(AwtTrayIcon::_DisplayMessage, dms); + // global ref is deleted in _DisplayMessage CATCH_BAD_ALLOC(NULL); } diff --git a/jdk/src/windows/native/sun/windows/awt_TrayIcon.h b/jdk/src/windows/native/sun/windows/awt_TrayIcon.h index 6a3c25dd730..8ee418aa794 100644 --- a/jdk/src/windows/native/sun/windows/awt_TrayIcon.h +++ b/jdk/src/windows/native/sun/windows/awt_TrayIcon.h @@ -36,57 +36,11 @@ #define TRAY_ICON_X_HOTSPOT 0 #define TRAY_ICON_Y_HOTSPOT 0 -#define TRAY_ICON_TOOLTIP_MAX_SIZE (IS_WIN2000 ? 128 : 64) +#define TRAY_ICON_TOOLTIP_MAX_SIZE 128 #define TRAY_ICON_BALLOON_TITLE_MAX_SIZE 64 #define TRAY_ICON_BALLOON_INFO_MAX_SIZE 256 -// ********************************************************************** -// The following definitions are duplicates for those from the shellapi.h -// ********************************************************************** - -#define AWT_NOTIFYICON_VERSION 3 - -#define AWT_NIM_SETVERSION 0x00000004 - -#define AWT_NIN_SELECT (WM_USER + 0) -#define AWT_NINF_KEY 0x1 -#define AWT_NIN_KEYSELECT (AWT_NIN_SELECT | AWT_NINF_KEY) -#define AWT_NIN_BALLOONSHOW (WM_USER + 2) -#define AWT_NIN_BALLOONHIDE (WM_USER + 3) -#define AWT_NIN_BALLOONTIMEOUT (WM_USER + 4) -#define AWT_NIN_BALLOONUSERCLICK (WM_USER + 5) - -#define AWT_NIIF_NONE 0x00000000 -#define AWT_NIIF_INFO 0x00000001 -#define AWT_NIIF_WARNING 0x00000002 -#define AWT_NIIF_ERROR 0x00000003 - -#define AWT_NIF_INFO 0x00000010 - -typedef struct _AWT_NOTIFYICONDATA { - DWORD cbSize; - HWND hWnd; - UINT uID; - UINT uFlags; - UINT uCallbackMessage; - HICON hIcon; - TCHAR szTip[128]; - - DWORD dwState; // _WIN32_IE >= 0x0500 - DWORD dwStateMask; - TCHAR szInfo[256]; - union { - UINT uTimeout; - UINT uVersion; - } DUMMYUNIONNAME; - TCHAR szInfoTitle[64]; - DWORD dwInfoFlags; - - GUID guidItem; // _WIN32_IE >= 0x600 -} AWT_NOTIFYICONDATA, *PAWT_NOTIFYICONDATA; - - /************************************************************************ * AwtTrayIcon class */ @@ -174,7 +128,7 @@ public: static int sm_instCount; private: - AWT_NOTIFYICONDATA m_nid; + NOTIFYICONDATA m_nid; /* A bitmask keeps the button's numbers as MK_LBUTTON, MK_MBUTTON, MK_RBUTTON * which are allowed to diff --git a/jdk/src/windows/native/sun/windows/awt_Unicode.cpp b/jdk/src/windows/native/sun/windows/awt_Unicode.cpp deleted file mode 100644 index 669062e5dda..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_Unicode.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 1996-2003 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#include "awt.h" - -LPWSTR J2WHelper1(LPWSTR lpw, LPWSTR lpj, int offset, int nChars) { - memcpy(lpw, lpj + offset, nChars*2); - lpw[nChars] = '\0'; - return lpw; -} - -LPWSTR JNI_J2WHelper1(JNIEnv *env, LPWSTR lpwstr, jstring jstr) { - - int len = env->GetStringLength(jstr); - - env->GetStringRegion(jstr, 0, len, lpwstr); - lpwstr[len] = '\0'; - - return lpwstr; -} - -LPWSTR J2WHelper(LPWSTR lpw, LPWSTR lpj, int nChars) { - return J2WHelper1(lpw, lpj, 0, nChars); -} diff --git a/jdk/src/windows/native/sun/windows/awt_Unicode.h b/jdk/src/windows/native/sun/windows/awt_Unicode.h deleted file mode 100644 index 235140bdac8..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_Unicode.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 1996-2003 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -/* - * Unicode to ANSI string conversion macros, based on a slide from a - * presentation by Asmus Freytag. These must be macros, since the - * alloca() has to be in the caller's stack space. - */ - -#ifndef AWT_UNICODE_H -#define AWT_UNICODE_H - -#include - -// Get a Unicode string copy of a Java String object (Java String aren't -// null-terminated). -extern LPWSTR J2WHelper(LPWSTR lpw, LPWSTR lpj, int nChars); -extern LPWSTR J2WHelper1(LPWSTR lpw, LPWSTR lpj, int offset, int nChars); - -extern LPWSTR JNI_J2WHelper1(JNIEnv *env, LPWSTR lpw, jstring jstr); - -#define TO_WSTRING(jstr) \ - ((jstr == NULL) ? NULL : \ - (JNI_J2WHelper1(env, (LPWSTR) alloca((env->GetStringLength(jstr)+1)*2), \ - jstr) \ - )) - -#endif // AWT_UNICODE_H diff --git a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsConfig.cpp b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsConfig.cpp index 6f2f62c3154..2a23bfa9b3e 100644 --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsConfig.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsConfig.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,12 @@ * have any questions. */ -#include #include "awt.h" #include #include "awt_Win32GraphicsConfig.h" #include "awt_Canvas.h" #include "awt_Win32GraphicsDevice.h" +#include "Devices.h" //Info for building a ColorModel #include "java_awt_image_DataBuffer.h" @@ -93,8 +93,8 @@ JNIEXPORT jobject JNICALL clazz = env->FindClass("java/awt/Rectangle"); mid = env->GetMethodID(clazz, "", "(IIII)V"); if (mid != 0) { - RECT rRW = {0,0,0,0}; - if( TRUE == ::MonitorBounds(AwtWin32GraphicsDevice::GetMonitor(screen), &rRW) ) { + RECT rRW = {0, 0, 0, 0}; + if (TRUE == MonitorBounds(AwtWin32GraphicsDevice::GetMonitor(screen), &rRW)) { bounds = env->NewObject(clazz, mid, rRW.left, rRW.top, rRW.right - rRW.left, diff --git a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.cpp b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.cpp index 047f7148c19..aba41a5a4cb 100644 --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.cpp @@ -37,19 +37,17 @@ * array index. */ -#include -#include #include #include #include "awt_Canvas.h" #include "awt_Win32GraphicsDevice.h" +#include "awt_Window.h" #include "java_awt_Transparency.h" #include "java_awt_color_ColorSpace.h" #include "sun_awt_Win32GraphicsDevice.h" #include "java_awt_image_DataBuffer.h" #include "dither.h" #include "img_util_md.h" -#include "awt_dlls.h" #include "Devices.h" uns_ordered_dither_array img_oda_alpha; @@ -72,7 +70,7 @@ int AwtWin32GraphicsDevice::primaryIndex = 0; * device, and information on whether the primary device is palettized. */ AwtWin32GraphicsDevice::AwtWin32GraphicsDevice(int screen, - MHND mhnd, Devices *arr) + HMONITOR mhnd, Devices *arr) { this->screen = screen; this->devicesArray = arr; @@ -83,8 +81,8 @@ AwtWin32GraphicsDevice::AwtWin32GraphicsDevice(int screen, cData = NULL; gpBitmapInfo = NULL; monitor = mhnd; - pMonitorInfo = (PMONITOR_INFO)new MONITOR_INFO_EXTENDED; - pMonitorInfo->dwSize = sizeof(MONITOR_INFO_EXTENDED); + pMonitorInfo = new MONITORINFOEX; + pMonitorInfo->cbSize = sizeof(MONITORINFOEX); ::GetMonitorInfo(monitor, pMonitorInfo); // Set primary device info: other devices will need to know @@ -93,7 +91,7 @@ AwtWin32GraphicsDevice::AwtWin32GraphicsDevice(int screen, HDC hDC = this->GetDC(); colorData->bitsperpixel = ::GetDeviceCaps(hDC, BITSPIXEL); this->ReleaseDC(hDC); - if (MONITOR_INFO_FLAG_PRIMARY & pMonitorInfo->dwFlags) { + if (MONITORINFOF_PRIMARY & pMonitorInfo->dwFlags) { primaryIndex = screen; if (colorData->bitsperpixel > 8) { primaryPalettized = FALSE; @@ -124,6 +122,24 @@ AwtWin32GraphicsDevice::~AwtWin32GraphicsDevice() } } +HDC AwtWin32GraphicsDevice::MakeDCFromMonitor(HMONITOR hmMonitor) { + HDC retCode = NULL; + if (NULL != hmMonitor) { + MONITORINFOEX mieInfo; + + memset((void*)(&mieInfo), 0, sizeof(MONITORINFOEX)); + mieInfo.cbSize = sizeof(MONITORINFOEX); + + if (TRUE == ::GetMonitorInfo(hmMonitor, (LPMONITORINFOEX)(&mieInfo))) { + HDC hDC = CreateDC(mieInfo.szDevice, NULL, NULL, NULL); + if (NULL != hDC) { + retCode = hDC; + } + } + } + return retCode; +} + HDC AwtWin32GraphicsDevice::GetDC() { return MakeDCFromMonitor(monitor); @@ -164,7 +180,7 @@ void AwtWin32GraphicsDevice::Initialize() VERIFY(::GetDIBits(hBMDC, hBM, 0, 1, NULL, gpBitmapInfo, DIB_RGB_COLORS)); if (colorData->bitsperpixel > 8) { - if (MONITOR_INFO_FLAG_PRIMARY & pMonitorInfo->dwFlags) { + if (MONITORINFOF_PRIMARY & pMonitorInfo->dwFlags) { primaryPalettized = FALSE; } if (colorData->bitsperpixel != 24) { // 15, 16, or 32 bpp @@ -250,7 +266,7 @@ void AwtWin32GraphicsDevice::Initialize() ((int *)gpBitmapInfo->bmiColors)[2] = 0xff0000; } } else { - if (MONITOR_INFO_FLAG_PRIMARY & pMonitorInfo->dwFlags) { + if (MONITORINFOF_PRIMARY & pMonitorInfo->dwFlags) { primaryPalettized = TRUE; } gpBitmapInfo->bmiHeader.biBitCount = 8; @@ -565,8 +581,8 @@ void AwtWin32GraphicsDevice::RealizePalette(HDC hDC) */ int AwtWin32GraphicsDevice::DeviceIndexForWindow(HWND hWnd) { - MHND mon = MonitorFromWindow(hWnd, MONITOR_DEFAULT_TO_NEAR); - int screen = AwtWin32GraphicsDevice::GetScreenFromMHND(mon); + HMONITOR mon = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST); + int screen = AwtWin32GraphicsDevice::GetScreenFromHMONITOR(mon); return screen; } @@ -645,14 +661,14 @@ jobject AwtWin32GraphicsDevice::GetColorModel(JNIEnv *env, jboolean dynamic, return devices->GetDevice(deviceIndex)->GetColorModel(env, dynamic); } -MONITOR_INFO *AwtWin32GraphicsDevice::GetMonitorInfo(int deviceIndex) +LPMONITORINFO AwtWin32GraphicsDevice::GetMonitorInfo(int deviceIndex) { Devices::InstanceAccess devices; return devices->GetDevice(deviceIndex)->GetMonitorInfo(); } /** - * This function updates the data in the MONITOR_INFO structure pointed to by + * This function updates the data in the MONITORINFOEX structure pointed to by * pMonitorInfo for all monitors on the system. Added for 4654713. */ void AwtWin32GraphicsDevice::ResetAllMonitorInfo() @@ -660,14 +676,14 @@ void AwtWin32GraphicsDevice::ResetAllMonitorInfo() Devices::InstanceAccess devices; int devicesNum = devices->GetNumDevices(); for (int deviceIndex = 0; deviceIndex < devicesNum; deviceIndex++) { - MHND monitor = devices->GetDevice(deviceIndex)->GetMonitor(); + HMONITOR monitor = devices->GetDevice(deviceIndex)->GetMonitor(); ::GetMonitorInfo(monitor, devices->GetDevice(deviceIndex)->pMonitorInfo); } } void AwtWin32GraphicsDevice::DisableOffscreenAccelerationForDevice( - MHND hMonitor) + HMONITOR hMonitor) { Devices::InstanceAccess devices; if (hMonitor == NULL) { @@ -682,7 +698,7 @@ void AwtWin32GraphicsDevice::DisableOffscreenAccelerationForDevice( } } -MHND AwtWin32GraphicsDevice::GetMonitor(int deviceIndex) +HMONITOR AwtWin32GraphicsDevice::GetMonitor(int deviceIndex) { Devices::InstanceAccess devices; return devices->GetDevice(deviceIndex)->GetMonitor(); @@ -741,30 +757,31 @@ HDC AwtWin32GraphicsDevice::GetDCFromScreen(int screen) { return MakeDCFromMonitor(dev->GetMonitor()); } -/** Compare elements of MONITOR_INFO structures for the given MHNDs. +/** Compare elements of MONITORINFOEX structures for the given HMONITORs. * If equal, return TRUE */ -BOOL AwtWin32GraphicsDevice::AreSameMonitors(MHND mon1, MHND mon2) { +BOOL AwtWin32GraphicsDevice::AreSameMonitors(HMONITOR mon1, HMONITOR mon2) { J2dTraceLn2(J2D_TRACE_INFO, "AwtWin32GraphicsDevice::AreSameMonitors mhnd1=%x mhnd2=%x", mon1, mon2); DASSERT(mon1 != NULL); DASSERT(mon2 != NULL); - MONITOR_INFO mi1; - MONITOR_INFO mi2; + MONITORINFOEX mi1; + MONITORINFOEX mi2; - memset((void*)(&mi1),0,sizeof(MONITOR_INFO)); - mi1.dwSize = sizeof(MONITOR_INFO); - memset((void*)(&mi2),0,sizeof(MONITOR_INFO)); - mi2.dwSize = sizeof(MONITOR_INFO); + memset((void*)(&mi1), 0, sizeof(MONITORINFOEX)); + mi1.cbSize = sizeof(MONITORINFOEX); + memset((void*)(&mi2), 0, sizeof(MONITORINFOEX)); + mi2.cbSize = sizeof(MONITORINFOEX); - if (::GetMonitorInfo(mon1,&mi1) != 0 && - ::GetMonitorInfo(mon2,&mi2) != 0 ) { - - if (::EqualRect(&mi1.rMonitor,&mi2.rMonitor) && - ::EqualRect(&mi1.rWork,&mi2.rWork) && - mi1.dwFlags == mi1.dwFlags) { + if (::GetMonitorInfo(mon1, &mi1) != 0 && + ::GetMonitorInfo(mon2, &mi2) != 0 ) + { + if (::EqualRect(&mi1.rcMonitor, &mi2.rcMonitor) && + ::EqualRect(&mi1.rcWork, &mi2.rcWork) && + (mi1.dwFlags == mi1.dwFlags)) + { J2dTraceLn(J2D_TRACE_VERBOSE, " the monitors are the same"); return TRUE; @@ -774,15 +791,15 @@ BOOL AwtWin32GraphicsDevice::AreSameMonitors(MHND mon1, MHND mon2) { return FALSE; } -int AwtWin32GraphicsDevice::GetScreenFromMHND(MHND mon) { +int AwtWin32GraphicsDevice::GetScreenFromHMONITOR(HMONITOR mon) { J2dTraceLn1(J2D_TRACE_INFO, - "AwtWin32GraphicsDevice::GetScreenFromMHND mhnd=%x", mon); + "AwtWin32GraphicsDevice::GetScreenFromHMONITOR mhnd=%x", mon); DASSERT(mon != NULL); Devices::InstanceAccess devices; for (int i = 0; i < devices->GetNumDevices(); i++) { - MHND mhnd = devices->GetDevice(i)->GetMonitor(); + HMONITOR mhnd = devices->GetDevice(i)->GetMonitor(); if (AreSameMonitors(mon, mhnd)) { J2dTraceLn1(J2D_TRACE_VERBOSE, " Found device: %d", i); return i; @@ -790,8 +807,8 @@ int AwtWin32GraphicsDevice::GetScreenFromMHND(MHND mon) { } J2dTraceLn1(J2D_TRACE_WARNING, - "AwtWin32GraphicsDevice::GetScreenFromMHND(): "\ - "couldn't find screen for MHND %x, returning default", mon); + "AwtWin32GraphicsDevice::GetScreenFromHMONITOR(): "\ + "couldn't find screen for HMONITOR %x, returning default", mon); return AwtWin32GraphicsDevice::GetDefaultDeviceIndex(); } @@ -1076,19 +1093,19 @@ jobject CreateDisplayMode(JNIEnv* env, jint width, jint height, * of the structure pointed to by lpDisplayDevice is undefined. */ static BOOL -GetAttachedDisplayDevice(int screen, _DISPLAY_DEVICE *lpDisplayDevice) +GetAttachedDisplayDevice(int screen, DISPLAY_DEVICE *lpDisplayDevice) { DWORD dwDeviceNum = 0; - lpDisplayDevice->dwSize = sizeof(_DISPLAY_DEVICE); + lpDisplayDevice->cb = sizeof(DISPLAY_DEVICE); while (EnumDisplayDevices(NULL, dwDeviceNum, lpDisplayDevice, 0) && dwDeviceNum < 20) // avoid infinite loop with buggy drivers { - if (lpDisplayDevice->dwFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) { + if (lpDisplayDevice->StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) { Devices::InstanceAccess devices; - MONITOR_INFO_EXTENDED *pMonInfo = - (PMONITOR_INFO_EXTENDED) devices->GetDevice(screen)->GetMonitorInfo(); + MONITORINFOEX *pMonInfo = + (LPMONITORINFOEX)devices->GetDevice(screen)->GetMonitorInfo(); // make sure the device names match - if (wcscmp(pMonInfo->strDevice, lpDisplayDevice->strDevName) == 0) { + if (wcscmp(pMonInfo->szDevice, lpDisplayDevice->DeviceName) == 0) { return TRUE; } } @@ -1114,9 +1131,9 @@ Java_sun_awt_Win32GraphicsDevice_getCurrentDisplayMode dm.dmSize = sizeof(dm); dm.dmDriverExtra = 0; - _DISPLAY_DEVICE displayDevice; + DISPLAY_DEVICE displayDevice; if (GetAttachedDisplayDevice(screen, &displayDevice)) { - pName = displayDevice.strDevName; + pName = displayDevice.DeviceName; } if (!EnumDisplaySettings(pName, ENUM_CURRENT_SETTINGS, &dm)) { @@ -1156,7 +1173,7 @@ Java_sun_awt_Win32GraphicsDevice_configDisplayMode // ChangeDisplaySettingsEx is not available on NT, // so it'd be nice not to break it if we can help it. if (screen == AwtWin32GraphicsDevice::GetDefaultDeviceIndex()) { - if (ChangeDisplaySettings(&dm, CDS_FULLSCREEN) != + if (::ChangeDisplaySettings(&dm, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) { JNU_ThrowInternalError(env, @@ -1165,15 +1182,9 @@ Java_sun_awt_Win32GraphicsDevice_configDisplayMode return; } - // make sure the function pointer for fn_change_display_settings_ex - // is initialized - load_user_procs(); - - _DISPLAY_DEVICE displayDevice; - if (fn_change_display_settings_ex == NULL || - !GetAttachedDisplayDevice(screen, &displayDevice) || - ((*fn_change_display_settings_ex) - (displayDevice.strDevName, &dm, NULL, CDS_FULLSCREEN, NULL) != + DISPLAY_DEVICE displayDevice; + if (!GetAttachedDisplayDevice(screen, &displayDevice) || + (::ChangeDisplaySettingsEx(displayDevice.DeviceName, &dm, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL)) { JNU_ThrowInternalError(env, @@ -1231,11 +1242,11 @@ JNIEXPORT void JNICALL Java_sun_awt_Win32GraphicsDevice_enumDisplayModes DEVMODE dm; LPTSTR pName = NULL; - _DISPLAY_DEVICE displayDevice; + DISPLAY_DEVICE displayDevice; if (GetAttachedDisplayDevice(screen, &displayDevice)) { - pName = displayDevice.strDevName; + pName = displayDevice.DeviceName; } dm.dmSize = sizeof(dm); diff --git a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.h b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.h index 9d3978ba324..42a7ff18029 100644 --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.h +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsDevice.h @@ -32,7 +32,6 @@ extern "C" { } // extern "C" #include "colordata.h" #include "awt_Palette.h" -#include "awt_MMStub.h" #include "Devices.h" class AwtPalette; @@ -40,7 +39,7 @@ class Devices; class AwtWin32GraphicsDevice { public: - AwtWin32GraphicsDevice(int screen, MHND mhnd, Devices *arr); + AwtWin32GraphicsDevice(int screen, HMONITOR mhnd, Devices *arr); ~AwtWin32GraphicsDevice(); void UpdateDeviceColorState(); void SetGrayness(int grayValue); @@ -60,8 +59,8 @@ public: HPALETTE GetPalette(); ColorData *GetColorData() { return cData; } int GetBitDepth() { return colorData->bitsperpixel; } - MHND GetMonitor() { return monitor; } - MONITOR_INFO *GetMonitorInfo() { return pMonitorInfo; } + HMONITOR GetMonitor() { return monitor; } + LPMONITORINFO GetMonitorInfo() { return pMonitorInfo; } jobject GetJavaDevice() { return javaDevice; } int GetDeviceIndex() { return screen; } void Release(); @@ -78,14 +77,14 @@ public: static void UpdateDynamicColorModel(int deviceIndex); static BOOL UpdateSystemPalette(int deviceIndex); static HPALETTE GetPalette(int deviceIndex); - static MHND GetMonitor(int deviceIndex); - static MONITOR_INFO *GetMonitorInfo(int deviceIndex); + static HMONITOR GetMonitor(int deviceIndex); + static LPMONITORINFO GetMonitorInfo(int deviceIndex); static void ResetAllMonitorInfo(); static BOOL IsPrimaryPalettized() { return primaryPalettized; } static int GetDefaultDeviceIndex() { return primaryIndex; } - static void DisableOffscreenAccelerationForDevice(MHND hMonitor); + static void DisableOffscreenAccelerationForDevice(HMONITOR hMonitor); static HDC GetDCFromScreen(int screen); - static int GetScreenFromMHND(MHND mon); + static int GetScreenFromHMONITOR(HMONITOR mon); static int primaryIndex; static BOOL primaryPalettized; @@ -97,17 +96,19 @@ public: static jmethodID paletteChangedMID; private: - static BOOL AreSameMonitors(MHND mon1, MHND mon2); + static BOOL AreSameMonitors(HMONITOR mon1, HMONITOR mon2); ImgColorData *colorData; AwtPalette *palette; ColorData *cData; // Could be static, but may sometime // have per-device info in this structure BITMAPINFO *gpBitmapInfo; int screen; - MHND monitor; - MONITOR_INFO *pMonitorInfo; + HMONITOR monitor; + LPMONITORINFO pMonitorInfo; jobject javaDevice; Devices *devicesArray; + + static HDC MakeDCFromMonitor(HMONITOR); }; #endif AWT_WIN32GRAPHICSDEVICE_H diff --git a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp index 398e17d27d8..1617d54e657 100644 --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp @@ -23,8 +23,6 @@ * have any questions. */ -#include -#include #include #include #include "awt_Canvas.h" @@ -188,44 +186,6 @@ Java_sun_awt_Win32GraphicsEnvironment_getDefaultScreen(JNIEnv *env, return AwtWin32GraphicsDevice::GetDefaultDeviceIndex(); } -#define FR_PRIVATE 0x10 /* from wingdi.h */ -typedef int (WINAPI *AddFontResourceExType)(LPCTSTR,DWORD,VOID*); -typedef int (WINAPI *RemoveFontResourceExType)(LPCTSTR,DWORD,VOID*); - -static AddFontResourceExType procAddFontResourceEx = NULL; -static RemoveFontResourceExType procRemoveFontResourceEx = NULL; - -static int winVer = -1; - -static int getWinVer() { - if (winVer == -1) { - OSVERSIONINFO osvi; - osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&osvi); - winVer = osvi.dwMajorVersion; - if (winVer >= 5) { - // REMIND verify on 64 bit windows - HMODULE hGDI = LoadLibrary(TEXT("gdi32.dll")); - if (hGDI != NULL) { - procAddFontResourceEx = - (AddFontResourceExType)GetProcAddress(hGDI,"AddFontResourceExW"); - if (procAddFontResourceEx == NULL) { - winVer = 0; - } - procRemoveFontResourceEx = - (RemoveFontResourceExType)GetProcAddress(hGDI, - "RemoveFontResourceExW"); - if (procRemoveFontResourceEx == NULL) { - winVer = 0; - } - FreeLibrary(hGDI); - } - } - } - - return winVer; -} - /* * Class: sun_awt_Win32GraphicsEnvironment * Method: registerFontWithPlatform @@ -236,9 +196,10 @@ Java_sun_awt_Win32GraphicsEnvironment_registerFontWithPlatform(JNIEnv *env, jclass cl, jstring fontName) { - if (getWinVer() >= 5 && procAddFontResourceEx != NULL) { - LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, NULL); - (*procAddFontResourceEx)(file, FR_PRIVATE, NULL); + LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, JNI_FALSE); + if (file) { + ::AddFontResourceEx(file, FR_PRIVATE, NULL); + JNU_ReleaseStringPlatformChars(env, fontName, file); } } @@ -255,9 +216,10 @@ Java_sun_awt_Win32GraphicsEnvironment_deRegisterFontWithPlatform(JNIEnv *env, jclass cl, jstring fontName) { - if (getWinVer() >= 5 && procRemoveFontResourceEx != NULL) { - LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, NULL); - (*procRemoveFontResourceEx)(file, FR_PRIVATE, NULL); + LPTSTR file = (LPTSTR)JNU_GetStringPlatformChars(env, fontName, JNI_FALSE); + if (file) { + ::RemoveFontResourceEx(file, FR_PRIVATE, NULL); + JNU_ReleaseStringPlatformChars(env, fontName, file); } } diff --git a/jdk/src/windows/native/sun/windows/awt_Window.cpp b/jdk/src/windows/native/sun/windows/awt_Window.cpp index 13b41863235..0c9bce1210d 100644 --- a/jdk/src/windows/native/sun/windows/awt_Window.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Window.cpp @@ -23,7 +23,7 @@ * have any questions. */ -#include +#include "awt.h" #include "awt_Component.h" #include "awt_Container.h" @@ -32,7 +32,6 @@ #include "awt_Panel.h" #include "awt_Toolkit.h" #include "awt_Window.h" -#include "awt_dlls.h" #include "awt_Win32GraphicsDevice.h" #include "awt_BitmapUtil.h" #include "awt_IconCursor.h" @@ -42,6 +41,8 @@ #include #include "sun_awt_windows_WCanvasPeer.h" +#include + #if !defined(__int3264) typedef __int32 LONG_PTR; #endif // __int3264 @@ -501,8 +502,7 @@ void AwtWindow::Show() // which might involve tagging java.awt.Window instances with a semantic // property so platforms can animate/decorate/etc accordingly. // - if ((IS_WIN98 || IS_WIN2000) && - JNU_IsInstanceOfByName(env, target, "com/sun/java/swing/plaf/windows/WindowsPopupWindow") > 0) + if (JNU_IsInstanceOfByName(env, target, "com/sun/java/swing/plaf/windows/WindowsPopupWindow") > 0) { // need this global ref to make the class unloadable (see 6500204) static jclass windowsPopupWindowCls; @@ -535,13 +535,8 @@ void AwtWindow::Show() windowType = env->GetIntField(target, windowTypeFID); if (windowType == windowTYPES[TOOLTIP]) { - if (IS_WIN2000) { - SystemParametersInfo(SPI_GETTOOLTIPANIMATION, 0, &animateflag, 0); - SystemParametersInfo(SPI_GETTOOLTIPFADE, 0, &fadeflag, 0); - } else { - // use same setting as menus - SystemParametersInfo(SPI_GETMENUANIMATION, 0, &animateflag, 0); - } + SystemParametersInfo(SPI_GETTOOLTIPANIMATION, 0, &animateflag, 0); + SystemParametersInfo(SPI_GETTOOLTIPFADE, 0, &fadeflag, 0); if (animateflag) { // AW_BLEND currently produces runtime parameter error // animateStyle = fadeflag? AW_BLEND : AW_SLIDE | AW_VER_POSITIVE; @@ -551,13 +546,10 @@ void AwtWindow::Show() windowType == windowTYPES[POPUPMENU]) { SystemParametersInfo(SPI_GETMENUANIMATION, 0, &animateflag, 0); if (animateflag) { - - if (IS_WIN2000) { - SystemParametersInfo(SPI_GETMENUFADE, 0, &fadeflag, 0); - if (fadeflag) { - // AW_BLEND currently produces runtime parameter error - //animateStyle = AW_BLEND; - } + SystemParametersInfo(SPI_GETMENUFADE, 0, &fadeflag, 0); + if (fadeflag) { + // AW_BLEND currently produces runtime parameter error + //animateStyle = AW_BLEND; } if (animateStyle == 0 && !fadeflag) { animateStyle = AW_SLIDE; @@ -578,38 +570,18 @@ void AwtWindow::Show() } if (animateStyle != 0) { - load_user_procs(); - - if (fn_animate_window != NULL) { - BOOL result = (*fn_animate_window)(hWnd, (DWORD)200, animateStyle); - if (result == 0) { - LPTSTR msgBuffer = NULL; - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&msgBuffer, // it's an output parameter when allocate buffer is used - 0, - NULL); - - if (msgBuffer == NULL) { - msgBuffer = TEXT(""); - } - _ftprintf(stderr,TEXT("AwtWindow::Show: AnimateWindow: ")); - _ftprintf(stderr,msgBuffer); - LocalFree(msgBuffer); - } else { - // WM_PAINT is not automatically sent when invoking AnimateWindow, - // so force an expose event - RECT rect; - ::GetWindowRect(hWnd,&rect); - ::ScreenToClient(hWnd, (LPPOINT)&rect); - ::InvalidateRect(hWnd,&rect,TRUE); - ::UpdateWindow(hWnd); - done = TRUE; - } + BOOL result = ::AnimateWindow(hWnd, (DWORD)200, animateStyle); + if (!result) { + // TODO: log message + } else { + // WM_PAINT is not automatically sent when invoking AnimateWindow, + // so force an expose event + RECT rect; + ::GetWindowRect(hWnd,&rect); + ::ScreenToClient(hWnd, (LPPOINT)&rect); + ::InvalidateRect(hWnd, &rect, TRUE); + ::UpdateWindow(hWnd); + done = TRUE; } } } @@ -1205,16 +1177,17 @@ MsgRouting AwtWindow::WmNcPaint(HRGN hrgn) } /* draw warning text */ - LPWSTR text = TO_WSTRING(warningString); + LPCWSTR text = JNU_GetStringPlatformChars(env, warningString, NULL); VERIFY(::SetBkColor(hDC, ::GetSysColor(COLOR_BTNFACE)) != CLR_INVALID); VERIFY(::SetTextColor(hDC, ::GetSysColor(COLOR_BTNTEXT)) != CLR_INVALID); VERIFY(::SelectObject(hDC, ::GetStockObject(DEFAULT_GUI_FONT)) != NULL); VERIFY(::SetTextAlign(hDC, TA_LEFT | TA_BOTTOM) != GDI_ERROR); - VERIFY(::ExtTextOutW(hDC, r.left+2, r.bottom-1, + VERIFY(::ExtTextOut(hDC, r.left+2, r.bottom-1, ETO_CLIPPED | ETO_OPAQUE, &r, text, static_cast(wcslen(text)), NULL)); VERIFY(::RestoreDC(hDC, iSaveDC)); ::ReleaseDC(GetHWnd(), hDC); + JNU_ReleaseStringPlatformChars(env, warningString, text); } env->DeleteLocalRef(target); @@ -1360,13 +1333,13 @@ void AwtWindow::RedrawNonClient() } int AwtWindow::GetScreenImOn() { - MHND hmon; + HMONITOR hmon; int scrnNum; - hmon = ::MonitorFromWindow(GetHWnd(), MONITOR_DEFAULT_TO_PRIMARY); + hmon = ::MonitorFromWindow(GetHWnd(), MONITOR_DEFAULTTOPRIMARY); DASSERT(hmon != NULL); - scrnNum = AwtWin32GraphicsDevice::GetScreenFromMHND(hmon); + scrnNum = AwtWin32GraphicsDevice::GetScreenFromHMONITOR(hmon); DASSERT(scrnNum > -1); return scrnNum; @@ -1619,10 +1592,10 @@ void AwtWindow::_SetTitle(void *param) if (::IsWindow(w->GetHWnd())) { int length = env->GetStringLength(title); - WCHAR *buffer = new WCHAR[length + 1]; - env->GetStringRegion(title, 0, length, buffer); + TCHAR *buffer = new TCHAR[length + 1]; + env->GetStringRegion(title, 0, length, reinterpret_cast(buffer)); buffer[length] = L'\0'; - VERIFY(::SetWindowTextW(w->GetHWnd(), buffer)); + VERIFY(::SetWindowText(w->GetHWnd(), buffer)); delete[] buffer; } ret: @@ -1967,13 +1940,11 @@ void AwtWindow::_SetFocusableWindow(void *param) window->m_isFocusableWindow = isFocusableWindow; - if (IS_WIN2000) { - if (!window->m_isFocusableWindow) { - LONG isPopup = window->GetStyle() & WS_POPUP; - window->SetStyleEx(window->GetStyleEx() | (isPopup ? 0 : WS_EX_APPWINDOW) | AWT_WS_EX_NOACTIVATE); - } else { - window->SetStyleEx(window->GetStyleEx() & ~WS_EX_APPWINDOW & ~AWT_WS_EX_NOACTIVATE); - } + if (!window->m_isFocusableWindow) { + LONG isPopup = window->GetStyle() & WS_POPUP; + window->SetStyleEx(window->GetStyleEx() | (isPopup ? 0 : WS_EX_APPWINDOW) | AWT_WS_EX_NOACTIVATE); + } else { + window->SetStyleEx(window->GetStyleEx() & ~WS_EX_APPWINDOW & ~AWT_WS_EX_NOACTIVATE); } ret: diff --git a/jdk/src/windows/native/sun/windows/awt_dlls.cpp b/jdk/src/windows/native/sun/windows/awt_dlls.cpp deleted file mode 100644 index 26af4196dd9..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_dlls.cpp +++ /dev/null @@ -1,422 +0,0 @@ -/* - * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#include "awt.h" -#include "awt_dlls.h" - -/* - * To reduce memory footprint we don't statically link to COMDLG32.DLL - * and SHELL32. Instead we programatically load them only when they are - * needed. - */ - -PrintDlgType AwtCommDialog::do_print_dlg; -PageSetupDlgType AwtCommDialog::do_page_setup_dlg; -GetOpenFileNameType AwtCommDialog::get_open_file_name; -GetSaveFileNameType AwtCommDialog::get_save_file_name; -GetExtendedErrorType AwtCommDialog::get_dlg_extended_error; - -/***********************************************************************/ - -DWORD -AwtCommDialog::CommDlgExtendedError(VOID) { - AwtCommDialog::load_comdlg_procs(); - return static_cast(reinterpret_cast( - AwtToolkit::GetInstance(). - InvokeFunction(reinterpret_cast - (AwtCommDialog::GetExtendedErrorWrapper)))); -} - -BOOL -AwtCommDialog::PrintDlg(LPPRINTDLG data) { - AwtCommDialog::load_comdlg_procs(); - return static_cast(reinterpret_cast( - AwtToolkit::GetInstance(). - InvokeFunction(reinterpret_cast - (AwtCommDialog::PrintDlgWrapper), data))); -} - -BOOL -AwtCommDialog::PageSetupDlg(LPPAGESETUPDLG data) { - AwtCommDialog::load_comdlg_procs(); - return static_cast(reinterpret_cast( - AwtToolkit::GetInstance(). - InvokeFunction(reinterpret_cast - (AwtCommDialog::PageSetupDlgWrapper), data))); -} - -/* - * Load the COMDLG32.dll and get pointers to various procedures. - */ - -void -AwtCommDialog::load_comdlg_procs() -{ - static int initialized = 0; - HMODULE lib = NULL; - if (initialized) { - return; - } - lib = LoadLibrary(TEXT("COMDLG32.DLL")); - HMODULE libUnicows = UnicowsLoader::GetModuleHandle(); - do_print_dlg = (PrintDlgType)GetProcAddress(IS_WIN95 ? libUnicows : lib, "PrintDlgW"); - do_page_setup_dlg = (PageSetupDlgType)GetProcAddress(IS_WIN95 ? libUnicows : lib, "PageSetupDlgW"); - get_open_file_name = (GetOpenFileNameType)GetProcAddress(IS_WIN95 ? libUnicows : lib, "GetOpenFileNameW"); - get_save_file_name = (GetSaveFileNameType)GetProcAddress(IS_WIN95 ? libUnicows : lib, "GetSaveFileNameW"); - get_dlg_extended_error = (GetExtendedErrorType)GetProcAddress(lib, "CommDlgExtendedError"); - initialized = 1; -} - -/***********************************************************************/ - -DragQueryFileType do_drag_query_file; -GetPathFromIDListType get_path_from_idlist; - -/* - * Load the SHELL32.dll and get pointers to various procedures. - */ - -void -load_shell_procs() -{ - static int initialized = 0; - HMODULE lib = NULL; - if (initialized) { - return; - } - - if (IS_WIN95) { - lib = UnicowsLoader::GetModuleHandle(); - } else { - lib = LoadLibrary(TEXT("SHELL32.DLL")); - } - - do_drag_query_file = (DragQueryFileType)GetProcAddress(lib, "DragQueryFileW"); - get_path_from_idlist = (GetPathFromIDListType)GetProcAddress(lib, - "SHGetPathFromIDListW"); - initialized = 1; -} - -/***********************************************************************/ - -AnimateWindowType fn_animate_window; -ChangeDisplaySettingsExType fn_change_display_settings_ex; - -/* - * Load the USER32.dll and get pointers to various procedures. - */ - -void -load_user_procs() -{ - static int initialized = 0; - HMODULE lib = NULL; - if (initialized) { - return; - } - lib = LoadLibrary(TEXT("USER32.DLL")); - HMODULE libUnicows = UnicowsLoader::GetModuleHandle(); - fn_animate_window = (AnimateWindowType)GetProcAddress(lib, "AnimateWindow"); - fn_change_display_settings_ex = (ChangeDisplaySettingsExType) - GetProcAddress(IS_WIN95 ? libUnicows : lib, "ChangeDisplaySettingsExW"); - initialized = 1; -} - -/***********************************************************************/ - -GetFileVersionInfoSizeType get_file_version_info_size; -GetFileVersionInfoType get_file_version_info; -VerQueryValueType do_ver_query_value; - -/* - * Load the VERSION.dll and get pointers to various procedures. - */ - -void -load_version_procs() -{ - static int initialized = 0; - HMODULE lib = NULL; - if (initialized) { - return; - } - - if (IS_WIN95) { - lib = UnicowsLoader::GetModuleHandle(); - } else { - lib = LoadLibrary(TEXT("VERSION.DLL")); - } - - get_file_version_info_size = - (GetFileVersionInfoSizeType)GetProcAddress(lib, "GetFileVersionInfoSizeW"); - get_file_version_info = - (GetFileVersionInfoType)GetProcAddress(lib, "GetFileVersionInfoW"); - do_ver_query_value = - (VerQueryValueType)GetProcAddress(lib, "VerQueryValueW"); - initialized = 1; -} - -/***********************************************************************/ - -#define MAX_KNOWN_VERSION 4 - -/* - * We are going to use an undocumented procedure RSRC32.DLL. - * The safest will be to use it only for a finite set of known versions. - */ - -DWORD known_versions[MAX_KNOWN_VERSION][2] = { - { 0x00040000, 0x000003B6 }, // WIN95\RETAIL - // WIN95\RETAIL\UPGRADE - // WIN95\OSR2 - // WIN95\OSR25 - // WIN95\international\RETAIL - // WIN95\international\OSR2 - - { 0x0004000A, 0x00000672 }, // WIN98\international\win98beta3 - - { 0x0004000A, 0x000007CE }, // WIN98\RETAIL - // WIN98\international\RETAIL - // WIN98\SE - - { 0x0004005A, 0x00000BB8 } // WIN98ME -}; - -GetFreeSystemResourcesType get_free_system_resources = NULL; - -/* - * Load the RSRC32.dll, check that it is a known version - * and get the pointer to the undocumented procedure. - */ - -void -load_rsrc32_procs() -{ - static int initialized = 0; - if (initialized) { - return; - } - if (IS_NT) { - // 4310028: Only load library on non-NT systems. The load - // will always fail anyways. However, if a Win 9x OS is - // also installed on the system, and the user's path - // includes C:\WINDOWS\SYSTEM, or the equivalent, a really - // ugly and annoying warning dialog will appear. - initialized = 1; - return; - } - HMODULE lib = LoadLibrary(TEXT("RSRC32.DLL")); - if (lib != NULL) { - TCHAR szFullPath[_MAX_PATH]; - DWORD dwVerHnd = 0; - DWORD dwVersionInfoSize; - LPBYTE lpVersionInfo; - LPVOID lpBuffer; - UINT uLength = 0; - - /* - * We use undocumented procedure exported by RSRC32.DLL, so the - * safest will be to check the library's version and only attempt - * to get the procedure address if it's a known version. - */ - if (::GetModuleFileName(lib, szFullPath, sizeof(szFullPath))) { - load_version_procs(); - dwVersionInfoSize = (*get_file_version_info_size)(szFullPath, &dwVerHnd); - if (dwVersionInfoSize) { - lpVersionInfo = new BYTE[dwVersionInfoSize]; - (*get_file_version_info)(szFullPath, dwVerHnd, - dwVersionInfoSize, lpVersionInfo); - if ((*do_ver_query_value)(lpVersionInfo, TEXT("\\"), &lpBuffer, &uLength)) { - VS_FIXEDFILEINFO *lpvsFixedFileInfo = (VS_FIXEDFILEINFO *)lpBuffer; - DWORD dwFileVersionMS = lpvsFixedFileInfo->dwFileVersionMS; - DWORD dwFileVersionLS = lpvsFixedFileInfo->dwFileVersionLS; - for (int i = 0; i < MAX_KNOWN_VERSION; i++) { - if ((known_versions[i][0] == dwFileVersionMS) && - (known_versions[i][1] == dwFileVersionLS)) { - get_free_system_resources = - (GetFreeSystemResourcesType) - ::GetProcAddress(lib, "_MyGetFreeSystemResources32@4"); - break; - } - } - } - delete[] lpVersionInfo; - } - } - } - initialized = 1; -} - -void -load_rich_edit_library() { - static int initialized = 0; - BOOL isRichEdit32Needed = IS_WIN95 && !IS_WIN98; - - if (initialized) { - return; - } - - HMODULE lib = NULL; - if (isRichEdit32Needed) { - lib = ::LoadLibrary(TEXT("RICHED32.DLL")); - } else { - lib = ::LoadLibrary(TEXT("RICHED20.DLL")); - } - if (lib == NULL) { - JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); - JNU_ThrowInternalError(env, "Can't load a rich edit DLL"); - } else if (isRichEdit32Needed) { - // Richedit language checking logic is needed for RICHED32.DLL only. - LPTSTR szFullPath = new TCHAR[_MAX_PATH]; - DWORD dwVerHnd = 0; - DWORD dwVersionInfoSize; - LPVOID lpVersionInfo; - UINT uLength = 0; - struct LANGANDCODEPAGE { - WORD wLanguage; - WORD wCodePage; - } *lpTranslate; - - try { - if (!IS_WIN2000 && ::GetModuleFileName(lib, szFullPath, _MAX_PATH)) { - load_version_procs(); - dwVersionInfoSize = (*get_file_version_info_size)(szFullPath, &dwVerHnd); - if (dwVersionInfoSize) { - lpVersionInfo = new BYTE[dwVersionInfoSize]; - try { - if ((*get_file_version_info)(szFullPath, - dwVerHnd, - dwVersionInfoSize, - lpVersionInfo) - && (*do_ver_query_value)(lpVersionInfo, - TEXT("\\VarFileInfo\\Translation"), - (LPVOID*)&lpTranslate, - &uLength)) { - - if (::GetSystemMetrics(SM_DBCSENABLED) - && LANGIDFROMLCID(::GetThreadLocale()) != lpTranslate[0].wLanguage) { - - JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); - if (env->PushLocalFrame(6) >= 0) { - jstring keystr = env->NewStringUTF("AWT.InconsistentDLLsWarning"); - jstring defstr = env->NewStringUTF( -"Text based operations may not work correctly due to \ -an inconsistent set of dynamic linking libraries (DLLs) installed on your \ -system. For more information on this problem and a suggested workaround \ -please see the Java(TM) 2 SDK, Standard Edition Release Notes \ -on java.sun.com."); - - jstring retstr = - (jstring) JNU_CallStaticMethodByName( - env, - NULL, - "java/awt/Toolkit", - "getProperty", - "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", - keystr, - defstr).l; - - jboolean exception; - jstring pkgstr = env->NewStringUTF("java.awt"); - jobject logger = - (jobject) JNU_CallStaticMethodByName( - env, - &exception, - "java/util/logging/Logger", - "getLogger", - "(Ljava/lang/String;)Ljava/util/logging/Logger;", - pkgstr).l; - - jstring msgstr = (retstr) ? retstr : defstr; - if (!exception) { - JNU_CallMethodByName( - env, - NULL, - logger, - "warning", - "(Ljava/lang/String;)V", - msgstr); - } else { - LPCTSTR outstr = JNU_GetStringPlatformChars(env, msgstr, NULL); - _ftprintf(stdout, TEXT("\nWARNING: %s\n"), outstr); - fflush(stdout); - JNU_ReleaseStringPlatformChars(env, msgstr, outstr); - } - - env->PopLocalFrame(NULL); - } - } - } - } catch (...) { - delete[] lpVersionInfo; - throw; - } - delete[] lpVersionInfo; - } - } - } catch (...) { - delete[] szFullPath; - throw; - } - delete[] szFullPath; - } - initialized = 1; -} - -/***********************************************************************/ - -bool AwtWinMM::initialized = false; -AwtWinMM::PlaySoundWFunc* AwtWinMM::playSoundFunc = NULL; - -BOOL AwtWinMM::PlaySoundWrapper(LPCTSTR pszSound, HMODULE hmod, DWORD fdwSound) { - load_winmm_procs(); - if (playSoundFunc == NULL) { - return FALSE; - } - return (*playSoundFunc)(pszSound, hmod, fdwSound); -} - -void AwtWinMM::load_winmm_procs() { - if (initialized) { - return; - } - HMODULE dll = NULL; - - if (IS_WIN95) { - dll = UnicowsLoader::GetModuleHandle(); - } else { - dll = ::LoadLibrary(TEXT("winmm.dll")); - } - - if (dll == NULL) { - return; - } - playSoundFunc = - (PlaySoundWFunc*) GetProcAddress(dll, "PlaySoundW"); - if (playSoundFunc == NULL) { - return; - } - initialized = true; -} diff --git a/jdk/src/windows/native/sun/windows/awt_dlls.h b/jdk/src/windows/native/sun/windows/awt_dlls.h deleted file mode 100644 index b7e08980226..00000000000 --- a/jdk/src/windows/native/sun/windows/awt_dlls.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright 1999-2003 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#ifndef AWT_DLLS_H -#define AWT_DLLS_H - -#include -#include -#include -#include "awt_FileDialog.h" -#include "awt_PrintDialog.h" - -/* - * To reduce memory footprint we don't statically link to COMDLG32.DLL - * and SHELL32. Instead we programatically load them only when they are - * needed. - */ - -//--------------------------------------------------------------------------- - -typedef BOOL (APIENTRY *PrintDlgType)(LPPRINTDLGW); -typedef BOOL (APIENTRY *PageSetupDlgType)(LPPAGESETUPDLGW); -typedef BOOL (APIENTRY *GetOpenFileNameType)(LPOPENFILENAMEW); -typedef BOOL (APIENTRY *GetSaveFileNameType)(LPOPENFILENAMEW); -typedef DWORD (APIENTRY *GetExtendedErrorType)(VOID); - -class AwtCommDialog { -public: - static DWORD CommDlgExtendedError(VOID); - - static BOOL PrintDlg(LPPRINTDLG data); - - static BOOL PageSetupDlg(LPPAGESETUPDLG data); - -private: - static void load_comdlg_procs(); - - // Use wrapper functions with default calling convention. If the - // default isn't __stdcall, accessing the Win32 functions directly - // will cause stack corruption if we cast away __stdcall. - static BOOL PrintDlgWrapper(LPPRINTDLG data) { - return (*do_print_dlg)(data); - } - static BOOL PageSetupDlgWrapper(LPPAGESETUPDLG data) { - return (*do_page_setup_dlg)(data); - } - static BOOL GetOpenFileNameWrapper(LPOPENFILENAME data) { - return (*get_open_file_name)(data); - } - static BOOL GetSaveFileNameWrapper(LPOPENFILENAME data) { - return (*get_save_file_name)(data); - } - static DWORD GetExtendedErrorWrapper(VOID) { - return (*get_dlg_extended_error)(); - } - - friend BOOL AwtFileDialog::GetOpenFileName(LPAWTOPENFILENAME); - friend BOOL AwtFileDialog::GetSaveFileName(LPAWTOPENFILENAME); - friend BOOL AwtPrintDialog::PrintDlg(LPPRINTDLG); - - static PrintDlgType do_print_dlg; - static PageSetupDlgType do_page_setup_dlg; - static GetOpenFileNameType get_open_file_name; - static GetSaveFileNameType get_save_file_name; - static GetExtendedErrorType get_dlg_extended_error; -}; - -//--------------------------------------------------------------------------- - -// Dynamically load in SHELL32.DLL and define the procedure pointers listed below. -extern void load_shell_procs(); - -// Procedure pointers obtained from SHELL32.DLL -// You must call load_shell_procs() before using any of these. -typedef UINT (APIENTRY *DragQueryFileType)(HDROP,UINT,LPTSTR,UINT); -typedef BOOL (APIENTRY *GetPathFromIDListType)(LPCITEMIDLIST,LPTSTR); -extern DragQueryFileType do_drag_query_file; -extern GetPathFromIDListType get_path_from_idlist; - -//--------------------------------------------------------------------------- - -// Dynamically load in USER32.DLL and define the procedure pointers listed below. -extern void load_user_procs(); - -// Procedure pointers obtained from USER32.DLL -// You must call load_user_procs() before using any of these. -typedef BOOL (WINAPI *AnimateWindowType)(HWND,DWORD,DWORD); -typedef LONG (WINAPI *ChangeDisplaySettingsExType)(LPCTSTR,LPDEVMODE,HWND,DWORD,LPVOID lParam); -extern AnimateWindowType fn_animate_window; -extern ChangeDisplaySettingsExType fn_change_display_settings_ex; - -//--------------------------------------------------------------------------- - -// Dynamically load in VERSION.DLL and define the procedure pointers listed below. -extern void load_version_procs(); - -// Procedure pointers obtained from VERSION.DLL -// You must call load_version_procs() before using any of these. -typedef DWORD (APIENTRY *GetFileVersionInfoSizeType)(LPTSTR,LPDWORD); -typedef BOOL (APIENTRY *GetFileVersionInfoType)(LPTSTR,DWORD,DWORD,LPVOID); -typedef BOOL (APIENTRY *VerQueryValueType)(const LPVOID,LPTSTR,LPVOID*,PUINT); -extern GetFileVersionInfoSizeType get_file_version_info_size; -extern GetFileVersionInfoType get_file_version_info; -extern VerQueryValueType do_ver_query_value; - -//--------------------------------------------------------------------------- - -// Dynamically load in RSRC32.DLL and define the procedure pointers listed below. -extern void load_rsrc32_procs(); - -// Procedure pointers obtained from RSRC32.DLL -// You must call load_rsrc32_procs() before using this procedure. - -/* - * NOTE: even after load_rsrc32_procs() you must check that - * the function pointer is valid before use. - * It will be NULL in three cases: - * 1.RSRC32.DLL not found. This means that Resource Meter - * isn't installed. - * 2.RSRC32.DLL can't be loaded. This happens on WinNT. - * 3.Unknown version of RSRC32.DLL. This is undocumented - * procedure, so the safest will be to use it only for - * a finite set of known versions. - */ -typedef UINT (APIENTRY *GetFreeSystemResourcesType)(UINT); - -extern GetFreeSystemResourcesType get_free_system_resources; - -extern void load_rich_edit_library(); - -//--------------------------------------------------------------------------- - -/* - * Loading WINMM.DLL (the Windows MultiMedia library) is extremely - * expensive. The AWT only uses it to play certain Windows sounds - * (which are off by default) so we dynamically load it upon demand - * instead of statically linking to it. - */ - -class AwtWinMM { -public: - static BOOL PlaySoundWrapper(LPCTSTR pszSound, HMODULE hmod, DWORD fdwSound); - -private: - static void load_winmm_procs(); - static bool initialized; - typedef BOOL WINAPI PlaySoundWFunc(LPCTSTR pszSound, HMODULE hmod, DWORD fdwSound); - static PlaySoundWFunc* playSoundFunc; -}; - -#endif /* AWT_DLLS_H */ diff --git a/jdk/src/windows/native/sun/windows/awtmsg.h b/jdk/src/windows/native/sun/windows/awtmsg.h index fe03b0c460c..35e436b53e7 100644 --- a/jdk/src/windows/native/sun/windows/awtmsg.h +++ b/jdk/src/windows/native/sun/windows/awtmsg.h @@ -182,18 +182,6 @@ extern const UINT SYSCOMMAND_IMM; #endif //AW_BLEND - - -// WM_MOUSEWHEEL should be WM_MOUSELAST, but -// is not being defined. See winuser.h -#ifdef WM_MOUSELAST -#if WM_MOUSELAST <= 0x020A -#define WM_AWT_MOUSELAST 0x020A -#else -#error Unexpected value of WM_MOUSELAST -#endif //WM_MOUSELAST <= 0x0209 -#endif //WM_MOUSELAST - // AwtComponent messages enum { // 6427323: unfortunately WM_APP+nnn conflicts with edit control messages diff --git a/jdk/src/windows/native/sun/windows/jawt.cpp b/jdk/src/windows/native/sun/windows/jawt.cpp index 91de38a9fd5..ae2d09dd4d9 100644 --- a/jdk/src/windows/native/sun/windows/jawt.cpp +++ b/jdk/src/windows/native/sun/windows/jawt.cpp @@ -1,5 +1,5 @@ /* - * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ #define _JNI_IMPLEMENTATION_ #include +#include "awt.h" #include "awt_DrawingSurface.h" /* From 4bdcbbe0b6c29bf611f481e4b76f3b468cf07eed Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Tue, 26 Aug 2008 16:31:13 +0400 Subject: [PATCH 002/199] 6741364: Some input method problems after the fix for 6585765 The fix for 6585765 is corrected Reviewed-by: uta --- .../native/sun/windows/awt_InputTextInfor.cpp | 14 +++++++------- .../native/sun/windows/awt_InputTextInfor.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp index d904a5e9636..3c26fbb95d0 100644 --- a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp +++ b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp @@ -131,7 +131,7 @@ AwtInputTextInfor::GetContextData(HIMC hIMC, const LPARAM flags) { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); if (m_cStrW > 0) { - m_jtext = MakeJavaString(env, m_lpStrW); + m_jtext = MakeJavaString(env, m_lpStrW, m_cStrW); } // Merge the string if necessary @@ -182,12 +182,12 @@ AwtInputTextInfor::~AwtInputTextInfor() { } -jstring AwtInputTextInfor::MakeJavaString(JNIEnv* env, LPWSTR lpStrW) { +jstring AwtInputTextInfor::MakeJavaString(JNIEnv* env, LPWSTR lpStrW, int cStrW) { - if (env == NULL || lpStrW == NULL) { + if (env == NULL || lpStrW == NULL || cStrW == 0) { return NULL; } else { - return JNU_NewStringPlatform(env, lpStrW); + return env->NewString(reinterpret_cast(lpStrW), cStrW); } } @@ -246,14 +246,14 @@ int AwtInputTextInfor::GetClauseInfor(int*& lpBndClauseW, jstring*& lpReadingCla } ::LCMapString(lcJPN, LCMAP_FULLWIDTH, lpHWStrW, cHWStrW, lpFWStrW, cFWStrW); - readingClauseW[cls] = MakeJavaString(env, lpFWStrW); + readingClauseW[cls] = MakeJavaString(env, lpFWStrW, cFWStrW); delete [] lpFWStrW; } else { - readingClauseW[cls] = MakeJavaString(env, lpHWStrW); + readingClauseW[cls] = MakeJavaString(env, lpHWStrW, cHWStrW); } } else { - readingClauseW[cls] = MakeJavaString(env, (LPWSTR)NULL); + readingClauseW[cls] = NULL; } } diff --git a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h index 13626e78b48..4244fcf8b5d 100644 --- a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h +++ b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.h @@ -58,7 +58,7 @@ class AwtInputTextInfor { ~AwtInputTextInfor(); private: /* helper function to return a java string.*/ - static jstring MakeJavaString(JNIEnv* env, LPWSTR lpStrW); + static jstring MakeJavaString(JNIEnv* env, LPWSTR lpStrW, int cStrW); LPARAM m_flags; /* The message LPARAM. */ From 003c0aae4ae4317c7c6c3c3664277235fdf4139f Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Mon, 1 Sep 2008 17:41:45 +0400 Subject: [PATCH 003/199] 6707023: Chenese Characters in JTextPane Cause Pane to Hang Input method events are dispatched to correct AppContext Reviewed-by: naoto, yan --- .../windows/classes/sun/awt/windows/WInputMethod.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jdk/src/windows/classes/sun/awt/windows/WInputMethod.java b/jdk/src/windows/classes/sun/awt/windows/WInputMethod.java index 33be7f8b4be..6cec225db97 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WInputMethod.java +++ b/jdk/src/windows/classes/sun/awt/windows/WInputMethod.java @@ -548,11 +548,15 @@ public class WInputMethod extends InputMethodAdapter public void inquireCandidatePosition() { + Component source = getClientComponent(); + if (source == null) { + return; + } // This call should return immediately just to cause // InputMethodRequests.getTextLocation be called within // AWT Event thread. Otherwise, a potential deadlock // could happen. - java.awt.EventQueue.invokeLater(new Runnable() { + Runnable r = new Runnable() { public void run() { int x = 0; int y = 0; @@ -573,7 +577,9 @@ public class WInputMethod extends InputMethodAdapter openCandidateWindow(awtFocussedComponentPeer, x, y); } - }); + }; + WToolkit.postEvent(WToolkit.targetToAppContext(source), + new InvocationEvent(source, r)); } // java.awt.Toolkit#getNativeContainer() is not available From db6b4110dac608496d409c6646378265d96bf854 Mon Sep 17 00:00:00 2001 From: Andrei Dmitriev Date: Thu, 4 Sep 2008 17:20:25 +0400 Subject: [PATCH 004/199] 6738181: api/java_awt/Toolkit/index.html#GetAWTEventListeners Fails with:empty array returned unexpectedly Redirect getAWTEventListeners(long l) from Headless to underlying toolkit. Reviewed-by: art --- .../classes/sun/awt/HeadlessToolkit.java | 4 ++ .../AWTEventListener/AWTListener.java | 48 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 jdk/test/java/awt/Toolkit/Headless/AWTEventListener/AWTListener.java diff --git a/jdk/src/share/classes/sun/awt/HeadlessToolkit.java b/jdk/src/share/classes/sun/awt/HeadlessToolkit.java index 97a7686605f..b57e9f2b3ac 100644 --- a/jdk/src/share/classes/sun/awt/HeadlessToolkit.java +++ b/jdk/src/share/classes/sun/awt/HeadlessToolkit.java @@ -456,6 +456,10 @@ public class HeadlessToolkit extends Toolkit return tk.getAWTEventListeners(); } + public AWTEventListener[] getAWTEventListeners(long eventMask) { + return tk.getAWTEventListeners(eventMask); + } + public boolean isDesktopSupported() { return false; } diff --git a/jdk/test/java/awt/Toolkit/Headless/AWTEventListener/AWTListener.java b/jdk/test/java/awt/Toolkit/Headless/AWTEventListener/AWTListener.java new file mode 100644 index 00000000000..44098dd3e48 --- /dev/null +++ b/jdk/test/java/awt/Toolkit/Headless/AWTEventListener/AWTListener.java @@ -0,0 +1,48 @@ +/* + @test + @bug 6738181 + @library ../../../regtesthelpers + @build Sysout + @summary Toolkit.getAWTEventListeners returns empty array + @author andrei dmitriev: area=awt.headless + @run main/othervm -Djava.awt.headless=true AWTListener +*/ + +/** + * In a headless mode add a listener for container events. + * Check if a single listener is still assigned to the Toolkit class. + */ + +import java.awt.*; +import java.awt.event.*; +import test.java.awt.regtesthelpers.Sysout; + +public class AWTListener { + public static void main(String []s) { + Toolkit toolkit = Toolkit.getDefaultToolkit(); + + AWTEventListener orig = new AWTEventListener() { + public void eventDispatched(AWTEvent event) { } + }; + + Sysout.println("Test: listener to add = " +orig); + toolkit.addAWTEventListener(orig, AWTEvent.CONTAINER_EVENT_MASK); + + for (AWTEventListener l: toolkit.getAWTEventListeners()){ + Sysout.println("Test: listener = " +l+" "); + } + + if ( toolkit.getAWTEventListeners().length == 0 ) { + throw new RuntimeException("Case 1. An empty array returned unexpectedly"); + } + + for (AWTEventListener l: toolkit.getAWTEventListeners(AWTEvent.CONTAINER_EVENT_MASK)){ + Sysout.println("Test: listener = " +l); + } + + if ( toolkit.getAWTEventListeners(AWTEvent.CONTAINER_EVENT_MASK).length == 0 ) { + throw new RuntimeException("Case 2. An empty array returned unexpectedly"); + } + Sysout.println("Test PASSED"); + } +} From f284d2a3b232e3ea0a433730d2ce24e22ed5ff74 Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Mon, 8 Sep 2008 17:26:24 -0700 Subject: [PATCH 005/199] 6744609: Disable MMX support when building libpng library Define -DPNG_NO_MMX_CODE unconditionally, not just on 64-bit Linux Reviewed-by: anthony, art --- jdk/make/sun/splashscreen/Makefile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/jdk/make/sun/splashscreen/Makefile b/jdk/make/sun/splashscreen/Makefile index 22a5525ca00..0df06e4482e 100644 --- a/jdk/make/sun/splashscreen/Makefile +++ b/jdk/make/sun/splashscreen/Makefile @@ -85,13 +85,6 @@ vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/image/jpeg -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 -ifeq ($(PLATFORM), linux) - ifeq ($(ARCH_DATA_MODEL), 64) - # 64-bit gcc has problems compiling MMX instructions. - # Google it for more details. Possibly the newer versions of - # the PNG-library and/or the new compiler will not need this - # option in the future. - CPPFLAGS += -DPNG_NO_MMX_CODE - endif -endif - +# Shun the less than portable MMX assembly code in pnggccrd.c, +# and use alternative implementations in C. +CPPFLAGS += -DPNG_NO_MMX_CODE From 5e24b7bc99bd51631c1bb67d8bd8fc3b274695b0 Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Wed, 10 Sep 2008 15:02:06 +0400 Subject: [PATCH 006/199] 6743433: IM candidate window is not shown until window is deactivated and reactivated again OpenCandidateWindow procedure should directly call ::DefWindowProc Reviewed-by: art --- jdk/src/windows/native/sun/windows/awt_Component.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/windows/native/sun/windows/awt_Component.cpp b/jdk/src/windows/native/sun/windows/awt_Component.cpp index a46627dbab0..752b0915ef0 100644 --- a/jdk/src/windows/native/sun/windows/awt_Component.cpp +++ b/jdk/src/windows/native/sun/windows/awt_Component.cpp @@ -3692,7 +3692,7 @@ void AwtComponent::OpenCandidateWindow(int x, int y) SetCandidateWindow(iCandType, x-rc.left, y-rc.top); } if (m_bitsCandType != 0) { - DefWindowProc(WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType); + ::DefWindowProc(GetHWnd(), WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType); } } From 6b814bb3fcb719de203d2ab34305381b6131ed11 Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Thu, 11 Sep 2008 10:38:00 +0400 Subject: [PATCH 007/199] 6727884: Some Uncaught Exceptions are no longer getting sent to the Uncaught Exception Handlers Reviewed-by: anthony, dav --- .../classes/java/awt/EventDispatchThread.java | 112 +-------------- .../HandleExceptionOnEDT.java | 136 ++++++++++++++++++ 2 files changed, 142 insertions(+), 106 deletions(-) create mode 100644 jdk/test/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java diff --git a/jdk/src/share/classes/java/awt/EventDispatchThread.java b/jdk/src/share/classes/java/awt/EventDispatchThread.java index f49bacb670a..35bde43447a 100644 --- a/jdk/src/share/classes/java/awt/EventDispatchThread.java +++ b/jdk/src/share/classes/java/awt/EventDispatchThread.java @@ -286,119 +286,19 @@ class EventDispatchThread extends Thread { } // Can get and throw only unchecked exceptions catch (RuntimeException e) { - processException(e, modalFiltersCount > 0); + processException(e); } catch (Error e) { - processException(e, modalFiltersCount > 0); + processException(e); } return true; } - private void processException(Throwable e, boolean isModal) { + private void processException(Throwable e) { if (eventLog.isLoggable(Level.FINE)) { - eventLog.log(Level.FINE, "Processing exception: " + e + - ", isModal = " + isModal); + eventLog.log(Level.FINE, "Processing exception: " + e); } - if (!handleException(e)) { - // See bug ID 4499199. - // If we are in a modal dialog, we cannot throw - // an exception for the ThreadGroup to handle (as added - // in RFE 4063022). If we did, the message pump of - // the modal dialog would be interrupted. - // We instead choose to handle the exception ourselves. - // It may be useful to add either a runtime flag or API - // later if someone would like to instead dispose the - // dialog and allow the thread group to handle it. - if (isModal) { - System.err.println( - "Exception occurred during event dispatching:"); - e.printStackTrace(); - } else if (e instanceof RuntimeException) { - throw (RuntimeException)e; - } else if (e instanceof Error) { - throw (Error)e; - } - } - } - - private static final String handlerPropName = "sun.awt.exception.handler"; - private static String handlerClassName = null; - private static String NO_HANDLER = new String(); - - /** - * Handles an exception thrown in the event-dispatch thread. - * - *

If the system property "sun.awt.exception.handler" is defined, then - * when this method is invoked it will attempt to do the following: - * - *

    - *
  1. Load the class named by the value of that property, using the - * current thread's context class loader, - *
  2. Instantiate that class using its zero-argument constructor, - *
  3. Find the resulting handler object's public void handle - * method, which should take a single argument of type - * Throwable, and - *
  4. Invoke the handler's handle method, passing it the - * thrown argument that was passed to this method. - *
- * - * If any of the first three steps fail then this method will return - * false and all following invocations of this method will return - * false immediately. An exception thrown by the handler object's - * handle will be caught, and will cause this method to return - * false. If the handler's handle method is successfully - * invoked, then this method will return true. This method will - * never throw any sort of exception. - * - *

Note: This method is a temporary hack to work around the - * absence of a real API that provides the ability to replace the - * event-dispatch thread. The magic "sun.awt.exception.handler" property - * will be removed in a future release. - * - * @param thrown The Throwable that was thrown in the event-dispatch - * thread - * - * @return false if any of the above steps failed, otherwise - * true - */ - private boolean handleException(Throwable thrown) { - - try { - - if (handlerClassName == NO_HANDLER) { - return false; /* Already tried, and failed */ - } - - /* Look up the class name */ - if (handlerClassName == null) { - handlerClassName = ((String) AccessController.doPrivileged( - new GetPropertyAction(handlerPropName))); - if (handlerClassName == null) { - handlerClassName = NO_HANDLER; /* Do not try this again */ - return false; - } - } - - /* Load the class, instantiate it, and find its handle method */ - Method m; - Object h; - try { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - Class c = Class.forName(handlerClassName, true, cl); - m = c.getMethod("handle", new Class[] { Throwable.class }); - h = c.newInstance(); - } catch (Throwable x) { - handlerClassName = NO_HANDLER; /* Do not try this again */ - return false; - } - - /* Finally, invoke the handler */ - m.invoke(h, new Object[] { thrown }); - - } catch (Throwable x) { - return false; - } - - return true; + getUncaughtExceptionHandler().uncaughtException(this, e); + // don't rethrow the exception to avoid EDT recreation } boolean isDispatching(EventQueue eq) { diff --git a/jdk/test/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java b/jdk/test/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java new file mode 100644 index 00000000000..3111b6e9c65 --- /dev/null +++ b/jdk/test/java/awt/EventDispatchThread/HandleExceptionOnEDT/HandleExceptionOnEDT.java @@ -0,0 +1,136 @@ +/* + @test + @bug 6304473 6727884 + @summary Tests that an exception on EDT is handled with ThreadGroup.uncaughtException() + @author artem.ananiev: area=awt.eventdispatching + @library ../../regtesthelpers + @build Util + @run main HandleExceptionOnEDT +*/ + +import java.awt.*; +import java.awt.event.*; + +import test.java.awt.regtesthelpers.Util; + +public class HandleExceptionOnEDT +{ + private final static String EXCEPTION_MESSAGE = "A1234567890"; + + private static volatile boolean exceptionHandled = false; + private static volatile boolean mousePressed = false; + + public static void main(String[] args) + { + final Thread.UncaughtExceptionHandler eh = new Thread.UncaughtExceptionHandler() + { + @Override + public void uncaughtException(Thread t, Throwable e) + { + if (e.getMessage().equals(EXCEPTION_MESSAGE)) + { + exceptionHandled = true; + } + } + }; + + Frame f = new Frame("F"); + f.setBounds(100, 100, 400, 300); + // set exception handler for EDT + f.addWindowListener(new WindowAdapter() + { + @Override + public void windowOpened(WindowEvent we) + { + Thread edt = Thread.currentThread(); + edt.setUncaughtExceptionHandler(eh); + } + }); + f.setVisible(true); + + Robot r = Util.createRobot(); + Util.waitForIdle(r); + + // check exception without modal dialog + MouseListener exceptionListener = new MouseAdapter() + { + @Override + public void mousePressed(MouseEvent me) + { + throw new RuntimeException(EXCEPTION_MESSAGE); + } + }; + f.addMouseListener(exceptionListener); + + exceptionHandled = false; + Point fp = f.getLocationOnScreen(); + r.mouseMove(fp.x + f.getWidth() / 2, fp.y + f.getHeight() / 2); + Util.waitForIdle(r); + r.mousePress(InputEvent.BUTTON1_MASK); + Util.waitForIdle(r); + r.mouseRelease(InputEvent.BUTTON2_MASK); + f.removeMouseListener(exceptionListener); + + if (!exceptionHandled) + { + throw new RuntimeException("Test FAILED: exception is not handled for frame"); + } + + // check exception with modal dialog + final Dialog d = new Dialog(f, "D", true); + d.setBounds(fp.x + 100, fp.y + 100, 400, 300); + d.addMouseListener(exceptionListener); + EventQueue.invokeLater(new Runnable() + { + @Override + public void run() + { + d.setVisible(true); + } + }); + Util.waitForIdle(r); + + exceptionHandled = false; + Point dp = d.getLocationOnScreen(); + r.mouseMove(dp.x + d.getWidth() / 2, dp.y + d.getHeight() / 2); + Util.waitForIdle(r); + r.mousePress(InputEvent.BUTTON1_MASK); + Util.waitForIdle(r); + r.mouseRelease(InputEvent.BUTTON2_MASK); + d.removeMouseListener(exceptionListener); + + if (!exceptionHandled) + { + throw new RuntimeException("Test FAILED: exception is not handled for modal dialog"); + } + + // check the dialog is still modal + MouseListener pressedListener = new MouseAdapter() + { + @Override + public void mousePressed(MouseEvent me) + { + mousePressed = true; + } + }; + f.addMouseListener(pressedListener); + + mousePressed = false; + r.mouseMove(fp.x + 50, fp.y + 50); + Util.waitForIdle(r); + r.mousePress(InputEvent.BUTTON1_MASK); + Util.waitForIdle(r); + r.mouseRelease(InputEvent.BUTTON1_MASK); + Util.waitForIdle(r); + f.removeMouseListener(pressedListener); + + if (mousePressed) + { + throw new RuntimeException("Test FAILED: modal dialog is not modal or visible after exception"); + } + + // test is passed + d.dispose(); + f.dispose(); + } +} From 2c0b584b2d5d98aa61ddcb7cfcdc81ab5fc571d4 Mon Sep 17 00:00:00 2001 From: Andrei Dmitriev Date: Tue, 16 Sep 2008 12:17:02 +0400 Subject: [PATCH 008/199] 6315717: Support for mouse with multiple scroll wheels and 4 or more buttons Implementation of the more mouse buttons support Reviewed-by: art, dcherepanov --- jdk/make/sun/xawt/mapfile-vers | 1 + jdk/src/share/classes/java/awt/Robot.java | 122 +++- jdk/src/share/classes/java/awt/Toolkit.java | 35 +- .../java/awt/doc-files/DesktopProperties.html | 52 +- .../classes/java/awt/event/InputEvent.java | 106 +++- .../classes/java/awt/event/MouseEvent.java | 246 ++++++- .../classes/java/awt/peer/RobotPeer.java | 3 +- .../classes/sun/awt/HeadlessToolkit.java | 6 +- .../classes/sun/awt/X11/XBaseWindow.java | 25 +- .../classes/sun/awt/X11/XConstants.java | 36 +- .../sun/awt/X11/XDragSourceContextPeer.java | 4 +- .../classes/sun/awt/X11/XRobotPeer.java | 7 +- .../solaris/classes/sun/awt/X11/XToolkit.java | 13 +- .../solaris/classes/sun/awt/X11/XWindow.java | 87 +-- .../classes/sun/awt/X11/XWindowPeer.java | 12 +- jdk/src/solaris/native/sun/awt/awt_Robot.c | 86 ++- .../classes/sun/awt/windows/WRobotPeer.java | 4 +- .../classes/sun/awt/windows/WToolkit.java | 14 + .../native/sun/windows/awt_Component.cpp | 86 ++- .../native/sun/windows/awt_Component.h | 22 +- .../windows/native/sun/windows/awt_Robot.cpp | 63 +- .../windows/native/sun/windows/awt_Robot.h | 4 +- .../native/sun/windows/awt_Toolkit.cpp | 24 + .../windows/native/sun/windows/awt_Toolkit.h | 3 + .../native/sun/windows/awt_TrayIcon.cpp | 2 +- .../ExtraButtonDrag.java | 131 ++++ .../ModifierPermutation.java | 320 ++++++++++ .../MouseModifiersUnitTest_Extra.java | 490 ++++++++++++++ .../MouseModifiersUnitTest_Standard.java | 598 ++++++++++++++++++ .../AcceptExtraMouseButtons.java | 118 ++++ .../ManualInstructions.java | 305 +++++++++ .../RobotExtraButton/RobotExtraButton.java | 79 +++ .../ToolkitPropertyTest/SystemPropTest_1.java | 36 ++ .../ToolkitPropertyTest/SystemPropTest_2.java | 25 + .../ToolkitPropertyTest/SystemPropTest_3.java | 26 + .../ToolkitPropertyTest/SystemPropTest_4.java | 42 ++ .../ToolkitPropertyTest/SystemPropTest_5.java | 42 ++ .../ToolkitPropertyTest_Disable.java | 143 +++++ .../ToolkitPropertyTest_Enable.java | 120 ++++ .../ButtonArraysEquality.java | 83 +++ .../AcceptExtraButton/AcceptExtraButton.java | 53 ++ .../CTORRestrictions/CTORRestrictions.java | 89 +++ .../CTORRestrictions_Disable.java | 101 +++ .../CheckGetMaskForButton.java | 65 ++ 44 files changed, 3776 insertions(+), 153 deletions(-) create mode 100644 jdk/test/java/awt/Mouse/MouseModifiersUnitTest/ExtraButtonDrag.java create mode 100644 jdk/test/java/awt/Mouse/MouseModifiersUnitTest/ModifierPermutation.java create mode 100644 jdk/test/java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Extra.java create mode 100644 jdk/test/java/awt/Mouse/MouseModifiersUnitTest/MouseModifiersUnitTest_Standard.java create mode 100644 jdk/test/java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java create mode 100644 jdk/test/java/awt/Robot/ManualInstructions/ManualInstructions.java create mode 100644 jdk/test/java/awt/Robot/RobotExtraButton/RobotExtraButton.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/SystemPropTest_1.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/SystemPropTest_2.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/SystemPropTest_3.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/SystemPropTest_4.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/SystemPropTest_5.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Disable.java create mode 100644 jdk/test/java/awt/Toolkit/ToolkitPropertyTest/ToolkitPropertyTest_Enable.java create mode 100644 jdk/test/java/awt/event/InputEvent/ButtonArraysEquality/ButtonArraysEquality.java create mode 100644 jdk/test/java/awt/event/MouseEvent/AcceptExtraButton/AcceptExtraButton.java create mode 100644 jdk/test/java/awt/event/MouseEvent/CTORRestrictions/CTORRestrictions.java create mode 100644 jdk/test/java/awt/event/MouseEvent/CTORRestrictions/CTORRestrictions_Disable.java create mode 100644 jdk/test/java/awt/event/MouseEvent/CheckGetMaskForButton/CheckGetMaskForButton.java diff --git a/jdk/make/sun/xawt/mapfile-vers b/jdk/make/sun/xawt/mapfile-vers index 9e0b434b557..59c55778773 100644 --- a/jdk/make/sun/xawt/mapfile-vers +++ b/jdk/make/sun/xawt/mapfile-vers @@ -151,6 +151,7 @@ SUNWprivate_1.1 { Java_sun_awt_X11_XRobotPeer_mouseReleaseImpl; Java_sun_awt_X11_XRobotPeer_mouseWheelImpl; Java_sun_awt_X11_XRobotPeer_setup; + Java_sun_awt_X11_XRobotPeer_getNumberOfButtonsImpl; Java_java_awt_Component_initIDs; Java_java_awt_Container_initIDs; Java_java_awt_Button_initIDs; diff --git a/jdk/src/share/classes/java/awt/Robot.java b/jdk/src/share/classes/java/awt/Robot.java index 2ce6a2686f1..94c71283cee 100644 --- a/jdk/src/share/classes/java/awt/Robot.java +++ b/jdk/src/share/classes/java/awt/Robot.java @@ -70,10 +70,7 @@ public class Robot { private RobotPeer peer; private boolean isAutoWaitForIdle = false; private int autoDelay = 0; - private static final int LEGAL_BUTTON_MASK = - InputEvent.BUTTON1_MASK| - InputEvent.BUTTON2_MASK| - InputEvent.BUTTON3_MASK; + private static int LEGAL_BUTTON_MASK; // location of robot's GC, used in mouseMove(), getPixelColor() and captureScreenImage() private Point gdLoc; @@ -98,6 +95,19 @@ public class Robot { } init(GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice()); + int tmpMask = 0; + if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){ + for (int i = 0; i < peer.getNumberOfButtons(); i++){ + tmpMask |= InputEvent.getMaskForButton(i+1); + } + } + tmpMask |= InputEvent.BUTTON1_MASK| + InputEvent.BUTTON2_MASK| + InputEvent.BUTTON3_MASK| + InputEvent.BUTTON1_DOWN_MASK| + InputEvent.BUTTON2_DOWN_MASK| + InputEvent.BUTTON3_DOWN_MASK; + LEGAL_BUTTON_MASK = tmpMask; } /** @@ -187,18 +197,55 @@ public class Robot { /** * Presses one or more mouse buttons. The mouse buttons should - * be released using the mouseRelease method. + * be released using the {@link #mouseRelease(int)} method. * - * @param buttons the Button mask; a combination of one or more - * of these flags: + * @param buttons the Button mask; a combination of one or more + * mouse button masks. + *

+ * It is allowed to use only a combination of valid values as a {@code buttons} parameter. + * A valid combination consists of {@code InputEvent.BUTTON1_DOWN_MASK}, + * {@code InputEvent.BUTTON2_DOWN_MASK}, {@code InputEvent.BUTTON3_DOWN_MASK} + * and values returned by the + * {@link InputEvent#getMaskForButton(int) InputEvent.getMaskForButton(button)} method. + * + * The valid combination also depends on a + * {@link Toolkit#areExtraMouseButtonsEnabled() Toolkit.areExtraMouseButtonsEnabled()} value as follows: *

    - *
  • InputEvent.BUTTON1_MASK - *
  • InputEvent.BUTTON2_MASK - *
  • InputEvent.BUTTON3_MASK + *
  • If support for extended mouse buttons is + * {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java + * then it is allowed to use only the following standard button masks: + * {@code InputEvent.BUTTON1_DOWN_MASK}, {@code InputEvent.BUTTON2_DOWN_MASK}, + * {@code InputEvent.BUTTON3_DOWN_MASK}. + *
  • If support for extended mouse buttons is + * {@link Toolkit#areExtraMouseButtonsEnabled() enabled} by Java + * then it is allowed to use the standard button masks + * and masks for existing extended mouse buttons, if the mouse has more then three buttons. + * In that way, it is allowed to use the button masks corresponding to the buttons + * in the range from 1 to {@link java.awt.MouseInfo#getNumberOfButtons() MouseInfo.getNumberOfButtons()}. + *
    + * It is recommended to use the {@link InputEvent#getMaskForButton(int) InputEvent.getMaskForButton(button)} + * method to obtain the mask for any mouse button by its number. *
- * @throws IllegalArgumentException if the button mask is not a - * valid combination + *

+ * The following standard button masks are also accepted: + *

    + *
  • {@code InputEvent.BUTTON1_MASK} + *
  • {@code InputEvent.BUTTON2_MASK} + *
  • {@code InputEvent.BUTTON3_MASK} + *
+ * However, it is recommended to use {@code InputEvent.BUTTON1_DOWN_MASK}, + * {@code InputEvent.BUTTON2_DOWN_MASK}, {@code InputEvent.BUTTON3_DOWN_MASK} instead. + * Either extended {@code _DOWN_MASK} or old {@code _MASK} values + * should be used, but both those models should not be mixed. + * @throws IllegalArgumentException if the {@code buttons} mask contains the mask for extra mouse button + * and support for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java + * @throws IllegalArgumentException if the {@code buttons} mask contains the mask for extra mouse button + * that does not exist on the mouse and support for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() enabled} by Java * @see #mouseRelease(int) + * @see InputEvent#getMaskForButton(int) + * @see Toolkit#areExtraMouseButtonsEnabled() + * @see java.awt.MouseInfo#getNumberOfButtons() + * @see java.awt.event.MouseEvent */ public synchronized void mousePress(int buttons) { checkButtonsArgument(buttons); @@ -209,16 +256,53 @@ public class Robot { /** * Releases one or more mouse buttons. * - * @param buttons the Button mask; a combination of one or more - * of these flags: + * @param buttons the Button mask; a combination of one or more + * mouse button masks. + *

+ * It is allowed to use only a combination of valid values as a {@code buttons} parameter. + * A valid combination consists of {@code InputEvent.BUTTON1_DOWN_MASK}, + * {@code InputEvent.BUTTON2_DOWN_MASK}, {@code InputEvent.BUTTON3_DOWN_MASK} + * and values returned by the + * {@link InputEvent#getMaskForButton(int) InputEvent.getMaskForButton(button)} method. + * + * The valid combination also depends on a + * {@link Toolkit#areExtraMouseButtonsEnabled() Toolkit.areExtraMouseButtonsEnabled()} value as follows: *

    - *
  • InputEvent.BUTTON1_MASK - *
  • InputEvent.BUTTON2_MASK - *
  • InputEvent.BUTTON3_MASK + *
  • If the support for extended mouse buttons is + * {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java + * then it is allowed to use only the following standard button masks: + * {@code InputEvent.BUTTON1_DOWN_MASK}, {@code InputEvent.BUTTON2_DOWN_MASK}, + * {@code InputEvent.BUTTON3_DOWN_MASK}. + *
  • If the support for extended mouse buttons is + * {@link Toolkit#areExtraMouseButtonsEnabled() enabled} by Java + * then it is allowed to use the standard button masks + * and masks for existing extended mouse buttons, if the mouse has more then three buttons. + * In that way, it is allowed to use the button masks corresponding to the buttons + * in the range from 1 to {@link java.awt.MouseInfo#getNumberOfButtons() MouseInfo.getNumberOfButtons()}. + *
    + * It is recommended to use the {@link InputEvent#getMaskForButton(int) InputEvent.getMaskForButton(button)} + * method to obtain the mask for any mouse button by its number. *
+ *

+ * The following standard button masks are also accepted: + *

    + *
  • {@code InputEvent.BUTTON1_MASK} + *
  • {@code InputEvent.BUTTON2_MASK} + *
  • {@code InputEvent.BUTTON3_MASK} + *
+ * However, it is recommended to use {@code InputEvent.BUTTON1_DOWN_MASK}, + * {@code InputEvent.BUTTON2_DOWN_MASK}, {@code InputEvent.BUTTON3_DOWN_MASK} instead. + * Either extended {@code _DOWN_MASK} or old {@code _MASK} values + * should be used, but both those models should not be mixed. + * @throws IllegalArgumentException if the {@code buttons} mask contains the mask for extra mouse button + * and support for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() disabled} by Java + * @throws IllegalArgumentException if the {@code buttons} mask contains the mask for extra mouse button + * that does not exist on the mouse and support for extended mouse buttons is {@link Toolkit#areExtraMouseButtonsEnabled() enabled} by Java * @see #mousePress(int) - * @throws IllegalArgumentException if the button mask is not a valid - * combination + * @see InputEvent#getMaskForButton(int) + * @see Toolkit#areExtraMouseButtonsEnabled() + * @see java.awt.MouseInfo#getNumberOfButtons() + * @see java.awt.event.MouseEvent */ public synchronized void mouseRelease(int buttons) { checkButtonsArgument(buttons); diff --git a/jdk/src/share/classes/java/awt/Toolkit.java b/jdk/src/share/classes/java/awt/Toolkit.java index 5ac97013d1a..aaa6afdd5a0 100644 --- a/jdk/src/share/classes/java/awt/Toolkit.java +++ b/jdk/src/share/classes/java/awt/Toolkit.java @@ -1,5 +1,5 @@ /* - * Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2550,4 +2550,37 @@ public abstract class Toolkit { } } } + + /** + * Reports whether events from extra mouse buttons are allowed to be processed and posted into + * {@code EventQueue}. + *
+ * To change the returned value it is necessary to set the {@code sun.awt.enableExtraMouseButtons} + * property before the {@code Toolkit} class initialization. This setting could be done on the application + * startup by the following command: + *
+    * java -Dsun.awt.enableExtraMouseButtons=false Application
+    * 
+ * Alternatively, the property could be set in the application by using the following code: + *
+    * System.setProperty("sun.awt.enableExtraMouseButtons", "true");
+    * 
+ * before the {@code Toolkit} class initialization. + * If not set by the time of the {@code Toolkit} class initialization, this property will be + * initialized with {@code true}. + * Changing this value after the {@code Toolkit} class initialization will have no effect. + *

+ * The current value could be queried by using the + * {@code System.getProperty("sun.awt.enableExtraMouseButtons")} method. + * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true + * @return {@code true} if events from extra mouse buttons are allowed to be processed and posted; + * {@code false} otherwise + * @see System#getProperty(String propertyName) + * @see System#setProperty(String propertyName, String value) + * @see java.awt.EventQueue + * @since 1.7 + */ + public boolean areExtraMouseButtonsEnabled() throws HeadlessException { + return Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled(); + } } diff --git a/jdk/src/share/classes/java/awt/doc-files/DesktopProperties.html b/jdk/src/share/classes/java/awt/doc-files/DesktopProperties.html index f699ba2fa7a..5f3afb37442 100644 --- a/jdk/src/share/classes/java/awt/doc-files/DesktopProperties.html +++ b/jdk/src/share/classes/java/awt/doc-files/DesktopProperties.html @@ -1,5 +1,5 @@ + + + + + +

bug 6176814
Bug ID: 6176814

+ +

This is an AUTOMATIC test, simply wait for completion

+ + + + diff --git a/jdk/test/java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.java b/jdk/test/java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.java new file mode 100644 index 00000000000..6f6b51cd605 --- /dev/null +++ b/jdk/test/java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.java @@ -0,0 +1,112 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + test + @bug 6176814 + @summary Metalworks frame maximizes after the move + @author Andrei.Dmitriev area=Event + @run applet MaximizedFrameTest.html +*/ + +import java.applet.Applet; +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; + +public class MaximizedFrameTest extends Applet +{ + final int ITERATIONS_COUNT = 20; + Robot robot; + Point framePosition; + Point newFrameLocation; + JFrame frame; + Rectangle gcBounds; + public static Object LOCK = new Object(); + + public void init() + { + String[] instructions = + { + "This is an AUTOMATIC test", + "simply wait until it is done" + }; + JFrame.setDefaultLookAndFeelDecorated(true); + frame = new JFrame("JFrame Maximization Test"); + frame.pack(); + frame.setSize(450, 260); + }//End init() + + public void start () + { + frame.setVisible(true); + validate(); + JLayeredPane lPane = frame.getLayeredPane(); + // System.out.println("JFrame's LayeredPane " + lPane ); + Component titleComponent = null; + boolean titleFound = false; + for (int j=0; j < lPane.getComponentsInLayer(JLayeredPane.FRAME_CONTENT_LAYER.intValue()).length; j++){ + titleComponent = lPane.getComponentsInLayer(JLayeredPane.FRAME_CONTENT_LAYER.intValue())[j]; + if (titleComponent.getClass().getName().equals("javax.swing.plaf.metal.MetalTitlePane")){ + titleFound = true; + break; + } + } + if ( !titleFound ){ + throw new RuntimeException("Test Failed. Unable to determine title's size."); + } + //-------------------------------- + // it is sufficient to get maximized Frame only once. + Point tempMousePosition; + framePosition = frame.getLocationOnScreen(); + try { + robot = new Robot(); + tempMousePosition = new Point(framePosition.x + + frame.getWidth()/2, + framePosition.y + + titleComponent.getHeight()/2); + robot.mouseMove(tempMousePosition.x, tempMousePosition.y); + for (int iteration=0; iteration < ITERATIONS_COUNT; iteration++){ + robot.mousePress(InputEvent.BUTTON1_MASK); + gcBounds = + GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0].getConfigurations()[0].getBounds(); + //Moving a mouse pointer less than a few pixels + //leads to rising a double click event. + //We have to use exceeded the AWT_MULTICLICK_SMUDGE + //const value (which is 4 by default on GNOME) to test that. + tempMousePosition.x += 5; + robot.mouseMove(tempMousePosition.x, tempMousePosition.y); + robot.delay(70); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + if ( frame.getExtendedState() != 0 ){ + throw new RuntimeException ("Test failed. JFrame was maximized. ExtendedState is : "+frame.getExtendedState()); + } + robot.delay(500); + } //for iteration + + }catch(AWTException e) { + throw new RuntimeException("Test Failed. AWTException thrown."); + } + System.out.println("Test passed."); + }// start() +}// class From 5c08fa0e797d5dac5eb7389d94ec98733a1b35cd Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Wed, 15 Oct 2008 15:55:19 +0200 Subject: [PATCH 019/199] 6759311: RepaintManager casts Tookit to SunToolkit without instanceof check Check type of Toolkit before casting. Reviewed-by: alexp --- .../classes/javax/swing/RepaintManager.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/RepaintManager.java b/jdk/src/share/classes/javax/swing/RepaintManager.java index b0e6c048f62..981ea1fe8d5 100644 --- a/jdk/src/share/classes/javax/swing/RepaintManager.java +++ b/jdk/src/share/classes/javax/swing/RepaintManager.java @@ -1305,9 +1305,12 @@ public class RepaintManager if (doubleBufferingEnabled && !nativeDoubleBuffering) { switch (bufferStrategyType) { case BUFFER_STRATEGY_NOT_SPECIFIED: - if (((SunToolkit)Toolkit.getDefaultToolkit()). - useBufferPerWindow()) { - paintManager = new BufferStrategyPaintManager(); + Toolkit tk = Toolkit.getDefaultToolkit(); + if (tk instanceof SunToolkit) { + SunToolkit stk = (SunToolkit) tk; + if (stk.useBufferPerWindow()) { + paintManager = new BufferStrategyPaintManager(); + } } break; case BUFFER_STRATEGY_SPECIFIED_ON: @@ -1329,9 +1332,16 @@ public class RepaintManager private void scheduleProcessingRunnable(AppContext context) { if (processingRunnable.markPending()) { - SunToolkit.getSystemEventQueueImplPP(context). - postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), - processingRunnable)); + Toolkit tk = Toolkit.getDefaultToolkit(); + if (tk instanceof SunToolkit) { + SunToolkit.getSystemEventQueueImplPP(context). + postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), + processingRunnable)); + } else { + Toolkit.getDefaultToolkit().getSystemEventQueue(). + postEvent(new InvocationEvent(Toolkit.getDefaultToolkit(), + processingRunnable)); + } } } From 7fb9ea225e61249e84b155ebc3e8918638547472 Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Thu, 16 Oct 2008 14:00:58 +0900 Subject: [PATCH 020/199] 6758988: (tz) Support tzdata2008h Reviewed-by: okutsu --- jdk/make/sun/javazic/tzdata/VERSION | 2 +- jdk/make/sun/javazic/tzdata/africa | 12 ++++++++++-- jdk/make/sun/javazic/tzdata/asia | 14 +++++++++++++- jdk/make/sun/javazic/tzdata/southamerica | 16 ++++++++++++++++ jdk/make/sun/javazic/tzdata/zone.tab | 2 +- 5 files changed, 41 insertions(+), 5 deletions(-) diff --git a/jdk/make/sun/javazic/tzdata/VERSION b/jdk/make/sun/javazic/tzdata/VERSION index 6aef31bbb8e..0d71d62ab79 100644 --- a/jdk/make/sun/javazic/tzdata/VERSION +++ b/jdk/make/sun/javazic/tzdata/VERSION @@ -21,4 +21,4 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # -tzdata2008g +tzdata2008h diff --git a/jdk/make/sun/javazic/tzdata/africa b/jdk/make/sun/javazic/tzdata/africa index bc673bdd93b..52289f12054 100644 --- a/jdk/make/sun/javazic/tzdata/africa +++ b/jdk/make/sun/javazic/tzdata/africa @@ -475,11 +475,19 @@ Zone Africa/Nouakchott -1:03:48 - LMT 1912 # year 2008 - 2009 will, therefore, be effective as from 26 October 2008 # and end on 29 March 2009. +# From Ed Maste (2008-10-07): +# THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the +# beginning / ending of summer time is 2 o'clock standard time in the +# morning of the last Sunday of October / last Sunday of March. +# +# http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf +# + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mauritius 1982 only - Oct 10 0:00 1:00 S Rule Mauritius 1983 only - Mar 21 0:00 0 - -Rule Mauritius 2008 max - Oct lastSun 2:00 1:00 S -Rule Mauritius 2009 max - Mar lastSun 2:00 0 - +Rule Mauritius 2008 max - Oct lastSun 2:00s 1:00 S +Rule Mauritius 2009 max - Mar lastSun 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis 4:00 Mauritius MU%sT # Mauritius Time diff --git a/jdk/make/sun/javazic/tzdata/asia b/jdk/make/sun/javazic/tzdata/asia index 5e77028dafa..b763d0d97d8 100644 --- a/jdk/make/sun/javazic/tzdata/asia +++ b/jdk/make/sun/javazic/tzdata/asia @@ -1979,8 +1979,20 @@ Rule Syria 2007 only - Nov Fri>=1 0:00 0 - # compilers can't handle or having multiple Rules (a la Israel). # For now, use "Apr Fri>=1", and go with IATA on a uniform Sep 30 end. +# From Steffen Thorsen (2008-10-07): +# Syria has now officially decided to end DST on 2008-11-01 this year, +# according to the following article in the Syrian Arab News Agency (SANA). +# +# The article is in Arabic, and seems to tell that they will go back to +# winter time on 2008-11-01 at 00:00 local daylight time (delaying/setting +# clocks back 60 minutes). +# +# +# http://sana.sy/ara/2/2008/10/07/195459.htm +# + Rule Syria 2008 max - Apr Fri>=1 0:00 1:00 S -Rule Syria 2008 max - Oct 1 0:00 0 - +Rule Syria 2008 max - Nov 1 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Damascus 2:25:12 - LMT 1920 # Dimashq diff --git a/jdk/make/sun/javazic/tzdata/southamerica b/jdk/make/sun/javazic/tzdata/southamerica index ab558df75b9..3d37b9deb62 100644 --- a/jdk/make/sun/javazic/tzdata/southamerica +++ b/jdk/make/sun/javazic/tzdata/southamerica @@ -199,6 +199,22 @@ Rule Arg 2000 only - Mar 3 0:00 0 - # http://www.impulsobaires.com.ar/nota.php?id=57832 (in spanish) # +# From Rodrigo Severo (2008-10-06): +# Here is some info available at a Gentoo bug related to TZ on Argentina's DST: +# ... +# ------- Comment #1 from [jmdocile] 2008-10-06 16:28 0000 ------- +# Hi, there is a problem with timezone-data-2008e and maybe with +# timezone-data-2008f +# Argentinian law [Number] 25.155 is no longer valid. +# +# http://www.infoleg.gov.ar/infolegInternet/anexos/60000-64999/60036/norma.htm +# +# The new one is law [Number] 26.350 +# +# http://www.infoleg.gov.ar/infolegInternet/anexos/135000-139999/136191/norma.htm +# +# So there is no summer time in Argentina for now. + Rule Arg 2007 only - Dec 30 0:00 1:00 S Rule Arg 2008 max - Mar Sun>=15 0:00 0 - Rule Arg 2008 max - Oct Sun>=15 0:00 1:00 S diff --git a/jdk/make/sun/javazic/tzdata/zone.tab b/jdk/make/sun/javazic/tzdata/zone.tab index a9c686227ec..a06a008ee3b 100644 --- a/jdk/make/sun/javazic/tzdata/zone.tab +++ b/jdk/make/sun/javazic/tzdata/zone.tab @@ -315,7 +315,7 @@ NL +5222+00454 Europe/Amsterdam NO +5955+01045 Europe/Oslo NP +2743+08519 Asia/Katmandu NR -0031+16655 Pacific/Nauru -NU -1901+16955 Pacific/Niue +NU -1901-16955 Pacific/Niue NZ -3652+17446 Pacific/Auckland most locations NZ -4357-17633 Pacific/Chatham Chatham Islands OM +2336+05835 Asia/Muscat From 3b082d1d69938f1b44fa16b6b4fc97a33c5d78fb Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Fri, 17 Oct 2008 13:34:03 +0900 Subject: [PATCH 021/199] 6759521: Move Bidi test programs from closed to open Reviewed-by: okutsu --- jdk/test/java/text/Bidi/BidiBug.java | 41 ++++++ .../java/text/Bidi/BidiEmbeddingTest.java | 132 ++++++++++++++++++ .../java/text/Bidi/BidiSurrogateTest.java | 103 ++++++++++++++ 3 files changed, 276 insertions(+) create mode 100644 jdk/test/java/text/Bidi/BidiBug.java create mode 100644 jdk/test/java/text/Bidi/BidiEmbeddingTest.java create mode 100644 jdk/test/java/text/Bidi/BidiSurrogateTest.java diff --git a/jdk/test/java/text/Bidi/BidiBug.java b/jdk/test/java/text/Bidi/BidiBug.java new file mode 100644 index 00000000000..36ffcd7e440 --- /dev/null +++ b/jdk/test/java/text/Bidi/BidiBug.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 4827312 + * @summary verify that argument validity check is not fooled by overflow + */ +public class BidiBug { + public static void main(String[] args) { + try { + byte buff[] = new byte[3000]; + java.text.Bidi bidi = new java.text.Bidi(new char[20],10,buff,Integer.MAX_VALUE-3,4,1); + } + catch (IllegalArgumentException e) { + System.out.println(e); + return; // success + } + throw new RuntimeException("didn't throw error, though we didn't crash either"); + } +} diff --git a/jdk/test/java/text/Bidi/BidiEmbeddingTest.java b/jdk/test/java/text/Bidi/BidiEmbeddingTest.java new file mode 100644 index 00000000000..3e967be351d --- /dev/null +++ b/jdk/test/java/text/Bidi/BidiEmbeddingTest.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 4396492 4396496 4778510 + * @summary verify that the embedding values processed by the bidi code use negative values to + * indicate overrides, rather than using bit 7. Also tests Bidi without loading awt classes to + * confirm that Bidi can be used without awt. Verify that embedding level 0 is properly mapped + * to the base embedding level. + */ + +import java.awt.Color; +import java.awt.Frame; +import java.awt.font.TextAttribute; +import java.text.AttributedString; +import java.text.Bidi; + +public class BidiEmbeddingTest { + public static void main(String[] args) { + // to regress embedding test against old fix, call with an arg. A window will pop + // up causing awt lib to be loaded so the vm won't die with the unsatisfied link error. + if (args.length > 0) { + Frame f = new Frame(); + f.setSize(300, 300); + f.setBackground(Color.white); + f.show(); + } + + test1(); + test2(); + } + + static void test1() { + String target = "BACK WARDS"; + String str = "If this text is >" + target + "< the test passed."; + int start = str.indexOf(target); + int limit = start + target.length(); + + System.out.println("start: " + start + " limit: " + limit); + + AttributedString astr = new AttributedString(str); + astr.addAttribute(TextAttribute.BIDI_EMBEDDING, + new Integer(-1), + start, + limit); + + Bidi bidi = new Bidi(astr.getIterator()); + + for (int i = 0; i < bidi.getRunCount(); ++i) { + System.out.println("run " + i + + " from " + bidi.getRunStart(i) + + " to " + bidi.getRunLimit(i) + + " at level " + bidi.getRunLevel(i)); + } + + System.out.println(bidi); + + byte[] embs = new byte[str.length() + 3]; + for (int i = start + 1; i < limit + 1; ++i) { + embs[i] = -1; + } + + Bidi bidi2 = new Bidi(str.toCharArray(), 0, embs, 1, str.length(), Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + for (int i = 0; i < bidi2.getRunCount(); ++i) { + System.out.println("run " + i + + " from " + bidi2.getRunStart(i) + + " to " + bidi2.getRunLimit(i) + + " at level " + bidi2.getRunLevel(i)); + } + + System.out.println(bidi2); + + if (bidi.getRunCount() != 3 || bidi2.getRunCount() != 3) { + throw new Error("Bidi run count incorrect"); + } + } + + // make sure BIDI_EMBEDDING values of 0 are mapped to base run direction, instead of flagging an error. + static void test2() { + String target = "BACK WARDS"; + String str = "If this text is >" + target + "< the test passed."; + int length = str.length(); + int start = str.indexOf(target); + int limit = start + target.length(); + + System.out.println("start: " + start + " limit: " + limit); + + AttributedString astr = new AttributedString(str); + astr.addAttribute(TextAttribute.RUN_DIRECTION, TextAttribute.RUN_DIRECTION_RTL); + + astr.addAttribute(TextAttribute.BIDI_EMBEDDING, + new Integer(-3), + start, + limit); + + Bidi bidi = new Bidi(astr.getIterator()); + + for (int i = 0; i < bidi.getRunCount(); ++i) { + System.out.println("run " + i + + " from " + bidi.getRunStart(i) + + " to " + bidi.getRunLimit(i) + + " at level " + bidi.getRunLevel(i)); + } + + System.out.println(bidi); + + if (bidi.getRunCount() != 6) { // runs of spaces and angles at embedding bound,s and final period, each get level 1 + throw new Error("Bidi embedding processing failed"); + } + } +} diff --git a/jdk/test/java/text/Bidi/BidiSurrogateTest.java b/jdk/test/java/text/Bidi/BidiSurrogateTest.java new file mode 100644 index 00000000000..b24e1a1123f --- /dev/null +++ b/jdk/test/java/text/Bidi/BidiSurrogateTest.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 4888843 + * @summary verify that surrogate pairs representing codepoints with R or AL directionality + * and correctly recognized and reordered. + */ + +import java.text.Bidi; + +public class BidiSurrogateTest { + private static final String RTLS = new String(Character.toChars(0x10800)); // surrogate code point with R directionality + private static final String LTRS = new String(Character.toChars(0x107ff)); // surrogate code point with L directionality + private static final String LRE = "\u202a"; + private static final String RLE = "\u202b"; + private static final String PDF = "\u202c"; + + + public static void main(String[] args) { + new BidiSurrogateTest().test(); + } + + void test() { + test0(); + test1(); + } + + void test0() { + // test unpaired surrogates - should have L directionality + testRequiresBidi("\ud800", false); // unpaired lead surrogate + testRequiresBidi("\udc00", false); // unpaired trail surrogate + testRequiresBidi("\udc00\ud800", false); // out of order surrogates + testRequiresBidi("a\udc00b\ud800c", false); // out of order surrogates split + testRequiresBidi(LTRS, false); // supplementary with L + testRequiresBidi(RTLS, true); // supplementary with R + testRequiresBidi("a" + RTLS + "b", true); // R supplementary in LTR text + testRequiresBidi(LTRS + RTLS, true); // R supplementary in LTR supplementary text + testRequiresBidi(LRE, false); // LRE lone embedding + testRequiresBidi(RLE, true); // RLE lone embedding + testRequiresBidi(PDF, false); // PDF lone pop embedding + } + + void testRequiresBidi(String string, boolean requiresBidi) { + char[] text = string.toCharArray(); + if (Bidi.requiresBidi(text, 0, text.length) != requiresBidi) { + throw new RuntimeException("testRequiresBidi failed with '" + string + "', " + requiresBidi); + } + } + + void test1() { + // test that strings with surrogate runs process surrogate directionality ok + testBidi("This is a string with " + LTRS + " in it.", false); + testBidi("This is a string with \ud800 in it.", false); + testBidi("This is a string with \u0640 in it.", 22, 1); + testBidi(RTLS, true); + testBidi("This is a string with " + RTLS + RTLS + RTLS + " in it.", 22, 6); + } + + void testBidi(String string, boolean directionIsRTL) { + Bidi bidi = new Bidi(string, Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + if (bidi.isMixed()) { + throw new RuntimeException("bidi is mixed"); + } + if (bidi.isRightToLeft() != directionIsRTL) { + throw new RuntimeException("bidi is not " + (directionIsRTL ? "rtl" : "ltr")); + } + } + + void testBidi(String string, int rtlstart, int rtllength) { + Bidi bidi = new Bidi(string, Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + for (int i = 0; i < bidi.getRunCount(); ++i) { + if ((bidi.getRunLevel(i) & 1) != 0) { + if (bidi.getRunStart(i) != rtlstart || + bidi.getRunLimit(i) != rtlstart + rtllength) { + throw new RuntimeException("first rtl run didn't match " + rtlstart + ", " + rtllength); + } + break; + } + } + } +} From dacdf4a500d1944a6b13a0aabc950ca08e1b2b6b Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Tue, 28 Oct 2008 17:06:12 +0300 Subject: [PATCH 022/199] 6758673: WeakReference leak in Window.ownedWindowList WindowDisposerRecord parent field is correctly initialized Reviewed-by: dav, ant --- jdk/src/share/classes/java/awt/Window.java | 7 +- .../OwnedWindowsLeak/OwnedWindowsLeak.java | 104 ++++++++++++++++++ 2 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java diff --git a/jdk/src/share/classes/java/awt/Window.java b/jdk/src/share/classes/java/awt/Window.java index 94a8ff2ed5b..2651729f20d 100644 --- a/jdk/src/share/classes/java/awt/Window.java +++ b/jdk/src/share/classes/java/awt/Window.java @@ -53,6 +53,7 @@ import sun.awt.AppContext; import sun.awt.CausedFocusEvent; import sun.awt.SunToolkit; import sun.awt.util.IdentityArrayList; +import sun.java2d.Disposer; import sun.java2d.pipe.Region; import sun.security.action.GetPropertyAction; import sun.security.util.SecurityConstants; @@ -409,8 +410,6 @@ public class Window extends Container implements Accessible { } modalExclusionType = Dialog.ModalExclusionType.NO_EXCLUDE; - - sun.java2d.Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this)); } /** @@ -540,6 +539,10 @@ public class Window extends Container implements Accessible { if (owner != null) { owner.addOwnedWindow(weakThis); } + + // Fix for 6758673: this call is moved here from init(gc), because + // WindowDisposerRecord requires a proper value of parent field. + Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this)); } /** diff --git a/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java new file mode 100644 index 00000000000..44f43c1b3bf --- /dev/null +++ b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java @@ -0,0 +1,104 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + @test + @bug 6758673 + @summary Tests that windows are removed from owner's child windows list + @author art: area=awt.toplevel + @run main OwnedWindowsLeak +*/ + +import java.awt.*; +import java.awt.event.*; + +import java.lang.ref.*; +import java.lang.reflect.*; + +import java.util.*; + +public class OwnedWindowsLeak +{ + public static void main(String[] args) + { + Frame owner = new Frame("F"); + + // First, create many windows + Vector> children = + new Vector>(); + for (int i = 0; i < 1000; i++) + { + Window child = new Window(owner); + children.add(new WeakReference(child)); + } + + // Second, make sure all the memory is allocated + Vector garbage = new Vector(); + while (true) + { + try + { + garbage.add(new byte[1000]); + } + catch (OutOfMemoryError e) + { + break; + } + } + + // Third, make sure all the weak references are null + for (WeakReference ref : children) + { + if (ref.get() != null) + { + throw new RuntimeException("Test FAILED: some of child windows are not GCed"); + } + } + + // Fourth, make sure owner's children list contains no elements + try + { + Field f = Window.class.getDeclaredField("ownedWindowList"); + f.setAccessible(true); + Vector ownersChildren = (Vector)f.get(owner); + if (ownersChildren.size() > 0) + { + throw new RuntimeException("Test FAILED: some of the child windows are not removed from owner's children list"); + } + } + catch (NoSuchFieldException z) + { + System.out.println("Test PASSED: no 'ownedWindowList' field in Window class"); + return; + } + catch (Exception z) + { + throw new RuntimeException("Test FAILED: unexpected exception", z); + } + + // Test passed + System.out.println("Test PASSED"); + + owner.dispose(); + } +} From 1bff9286d7d745513040c17bcfc19a406d75525d Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Thu, 30 Oct 2008 13:12:54 +0900 Subject: [PATCH 023/199] 6764308: (tz) Support tzdata2008i Reviewed-by: okutsu --- jdk/make/sun/javazic/tzdata/VERSION | 2 +- jdk/make/sun/javazic/tzdata/southamerica | 58 +++++++++++++++---- jdk/make/sun/javazic/tzdata/zone.tab | 9 +-- .../sun/util/resources/TimeZoneNames.java | 1 + .../sun/util/resources/TimeZoneNames_de.java | 1 + .../sun/util/resources/TimeZoneNames_es.java | 1 + .../sun/util/resources/TimeZoneNames_fr.java | 1 + .../sun/util/resources/TimeZoneNames_it.java | 1 + .../sun/util/resources/TimeZoneNames_ja.java | 1 + .../sun/util/resources/TimeZoneNames_ko.java | 1 + .../sun/util/resources/TimeZoneNames_sv.java | 1 + .../util/resources/TimeZoneNames_zh_CN.java | 1 + .../util/resources/TimeZoneNames_zh_TW.java | 1 + 13 files changed, 64 insertions(+), 15 deletions(-) diff --git a/jdk/make/sun/javazic/tzdata/VERSION b/jdk/make/sun/javazic/tzdata/VERSION index 0d71d62ab79..d242b2d1da9 100644 --- a/jdk/make/sun/javazic/tzdata/VERSION +++ b/jdk/make/sun/javazic/tzdata/VERSION @@ -21,4 +21,4 @@ # CA 95054 USA or visit www.sun.com if you need additional information or # have any questions. # -tzdata2008h +tzdata2008i diff --git a/jdk/make/sun/javazic/tzdata/southamerica b/jdk/make/sun/javazic/tzdata/southamerica index 3d37b9deb62..6c82a557a70 100644 --- a/jdk/make/sun/javazic/tzdata/southamerica +++ b/jdk/make/sun/javazic/tzdata/southamerica @@ -215,6 +215,26 @@ Rule Arg 2000 only - Mar 3 0:00 0 - # # So there is no summer time in Argentina for now. +# From Mariano Absatz (2008-10-20): +# Decree 1693/2008 applies Law 26.350 for the summer 2008/2009 establishing DST in Argentina +# From 2008-10-19 until 2009-03-15 +# +# http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=16102008&pi=3&pf=4&s=0&sec=01 +# +# +# Decree 1705/2008 excepting 12 Provinces from applying DST in the summer 2008/2009: +# Catamarca, La Rioja, Mendoza, Salta, San Juan, San Luis, La Pampa, Neuquen, Rio Negro, Chubut, Santa Cruz +# and Tierra del Fuego +# +# http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=17102008&pi=1&pf=1&s=0&sec=01 +# +# +# Press release 235 dated Saturday October 18th, from the Government of the Province of Jujuy saying +# it will not apply DST either (even when it was not included in Decree 1705/2008) +# +# http://www.jujuy.gov.ar/index2/partes_prensa/18_10_08/235-181008.doc +# + Rule Arg 2007 only - Dec 30 0:00 1:00 S Rule Arg 2008 max - Mar Sun>=15 0:00 0 - Rule Arg 2008 max - Oct Sun>=15 0:00 1:00 S @@ -365,9 +385,8 @@ Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 Arg AR%sT # -# Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC), -# Formosa (FM), Salta (SA), Santiago del Estero (SE), Cordoba (CB), -# La Pampa (LP), Neuquen (NQ), Rio Negro (RN) +# Cordoba (CB), Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), +# Chaco (CC), Formosa (FM), Santiago del Estero (SE) # # Shanks & Pottenger also make the following claims, which we haven't verified: # - Formosa switched to -3:00 on 1991-01-07. @@ -386,6 +405,18 @@ Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 Arg AR%sT # +# Salta (SA), La Pampa (LP), Neuquen (NQ), Rio Negro (RN) +Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31 + -4:16:48 - CMT 1920 May + -4:00 - ART 1930 Dec + -4:00 Arg AR%sT 1969 Oct 5 + -3:00 Arg AR%sT 1991 Mar 3 + -4:00 - WART 1991 Oct 20 + -3:00 Arg AR%sT 1999 Oct 3 + -4:00 Arg AR%sT 2000 Mar 3 + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART +# # Tucuman (TM) Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May @@ -410,7 +441,8 @@ Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # # San Juan (SJ) Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 @@ -423,7 +455,8 @@ Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 May 31 -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # # Jujuy (JY) Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 @@ -437,7 +470,8 @@ Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 -3:00 1:00 ARST 1992 -3:00 Arg AR%sT 1999 Oct 3 -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # # Catamarca (CT), Chubut (CH) Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 @@ -450,7 +484,8 @@ Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # # Mendoza (MZ) Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 @@ -467,7 +502,8 @@ Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 May 23 -4:00 - WART 2004 Sep 26 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # # San Luis (SL) Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 @@ -495,7 +531,8 @@ Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 Jun 1 -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # # Tierra del Fuego, Antartida e Islas del Atlantico Sur (TF) Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 @@ -506,7 +543,8 @@ Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 -4:00 Arg AR%sT 2000 Mar 3 -3:00 - ART 2004 May 30 -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT + -3:00 Arg AR%sT 2008 Oct 18 + -3:00 - ART # Aruba # Zone NAME GMTOFF RULES FORMAT [UNTIL] diff --git a/jdk/make/sun/javazic/tzdata/zone.tab b/jdk/make/sun/javazic/tzdata/zone.tab index a06a008ee3b..305da58d372 100644 --- a/jdk/make/sun/javazic/tzdata/zone.tab +++ b/jdk/make/sun/javazic/tzdata/zone.tab @@ -64,14 +64,15 @@ AQ -7824+10654 Antarctica/Vostok Vostok Station, S Magnetic Pole AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) -AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF) -AR -3319-06621 America/Argentina/San_Luis San Luis (SL) +AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF) +AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN) AR -2411-06518 America/Argentina/Jujuy Jujuy (JY) AR -2649-06513 America/Argentina/Tucuman Tucuman (TM) AR -2828-06547 America/Argentina/Catamarca Catamarca (CT), Chubut (CH) AR -2926-06651 America/Argentina/La_Rioja La Rioja (LR) AR -3132-06831 America/Argentina/San_Juan San Juan (SJ) AR -3253-06849 America/Argentina/Mendoza Mendoza (MZ) +AR -3319-06621 America/Argentina/San_Luis San Luis (SL) AR -5138-06913 America/Argentina/Rio_Gallegos Santa Cruz (SC) AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF) AS -1416-17042 Pacific/Pago_Pago @@ -406,13 +407,13 @@ US +381515-0854534 America/Kentucky/Louisville Eastern Time - Kentucky - Louisvi US +364947-0845057 America/Kentucky/Monticello Eastern Time - Kentucky - Wayne County US +394606-0860929 America/Indiana/Indianapolis Eastern Time - Indiana - most locations US +384038-0873143 America/Indiana/Vincennes Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties -US +411745-0863730 America/Indiana/Knox Eastern Time - Indiana - Starke County US +410305-0863611 America/Indiana/Winamac Eastern Time - Indiana - Pulaski County US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County +US +382931-0871643 America/Indiana/Petersburg Eastern Time - Indiana - Pike County US +384452-0850402 America/Indiana/Vevay Eastern Time - Indiana - Switzerland County US +415100-0873900 America/Chicago Central Time US +375711-0864541 America/Indiana/Tell_City Central Time - Indiana - Perry County -US +382931-0871643 America/Indiana/Petersburg Central Time - Indiana - Pike County +US +411745-0863730 America/Indiana/Knox Central Time - Indiana - Starke County US +450628-0873651 America/Menominee Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County US +465042-1012439 America/North_Dakota/New_Salem Central Time - North Dakota - Morton County (except Mandan area) diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames.java index 6925ba12d5b..458fc79ed0c 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames.java @@ -290,6 +290,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java index eed4bbfb37d..88c0cff348f 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_de.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java index 27bf6533143..c05ed9317f5 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_es.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java index e9a3811d1b7..4ce66327638 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_fr.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java index 8012c36f7e6..3793c135147 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_it.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java index 33a1913bd52..53b4f394f92 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ja.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java index 8068237976f..8e3a4ff5232 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_ko.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java index cc872089fe1..253f506417d 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_sv.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java index 62304e98586..d6e9eeaecf3 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_CN.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, diff --git a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java index 77f539fe990..97afacdbc73 100644 --- a/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java +++ b/jdk/src/share/classes/sun/util/resources/TimeZoneNames_zh_TW.java @@ -290,6 +290,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle { {"America/Argentina/La_Rioja", AGT}, {"America/Argentina/Mendoza", AGT}, {"America/Argentina/Rio_Gallegos", AGT}, + {"America/Argentina/Salta", AGT}, {"America/Argentina/San_Juan", AGT}, {"America/Argentina/San_Luis", AGT}, {"America/Argentina/Tucuman", AGT}, From 9487cedae1a415182c11525d90a6a5de4a1a515f Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Mon, 17 Nov 2008 17:36:27 +0300 Subject: [PATCH 024/199] 6771030: Code improvement and warnings removing from the com.sun.java.swing.plaf.gtk package Removed unnecessary castings and other warnings Reviewed-by: malenkov --- .../swing/plaf/gtk/GTKColorChooserPanel.java | 22 ++++++++-------- .../sun/java/swing/plaf/gtk/GTKEngine.java | 4 +-- .../java/swing/plaf/gtk/GTKFileChooserUI.java | 25 +++++++++---------- .../sun/java/swing/plaf/gtk/GTKPainter.java | 2 +- .../com/sun/java/swing/plaf/gtk/Metacity.java | 20 +++++++-------- 5 files changed, 36 insertions(+), 37 deletions(-) diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java index c70d889f453..d54839f7e3c 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java @@ -799,9 +799,9 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements Graphics g = triangleImage.getGraphics(); g.setColor(new Color(0, 0, 0, 0)); g.fillRect(0, 0, a, a); - g.translate((int)(a / 2), 0); + g.translate(a / 2, 0); paintTriangle(g, triangleSize, getColor()); - g.translate((int)(-a / 2), 0); + g.translate(-a / 2, 0); g.dispose(); g = wheelImage.getGraphics(); @@ -897,7 +897,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements return false; } // Rotate to origin and and verify x is valid. - int triangleSize = (int)innerR * 3 / 2; + int triangleSize = innerR * 3 / 2; double x1 = Math.cos(angle) * x - Math.sin(angle) * y; double y1 = Math.sin(angle) * x + Math.cos(angle) * y; if (x1 < -(innerR / 2)) { @@ -960,7 +960,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements */ private void setSaturationAndBrightness(float s, float b) { int innerR = getTriangleCircumscribedRadius(); - int triangleSize = (int)innerR * 3 / 2; + int triangleSize = innerR * 3 / 2; double x = b * triangleSize; double maxY = x * Math.tan(Math.toRadians(30.0)); double y = 2 * maxY * s - maxY; @@ -1156,7 +1156,7 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements * @param x X location to get color for * @param y Y location to get color for * @param rad Radius from center of color wheel - * @param integer with red, green and blue components + * @return integer with red, green and blue components */ private int colorWheelLocationToRGB(int x, int y, double rad) { double angle = Math.acos((double)x / rad); @@ -1165,12 +1165,12 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements if (angle < PI_3) { if (y < 0) { // FFFF00 - FF0000 - rgb = 0xFF0000 | (int)Math.min(255, + rgb = 0xFF0000 | Math.min(255, (int)(255 * angle / PI_3)) << 8; } else { // FF0000 - FF00FF - rgb = 0xFF0000 | (int)Math.min(255, + rgb = 0xFF0000 | Math.min(255, (int)(255 * angle / PI_3)); } } @@ -1178,12 +1178,12 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements angle -= PI_3; if (y < 0) { // 00FF00 - FFFF00 - rgb = 0x00FF00 | (int)Math.max(0, 255 - + rgb = 0x00FF00 | Math.max(0, 255 - (int)(255 * angle / PI_3)) << 16; } else { // FF00FF - 0000FF - rgb = 0x0000FF | (int)Math.max(0, 255 - + rgb = 0x0000FF | Math.max(0, 255 - (int)(255 * angle / PI_3)) << 16; } } @@ -1191,12 +1191,12 @@ class GTKColorChooserPanel extends AbstractColorChooserPanel implements angle -= 2 * PI_3; if (y < 0) { // 00FFFF - 00FF00 - rgb = 0x00FF00 | (int)Math.min(255, + rgb = 0x00FF00 | Math.min(255, (int)(255 * angle / PI_3)); } else { // 0000FF - 00FFFF - rgb = 0x0000FF | (int)Math.min(255, + rgb = 0x0000FF | Math.min(255, (int)(255 * angle / PI_3)) << 8; } } diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java index 95bf090b645..737e20c2243 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java @@ -112,7 +112,7 @@ class GTKEngine { } - private static HashMap regionToWidgetTypeMap; + private static HashMap regionToWidgetTypeMap; private ImageCache cache = new ImageCache(CACHE_SIZE); private int x0, y0, w0, h0; private Graphics graphics; @@ -178,7 +178,7 @@ class GTKEngine { Toolkit.getDefaultToolkit(); // Initialize regionToWidgetTypeMap - regionToWidgetTypeMap = new HashMap(50); + regionToWidgetTypeMap = new HashMap(50); regionToWidgetTypeMap.put(Region.ARROW_BUTTON, new WidgetType[] { WidgetType.SPINNER_ARROW_BUTTON, WidgetType.COMBO_BOX_ARROW_BUTTON, diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java index 8b786da73fb..9ca8fa52b61 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java @@ -148,7 +148,7 @@ class GTKFileChooserUI extends SynthFileChooserUI { directoryList : fileList; Object[] files = list.getSelectedValues(); int len = files.length; - Vector result = new Vector(len + 1); + Vector result = new Vector(len + 1); // we return all selected file names for (int i = 0; i < len; i++) { @@ -425,16 +425,16 @@ class GTKFileChooserUI extends SynthFileChooserUI { setDirectorySelected(true); setDirectory(((File)objects[0])); } else { - ArrayList fList = new ArrayList(objects.length); - for (int i = 0; i < objects.length; i++) { - File f = (File)objects[i]; + ArrayList fList = new ArrayList(objects.length); + for (Object object : objects) { + File f = (File) object; if ((chooser.isFileSelectionEnabled() && f.isFile()) || (chooser.isDirectorySelectionEnabled() && f.isDirectory())) { fList.add(f); } } if (fList.size() > 0) { - files = (File[])fList.toArray(new File[fList.size()]); + files = fList.toArray(new File[fList.size()]); } setDirectorySelected(false); } @@ -671,9 +671,9 @@ class GTKFileChooserUI extends SynthFileChooserUI { pathFieldLabel.setLabelFor(fileNameTextField); - Set forwardTraversalKeys = fileNameTextField.getFocusTraversalKeys( + Set forwardTraversalKeys = fileNameTextField.getFocusTraversalKeys( KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS); - forwardTraversalKeys = new HashSet(forwardTraversalKeys); + forwardTraversalKeys = new HashSet(forwardTraversalKeys); forwardTraversalKeys.remove(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0)); fileNameTextField.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, forwardTraversalKeys); @@ -895,10 +895,9 @@ class GTKFileChooserUI extends SynthFileChooserUI { private class GTKDirectoryModel extends BasicDirectoryModel { FileSystemView fsv; - private Comparator fileComparator = new Comparator() { - public int compare(Object o, Object o1) { - return fsv.getSystemDisplayName((File) o).compareTo - (fsv.getSystemDisplayName((File) o1)); + private Comparator fileComparator = new Comparator() { + public int compare(File o, File o1) { + return fsv.getSystemDisplayName(o).compareTo(fsv.getSystemDisplayName(o1)); } }; @@ -1352,8 +1351,8 @@ class GTKFileChooserUI extends SynthFileChooserUI { FileFilter currentFilter = getFileChooser().getFileFilter(); boolean found = false; if (currentFilter != null) { - for (int i = 0; i < filters.length; i++) { - if (filters[i] == currentFilter) { + for (FileFilter filter : filters) { + if (filter == currentFilter) { found = true; } } diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java index 780b01cf6d4..58d61dc909a 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKPainter.java @@ -299,7 +299,7 @@ class GTKPainter extends SynthPainter { // Paint the default indicator GTKStyle style = (GTKStyle)context.getStyle(); if (defaultCapable && !toolButton) { - Insets defaultInsets = (Insets)style.getClassSpecificInsetsValue( + Insets defaultInsets = style.getClassSpecificInsetsValue( context, "default-border", GTKStyle.BUTTON_DEFAULT_BORDER_INSETS); diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java index a3eada90d84..d432bb088ba 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java @@ -124,7 +124,7 @@ class Metacity implements SynthConstants { } // Initialize constants - variables = new HashMap(); + variables = new HashMap(); NodeList nodes = xmlDoc.getElementsByTagName("constant"); int n = nodes.getLength(); for (int i = 0; i < n; i++) { @@ -144,14 +144,14 @@ class Metacity implements SynthConstants { } // Cache frame geometries - frameGeometries = new HashMap(); + frameGeometries = new HashMap>(); nodes = xmlDoc.getElementsByTagName("frame_geometry"); n = nodes.getLength(); for (int i = 0; i < n; i++) { Node node = nodes.item(i); String name = getStringAttr(node, "name"); if (name != null) { - HashMap gm = new HashMap(); + HashMap gm = new HashMap(); frameGeometries.put(name, gm); String parentGM = getStringAttr(node, "parent"); @@ -458,7 +458,7 @@ class Metacity implements SynthConstants { - private static class Privileged implements PrivilegedAction { + private static class Privileged implements PrivilegedAction { private static int GET_THEME_DIR = 0; private static int GET_USER_THEME = 1; private static int GET_IMAGE = 2; @@ -598,7 +598,7 @@ class Metacity implements SynthConstants { g2.setComposite(oldComp); } - private HashMap images = new HashMap(); + private HashMap images = new HashMap(); protected Image getImage(String key, Color c) { Image image = images.get(key+"-"+c.getRGB()); @@ -1530,8 +1530,8 @@ class Metacity implements SynthConstants { DocumentBuilderFactory.newInstance().newDocumentBuilder(); } InputStream inputStream = - (InputStream)AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + AccessController.doPrivileged(new PrivilegedAction() { + public InputStream run() { try { return new BufferedInputStream(xmlFile.openStream()); } catch (IOException ex) { @@ -1551,7 +1551,7 @@ class Metacity implements SynthConstants { protected Node[] getNodesByName(Node parent, String name) { NodeList nodes = parent.getChildNodes(); // ElementNode int n = nodes.getLength(); - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList(); for (int i=0; i < n; i++) { Node node = nodes.item(i); if (name.equals(node.getNodeName())) { @@ -1603,7 +1603,7 @@ class Metacity implements SynthConstants { String aValue = attrs[a * 2 + 1]; Node attr = nodeAttrs.getNamedItem(aName); if (attr == null || - aValue != null && !aValue.equals((String)attr.getNodeValue())) { + aValue != null && !aValue.equals(attr.getNodeValue())) { matches = false; break; } @@ -1642,7 +1642,7 @@ class Metacity implements SynthConstants { protected String getStringAttr(NamedNodeMap attrs, String name) { Node item = attrs.getNamedItem(name); - return (item != null) ? (String)item.getNodeValue() : null; + return (item != null) ? item.getNodeValue() : null; } protected boolean getBooleanAttr(Node node, String name, boolean fallback) { From 36134f31f5bd7705043a88c081ffefc85695b8cd Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Tue, 18 Nov 2008 13:58:43 +0900 Subject: [PATCH 025/199] 6769873: Regression test java/text/Date/DateFormat/Bug6683975.java started failing after DST ended Reviewed-by: okutsu --- jdk/test/java/text/Format/DateFormat/Bug6683975.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/test/java/text/Format/DateFormat/Bug6683975.java b/jdk/test/java/text/Format/DateFormat/Bug6683975.java index 1f497881a29..0638c557158 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug6683975.java +++ b/jdk/test/java/text/Format/DateFormat/Bug6683975.java @@ -35,7 +35,6 @@ public class Bug6683975 { private static Locale th = new Locale("th", ""); private static Locale th_TH = new Locale("th", "TH"); - private static Date date = new Date(2008-1900, Calendar.OCTOBER, 1, 0, 0, 0); private static String expected_th[] = { "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e17\u0e35\u0e48 30 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 \u0e04.\u0e28. 2008, 8 \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 0 \u0e19\u0e32\u0e17\u0e35 00 \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35", // 0: FULL "30 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 2008, 8 \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 0 \u0e19\u0e32\u0e17\u0e35", // 1: LONG @@ -65,6 +64,7 @@ public class Bug6683975 { System.err.println("\tth_TH: " + str_th_TH); } + Date date = new Date(2008-1900, Calendar.SEPTEMBER, 30, 8, 0, 0); str_th = df_th.format(date); if (!expected_th[style].equals(str_th)) { err = true; From 59b2212c9dd77c3b03601811f7ca2499e33cd603 Mon Sep 17 00:00:00 2001 From: Yuka Kamiya Date: Tue, 18 Nov 2008 15:59:36 +0900 Subject: [PATCH 026/199] 6772646: Regression test java/text/Date/DateFormat/Bug4823811.java started failing after DST ended Reviewed-by: okutsu --- jdk/test/java/text/Format/DateFormat/Bug4823811.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/test/java/text/Format/DateFormat/Bug4823811.java b/jdk/test/java/text/Format/DateFormat/Bug4823811.java index 65b4aa26349..6aa0787bfc2 100644 --- a/jdk/test/java/text/Format/DateFormat/Bug4823811.java +++ b/jdk/test/java/text/Format/DateFormat/Bug4823811.java @@ -25,6 +25,7 @@ * @test * @bug 4823811 * @summary Confirm that text which includes numbers with a trailing minus sign is parsed correctly. + * @run main/othervm -Duser.timezone=GMT+09:00 Bug4823811 */ import java.text.*; From 466eda6ee48797919f7c34016b1fb56402161463 Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Tue, 25 Nov 2008 16:42:10 +0300 Subject: [PATCH 027/199] 6698013: JFileChooser can no longer navigate non-local file systems ShellFolder is used only if possible Reviewed-by: peterz --- .../swing/plaf/basic/BasicFileChooserUI.java | 2 +- jdk/src/share/classes/sun/swing/FilePane.java | 10 + .../JFileChooser/6698013/bug6698013.html | 8 + .../JFileChooser/6698013/bug6698013.java | 174 ++++++++++++++++++ 4 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 jdk/test/javax/swing/JFileChooser/6698013/bug6698013.html create mode 100644 jdk/test/javax/swing/JFileChooser/6698013/bug6698013.java diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java index 13d13cdcefe..9b696868095 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java @@ -1132,7 +1132,7 @@ public class BasicFileChooserUI extends FileChooserUI { private void changeDirectory(File dir) { JFileChooser fc = getFileChooser(); // Traverse shortcuts on Windows - if (dir != null && File.separatorChar == '\\' && dir.getPath().endsWith(".lnk")) { + if (dir != null && FilePane.usesShellFolder(fc)) { try { File linkedTo = ShellFolder.getShellFolder(dir).getLinkLocation(); if (linkedTo != null && fc.isTraversable(linkedTo)) { diff --git a/jdk/src/share/classes/sun/swing/FilePane.java b/jdk/src/share/classes/sun/swing/FilePane.java index 298fd42b146..2f80184c741 100644 --- a/jdk/src/share/classes/sun/swing/FilePane.java +++ b/jdk/src/share/classes/sun/swing/FilePane.java @@ -1961,6 +1961,16 @@ public class FilePane extends JPanel implements PropertyChangeListener { } } + /** + * Returns true if specified FileChooser should use ShellFolder + */ + public static boolean usesShellFolder(JFileChooser chooser) { + Boolean prop = (Boolean) chooser.getClientProperty("FileChooser.useShellFolder"); + + return prop == null ? chooser.getFileSystemView().equals(FileSystemView.getFileSystemView()) + : prop.booleanValue(); + } + // This interface is used to access methods in the FileChooserUI // that are not public. public interface FileChooserUIAccessor { diff --git a/jdk/test/javax/swing/JFileChooser/6698013/bug6698013.html b/jdk/test/javax/swing/JFileChooser/6698013/bug6698013.html new file mode 100644 index 00000000000..8de6fdd0792 --- /dev/null +++ b/jdk/test/javax/swing/JFileChooser/6698013/bug6698013.html @@ -0,0 +1,8 @@ + + + +1. Go into 'subdir' folder via double click +2. Return to parent directory +3. Go into 'subdir' folder: select 'subdir' folder and press the 'Open' button + + diff --git a/jdk/test/javax/swing/JFileChooser/6698013/bug6698013.java b/jdk/test/javax/swing/JFileChooser/6698013/bug6698013.java new file mode 100644 index 00000000000..ede1533746d --- /dev/null +++ b/jdk/test/javax/swing/JFileChooser/6698013/bug6698013.java @@ -0,0 +1,174 @@ +/* @test %W% %E% + @bug 6698013 + @summary JFileChooser can no longer navigate non-local file systems. + @author Pavel Porvatov + @run applet/manual=done bug6698013.html +*/ + +import javax.swing.*; +import javax.swing.filechooser.FileSystemView; +import java.io.File; + +public class bug6698013 extends JApplet { + + final static VirtualFile root = new VirtualFile("testdir", true); + + final static VirtualFile rootFile = new VirtualFile("testdir/test.txt", false); + + final static VirtualFile subdir = new VirtualFile("testdir/subdir", true); + + final static VirtualFile subdirFile = new VirtualFile("testdir/subdir/subtest.txt", false); + + public static void main(String[] args) { + JFileChooser chooser = new JFileChooser(new VirtualFileSystemView()); + chooser.setCurrentDirectory(root); + chooser.showSaveDialog(null); + } + + public void init() { + JFileChooser chooser = new JFileChooser(new VirtualFileSystemView()); + chooser.setCurrentDirectory(root); + chooser.showSaveDialog(null); + } +} + +class VirtualFileSystemView extends FileSystemView { + + public boolean isRoot(File dir) { + return bug6698013.root.equals(dir); + } + + public File createNewFolder(File dir) { + return null; + } + + public File[] getRoots() { + return new File[]{bug6698013.root}; + } + + public boolean isDrive(File dir) { + return false; + } + + public boolean isFloppyDrive(File dir) { + return false; + } + + public File getParentDirectory(File dir) { + if (dir == null) { + return null; + } + + return new VirtualFile(dir.getPath(), true).getParentFile(); + } + + public File[] getFiles(File dir, boolean hide_hidden) { + if (dir.equals(bug6698013.root)) { + return new File[]{bug6698013.rootFile, bug6698013.subdir}; + } + + if (dir.equals(bug6698013.subdir)) { + return new File[]{bug6698013.subdirFile}; + } + + return null; + } + + public File getHomeDirectory() { + return bug6698013.root; + } + + public File getDefaultDirectory() { + return getHomeDirectory(); + } + + public String getSystemDisplayName(File file) { + return file.getName(); + } + + public Boolean isTraversable(File file) { + return Boolean.valueOf(file.isDirectory()); + } +} + +/** + * A Virtual File. Contains a path and a directory flag that + * represents the location of a virtual file to be contained in the + * Virtual FileSystemView. + */ +class VirtualFile extends File { + + private static final long serialVersionUID = 0L; + + private String path; + + private boolean directory; + + public VirtualFile(String path, boolean directory) { + super(path); + this.path = path; + this.directory = directory; + } + + public File getParentFile() { + int index = path.lastIndexOf('/'); + + if (index == -1) { + return null; + } + + return new VirtualFile(path.substring(0, index), true); + } + + public File getCanonicalFile() { + return this; + } + + public String getParent() { + File parent_file = getParentFile(); + + return parent_file == null ? null : parent_file.getPath(); + } + + public String getName() { + int index = path.lastIndexOf('/'); + + return index == -1 ? path : path.substring(index + 1); + } + + public String getPath() { + return path; + } + + public String getAbsolutePath() { + return path; + } + + public String getCanonicalPath() { + return path; + } + + public String toString() { + return path; + } + + public boolean equals(Object obj) { + return obj instanceof VirtualFile && path.equals(obj.toString()); + } + + public int hashCode() { + return path.hashCode(); + } + + public boolean canWrite() { + return true; + } + + public boolean isDirectory() { + return directory; + } + + public boolean exists() { + return true; + } +} From 4121a03c4c67de2b683f0801b27b6f2b133b0a08 Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Wed, 26 Nov 2008 16:25:16 +0300 Subject: [PATCH 028/199] 6699589: java/awt/EventQueue/PostEventOrderingTest.java fails Reviewed-by: dav, anthony --- jdk/src/share/classes/sun/awt/SunToolkit.java | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/jdk/src/share/classes/sun/awt/SunToolkit.java b/jdk/src/share/classes/sun/awt/SunToolkit.java index 20da8ffe766..3db3b21a6db 100644 --- a/jdk/src/share/classes/sun/awt/SunToolkit.java +++ b/jdk/src/share/classes/sun/awt/SunToolkit.java @@ -2008,26 +2008,12 @@ class PostEventQueue { /* * Continually post pending AWTEvents to the Java EventQueue. */ - public void flush() { - if (queueHead != null) { - EventQueueItem tempQueue; - /* - * We have to execute the loop inside the synchronized block - * to ensure that the flush is completed before a new event - * can be posted to this queue. - */ - synchronized (this) { - tempQueue = queueHead; - queueHead = queueTail = null; - /* - * If this PostEventQueue is flushed in parallel on two - * different threads tempQueue will be null for one of them. - */ - while (tempQueue != null) { - eventQueue.postEvent(tempQueue.event); - tempQueue = tempQueue.next; - } - } + public synchronized void flush() { + EventQueueItem tempQueue = queueHead; + queueHead = queueTail = null; + while (tempQueue != null) { + eventQueue.postEvent(tempQueue.event); + tempQueue = tempQueue.next; } } From e7c2dc0b7ad6b1facf05d7bae13802ef9757636a Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Wed, 26 Nov 2008 19:08:41 +0300 Subject: [PATCH 029/199] 6560349: REGRESSION :folder having ".lnk" in the name can not be opened by 5.0 and later versions Reviewed-by: alexp --- .../swing/plaf/basic/BasicFileChooserUI.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java index 9b696868095..44f99d6d3e3 100644 --- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java @@ -1134,11 +1134,16 @@ public class BasicFileChooserUI extends FileChooserUI { // Traverse shortcuts on Windows if (dir != null && FilePane.usesShellFolder(fc)) { try { - File linkedTo = ShellFolder.getShellFolder(dir).getLinkLocation(); - if (linkedTo != null && fc.isTraversable(linkedTo)) { - dir = linkedTo; - } else { - return; + ShellFolder shellFolder = ShellFolder.getShellFolder(dir); + + if (shellFolder.isLink()) { + File linkedTo = shellFolder.getLinkLocation(); + + if (linkedTo != null && fc.isTraversable(linkedTo)) { + dir = linkedTo; + } else { + return; + } } } catch (FileNotFoundException ex) { return; From 5a8c6c3bf7b2101bca5d1a0bb601ce887f885ccc Mon Sep 17 00:00:00 2001 From: Pavel Porvatov Date: Wed, 26 Nov 2008 19:38:46 +0300 Subject: [PATCH 030/199] 6776856: Code with useShellFolder field shuold be simplify Reviewed-by: peterz --- .../plaf/windows/WindowsFileChooserUI.java | 16 +++---------- .../swing/plaf/metal/MetalFileChooserUI.java | 24 ++----------------- jdk/src/share/classes/sun/swing/FilePane.java | 5 ++-- .../plaf/synth/SynthFileChooserUIImpl.java | 24 ++----------------- 4 files changed, 9 insertions(+), 60 deletions(-) diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java index e0fb203e0d3..6f75220d4e7 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java @@ -70,7 +70,6 @@ public class WindowsFileChooserUI extends BasicFileChooserUI { private JTextField filenameTextField; private FilePane filePane; private WindowsPlacesBar placesBar; - private boolean useShellFolder; private JButton approveButton; private JButton cancelButton; @@ -210,10 +209,6 @@ public class WindowsFileChooserUI extends BasicFileChooserUI { public ListSelectionListener createListSelectionListener() { return WindowsFileChooserUI.this.createListSelectionListener(getFileChooser()); } - - public boolean usesShellFolder() { - return useShellFolder; - } } public void installComponents(JFileChooser fc) { @@ -625,15 +620,8 @@ public class WindowsFileChooserUI extends BasicFileChooserUI { // Decide whether to use the ShellFolder class to populate shortcut // panel and combobox. JFileChooser fc = getFileChooser(); - Boolean prop = - (Boolean)fc.getClientProperty("FileChooser.useShellFolder"); - if (prop != null) { - useShellFolder = prop.booleanValue(); - } else { - useShellFolder = fc.getFileSystemView().equals(FileSystemView.getFileSystemView()); - } if (OS_VERSION.compareTo(OSInfo.WINDOWS_ME) >= 0) { - if (useShellFolder) { + if (FilePane.usesShellFolder(fc)) { if (placesBar == null && !UIManager.getBoolean("FileChooser.noPlacesBar")) { placesBar = new WindowsPlacesBar(fc, XPStyle.getXP() != null); fc.add(placesBar, BorderLayout.BEFORE_LINE_BEGINS); @@ -1149,6 +1137,8 @@ public class WindowsFileChooserUI extends BasicFileChooserUI { return; } + boolean useShellFolder = FilePane.usesShellFolder(chooser); + directories.clear(); File[] baseFolders; diff --git a/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java b/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java index fd837b9abf2..f1864614d90 100644 --- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java @@ -68,8 +68,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI { private JToggleButton listViewButton; private JToggleButton detailsViewButton; - private boolean useShellFolder; - private JButton approveButton; private JButton cancelButton; @@ -204,10 +202,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI { public ListSelectionListener createListSelectionListener() { return MetalFileChooserUI.this.createListSelectionListener(getFileChooser()); } - - public boolean usesShellFolder() { - return useShellFolder; - } } public void installComponents(JFileChooser fc) { @@ -219,8 +213,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI { filePane = new FilePane(new MetalFileChooserUIAccessor()); fc.addPropertyChangeListener(filePane); - updateUseShellFolder(); - // ********************************* // // **** Construct the top panel **** // // ********************************* // @@ -448,19 +440,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI { groupLabels(new AlignedLabel[] { fileNameLabel, filesOfTypeLabel }); } - private void updateUseShellFolder() { - // Decide whether to use the ShellFolder class to populate shortcut - // panel and combobox. - JFileChooser fc = getFileChooser(); - Boolean prop = - (Boolean)fc.getClientProperty("FileChooser.useShellFolder"); - if (prop != null) { - useShellFolder = prop.booleanValue(); - } else { - useShellFolder = fc.getFileSystemView().equals(FileSystemView.getFileSystemView()); - } - } - protected JPanel getButtonPanel() { if (buttonPanel == null) { buttonPanel = new JPanel(); @@ -786,7 +765,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI { cc.applyComponentOrientation(o); } } else if (s == "FileChooser.useShellFolder") { - updateUseShellFolder(); doDirectoryChanged(e); } else if (s.equals("ancestor")) { if (e.getOldValue() == null && e.getNewValue() != null) { @@ -953,6 +931,8 @@ public class MetalFileChooserUI extends BasicFileChooserUI { return; } + boolean useShellFolder = FilePane.usesShellFolder(chooser); + directories.clear(); File[] baseFolders; diff --git a/jdk/src/share/classes/sun/swing/FilePane.java b/jdk/src/share/classes/sun/swing/FilePane.java index 2f80184c741..de5ad7c4831 100644 --- a/jdk/src/share/classes/sun/swing/FilePane.java +++ b/jdk/src/share/classes/sun/swing/FilePane.java @@ -689,7 +689,7 @@ public class FilePane extends JPanel implements PropertyChangeListener { void updateColumnInfo() { File dir = chooser.getCurrentDirectory(); - if (dir != null && fileChooserUIAccessor.usesShellFolder()) { + if (dir != null && usesShellFolder(chooser)) { try { dir = ShellFolder.getShellFolder(dir); } catch (FileNotFoundException e) { @@ -1947,7 +1947,7 @@ public class FilePane extends JPanel implements PropertyChangeListener { if (f instanceof ShellFolder) { return ((ShellFolder) f).isFileSystem(); } else { - if (fileChooserUIAccessor.usesShellFolder()) { + if (usesShellFolder(getFileChooser())) { try { return ShellFolder.getShellFolder(f).isFileSystem(); } catch (FileNotFoundException ex) { @@ -1985,6 +1985,5 @@ public class FilePane extends JPanel implements PropertyChangeListener { public Action getNewFolderAction(); public MouseListener createDoubleClickListener(JList list); public ListSelectionListener createListSelectionListener(); - public boolean usesShellFolder(); } } diff --git a/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java b/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java index 2721764d1d7..a107ccca88d 100644 --- a/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java +++ b/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java @@ -71,8 +71,6 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI { private JToggleButton listViewButton; private JToggleButton detailsViewButton; - private boolean useShellFolder; - private boolean readOnly; private JPanel buttonPanel; @@ -185,10 +183,6 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI { public ListSelectionListener createListSelectionListener() { return SynthFileChooserUIImpl.this.createListSelectionListener(getFileChooser()); } - - public boolean usesShellFolder() { - return useShellFolder; - } } protected void installDefaults(JFileChooser fc) { @@ -201,8 +195,6 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI { SynthContext context = getContext(fc, ENABLED); - updateUseShellFolder(); - fc.setLayout(new BorderLayout(0, 11)); // ********************************* // @@ -432,20 +424,6 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI { super.uninstallListeners(fc); } - private void updateUseShellFolder() { - // Decide whether to use the ShellFolder class to populate shortcut - // panel and combobox. - JFileChooser fc = getFileChooser(); - Boolean prop = - (Boolean)fc.getClientProperty("FileChooser.useShellFolder"); - if (prop != null) { - useShellFolder = prop.booleanValue(); - } else { - useShellFolder = fc.getFileSystemView().equals(FileSystemView.getFileSystemView()); - } - } - - private String fileNameString(File file) { if (file == null) { return null; @@ -761,6 +739,8 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI { return; } + boolean useShellFolder = FilePane.usesShellFolder(chooser); + int oldSize = directories.size(); directories.clear(); if (oldSize > 0) { From 8242c2b3b60c69868c78e7d40fe04e0b295fe78c Mon Sep 17 00:00:00 2001 From: Florian Brunner Date: Thu, 27 Nov 2008 17:55:36 +0300 Subject: [PATCH 031/199] 6776095: Code improvement and warnings removing from swing packages Reviewed-by: malenkov --- .../java/swing/plaf/gtk/GTKFileChooserUI.java | 8 +++---- .../java/swing/plaf/gtk/GTKLookAndFeel.java | 8 +++---- .../share/classes/javax/swing/ImageIcon.java | 2 +- .../classes/javax/swing/ProgressMonitor.java | 13 +++++------- .../classes/javax/swing/SwingWorker.java | 4 ++-- .../DefaultColorSelectionModel.java | 3 +-- .../swing/table/DefaultTableColumnModel.java | 7 +++---- .../swing/tree/DefaultMutableTreeNode.java | 21 ++++++++----------- .../javax/swing/undo/CompoundEdit.java | 6 +++--- 9 files changed, 32 insertions(+), 40 deletions(-) diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java index 9ca8fa52b61..acb944dfa56 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java @@ -263,13 +263,13 @@ class GTKFileChooserUI extends SynthFileChooserUI { ListSelectionModel sm = directoryList.getSelectionModel(); if (sm instanceof DefaultListSelectionModel) { ((DefaultListSelectionModel)sm).moveLeadSelectionIndex(0); - ((DefaultListSelectionModel)sm).setAnchorSelectionIndex(0); + sm.setAnchorSelectionIndex(0); } fileList.clearSelection(); sm = fileList.getSelectionModel(); if (sm instanceof DefaultListSelectionModel) { ((DefaultListSelectionModel)sm).moveLeadSelectionIndex(0); - ((DefaultListSelectionModel)sm).setAnchorSelectionIndex(0); + sm.setAnchorSelectionIndex(0); } File currentDirectory = getFileChooser().getCurrentDirectory(); @@ -1073,7 +1073,7 @@ class GTKFileChooserUI extends SynthFileChooserUI { * Data model for a type-face selection combo-box. */ protected class DirectoryComboBoxModel extends AbstractListModel implements ComboBoxModel { - Vector directories = new Vector(); + Vector directories = new Vector(); File selectedDirectory = null; JFileChooser chooser = getFileChooser(); FileSystemView fsv = chooser.getFileSystemView(); @@ -1215,7 +1215,7 @@ class GTKFileChooserUI extends SynthFileChooserUI { ListSelectionModel sm = fileList.getSelectionModel(); if (sm instanceof DefaultListSelectionModel) { ((DefaultListSelectionModel)sm).moveLeadSelectionIndex(0); - ((DefaultListSelectionModel)sm).setAnchorSelectionIndex(0); + sm.setAnchorSelectionIndex(0); } rescanCurrentDirectory(getFileChooser()); return; diff --git a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java index 6934aa213d1..23e4ee2eee5 100644 --- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java +++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java @@ -1470,7 +1470,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel { aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(gtkAAFontSettingsCond); } - static ReferenceQueue queue = new ReferenceQueue(); + static ReferenceQueue queue = new ReferenceQueue(); private static void flushUnreferenced() { WeakPCL pcl; @@ -1480,12 +1480,12 @@ public class GTKLookAndFeel extends SynthLookAndFeel { } } - static class WeakPCL extends WeakReference implements + static class WeakPCL extends WeakReference implements PropertyChangeListener { private Toolkit kit; private String key; - WeakPCL(Object target, Toolkit kit, String key) { + WeakPCL(GTKLookAndFeel target, Toolkit kit, String key) { super(target, queue); this.kit = kit; this.key = key; @@ -1494,7 +1494,7 @@ public class GTKLookAndFeel extends SynthLookAndFeel { public String getKey() { return key; } public void propertyChange(final PropertyChangeEvent pce) { - final GTKLookAndFeel lnf = (GTKLookAndFeel)get(); + final GTKLookAndFeel lnf = get(); if (lnf == null || UIManager.getLookAndFeel() != lnf) { // The property was GC'ed, we're no longer interested in diff --git a/jdk/src/share/classes/javax/swing/ImageIcon.java b/jdk/src/share/classes/javax/swing/ImageIcon.java index 74788f1a803..7f1fd02e003 100644 --- a/jdk/src/share/classes/javax/swing/ImageIcon.java +++ b/jdk/src/share/classes/javax/swing/ImageIcon.java @@ -86,7 +86,7 @@ public class ImageIcon implements Icon, Serializable, Accessible { static { component = new Component() {}; - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction() { public Object run() { try { // 6482575 - clear the appContext field so as not to leak it diff --git a/jdk/src/share/classes/javax/swing/ProgressMonitor.java b/jdk/src/share/classes/javax/swing/ProgressMonitor.java index 36366df170c..73a2b656b0d 100644 --- a/jdk/src/share/classes/javax/swing/ProgressMonitor.java +++ b/jdk/src/share/classes/javax/swing/ProgressMonitor.java @@ -78,7 +78,7 @@ import javax.swing.text.*; * @author James Gosling * @author Lynn Monsanto (accessibility) */ -public class ProgressMonitor extends Object implements Accessible +public class ProgressMonitor implements Accessible { private ProgressMonitor root; private JDialog dialog; @@ -186,7 +186,7 @@ public class ProgressMonitor extends Object implements Accessible } if (window instanceof SwingUtilities.SharedOwnerFrame) { WindowListener ownerShutdownListener = - (WindowListener)SwingUtilities.getSharedOwnerFrameShutdownListener(); + SwingUtilities.getSharedOwnerFrameShutdownListener(); dialog.addWindowListener(ownerShutdownListener); } Container contentPane = dialog.getContentPane(); @@ -273,7 +273,7 @@ public class ProgressMonitor extends Object implements Accessible if (dT >= millisToDecideToPopup) { int predictedCompletionTime; if (nv > min) { - predictedCompletionTime = (int)((long)dT * + predictedCompletionTime = (int)(dT * (max - min) / (nv - min)); } @@ -691,10 +691,7 @@ public class ProgressMonitor extends Object implements Accessible * object does not have an Accessible parent */ public Accessible getAccessibleParent() { - if (dialog != null) { - return (Accessible)dialog; - } - return null; + return dialog; } /* @@ -768,7 +765,7 @@ public class ProgressMonitor extends Object implements Accessible if (myBar != null) { Component c = myBar.getParent(); if (c instanceof Accessible) { - return ((Accessible)c).getAccessibleContext(); + return c.getAccessibleContext(); } } return null; diff --git a/jdk/src/share/classes/javax/swing/SwingWorker.java b/jdk/src/share/classes/javax/swing/SwingWorker.java index de00ddc381d..9eca7d535f6 100644 --- a/jdk/src/share/classes/javax/swing/SwingWorker.java +++ b/jdk/src/share/classes/javax/swing/SwingWorker.java @@ -282,7 +282,7 @@ public abstract class SwingWorker implements RunnableFuture { * is finished. */ DONE - }; + } /** * Constructs this {@code SwingWorker}. @@ -825,7 +825,7 @@ public abstract class SwingWorker implements RunnableFuture { } private static class DoSubmitAccumulativeRunnable extends AccumulativeRunnable implements ActionListener { - private final static int DELAY = (int) (1000 / 30); + private final static int DELAY = 1000 / 30; @Override protected void run(List args) { for (Runnable runnable : args) { diff --git a/jdk/src/share/classes/javax/swing/colorchooser/DefaultColorSelectionModel.java b/jdk/src/share/classes/javax/swing/colorchooser/DefaultColorSelectionModel.java index e3cf261bd02..e437dd96dd3 100644 --- a/jdk/src/share/classes/javax/swing/colorchooser/DefaultColorSelectionModel.java +++ b/jdk/src/share/classes/javax/swing/colorchooser/DefaultColorSelectionModel.java @@ -128,8 +128,7 @@ public class DefaultColorSelectionModel implements ColorSelectionModel, Serializ * @since 1.4 */ public ChangeListener[] getChangeListeners() { - return (ChangeListener[])listenerList.getListeners( - ChangeListener.class); + return listenerList.getListeners(ChangeListener.class); } /** diff --git a/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java b/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java index 846001b35b1..d3ae8cdd63f 100644 --- a/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java +++ b/jdk/src/share/classes/javax/swing/table/DefaultTableColumnModel.java @@ -190,7 +190,7 @@ public class DefaultTableColumnModel implements TableColumnModel, fireColumnMoved(new TableColumnModelEvent(this, columnIndex, newIndex)); return; } - aColumn = (TableColumn)tableColumns.elementAt(columnIndex); + aColumn = tableColumns.elementAt(columnIndex); tableColumns.removeElementAt(columnIndex); boolean selected = selectionModel.isSelectedIndex(columnIndex); @@ -291,7 +291,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * at columnIndex */ public TableColumn getColumn(int columnIndex) { - return (TableColumn)tableColumns.elementAt(columnIndex); + return tableColumns.elementAt(columnIndex); } /** @@ -504,8 +504,7 @@ public class DefaultTableColumnModel implements TableColumnModel, * @since 1.4 */ public TableColumnModelListener[] getColumnModelListeners() { - return (TableColumnModelListener[])listenerList.getListeners( - TableColumnModelListener.class); + return listenerList.getListeners(TableColumnModelListener.class); } // diff --git a/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java b/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java index 11ed3bdd582..34c36ba8957 100644 --- a/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java +++ b/jdk/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java @@ -84,7 +84,7 @@ import java.util.*; * * @author Rob Davis */ -public class DefaultMutableTreeNode extends Object implements Cloneable, +public class DefaultMutableTreeNode implements Cloneable, MutableTreeNode, Serializable { private static final long serialVersionUID = -4298474751201349152L; @@ -1251,7 +1251,7 @@ public class DefaultMutableTreeNode extends Object implements Cloneable, * @return a copy of this node */ public Object clone() { - DefaultMutableTreeNode newNode = null; + DefaultMutableTreeNode newNode; try { newNode = (DefaultMutableTreeNode)super.clone(); @@ -1297,24 +1297,22 @@ public class DefaultMutableTreeNode extends Object implements Cloneable, userObject = tValues[1]; } - final class PreorderEnumeration implements Enumeration { - protected Stack stack; + private final class PreorderEnumeration implements Enumeration { + private final Stack stack = new Stack(); public PreorderEnumeration(TreeNode rootNode) { super(); - Vector v = new Vector(1); + Vector v = new Vector(1); v.addElement(rootNode); // PENDING: don't really need a vector - stack = new Stack(); stack.push(v.elements()); } public boolean hasMoreElements() { - return (!stack.empty() && - ((Enumeration)stack.peek()).hasMoreElements()); + return (!stack.empty() && stack.peek().hasMoreElements()); } public TreeNode nextElement() { - Enumeration enumer = (Enumeration)stack.peek(); + Enumeration enumer = stack.peek(); TreeNode node = (TreeNode)enumer.nextElement(); Enumeration children = node.children(); @@ -1353,8 +1351,7 @@ public class DefaultMutableTreeNode extends Object implements Cloneable, if (subtree.hasMoreElements()) { retval = subtree.nextElement(); } else if (children.hasMoreElements()) { - subtree = new PostorderEnumeration( - (TreeNode)children.nextElement()); + subtree = new PostorderEnumeration(children.nextElement()); retval = subtree.nextElement(); } else { retval = root; @@ -1373,7 +1370,7 @@ public class DefaultMutableTreeNode extends Object implements Cloneable, public BreadthFirstEnumeration(TreeNode rootNode) { super(); - Vector v = new Vector(1); + Vector v = new Vector(1); v.addElement(rootNode); // PENDING: don't really need a vector queue = new Queue(); queue.enqueue(v.elements()); diff --git a/jdk/src/share/classes/javax/swing/undo/CompoundEdit.java b/jdk/src/share/classes/javax/swing/undo/CompoundEdit.java index 6bc66156029..7aa21d3af8d 100644 --- a/jdk/src/share/classes/javax/swing/undo/CompoundEdit.java +++ b/jdk/src/share/classes/javax/swing/undo/CompoundEdit.java @@ -59,7 +59,7 @@ public class CompoundEdit extends AbstractUndoableEdit { super.undo(); int i = edits.size(); while (i-- > 0) { - UndoableEdit e = (UndoableEdit)edits.elementAt(i); + UndoableEdit e = edits.elementAt(i); e.undo(); } } @@ -85,7 +85,7 @@ public class CompoundEdit extends AbstractUndoableEdit { protected UndoableEdit lastEdit() { int count = edits.size(); if (count > 0) - return (UndoableEdit)edits.elementAt(count-1); + return edits.elementAt(count-1); else return null; } @@ -98,7 +98,7 @@ public class CompoundEdit extends AbstractUndoableEdit { int size = edits.size(); for (int i = size-1; i >= 0; i--) { - UndoableEdit e = (UndoableEdit)edits.elementAt(i); + UndoableEdit e = edits.elementAt(i); // System.out.println("CompoundEdit(" + i + "): Discarding " + // e.getUndoPresentationName()); e.die(); From cdc043012645736bd36b6d2cc38347b4b35dafd8 Mon Sep 17 00:00:00 2001 From: Artem Ananiev Date: Fri, 19 Dec 2008 16:04:04 +0300 Subject: [PATCH 032/199] 6773985: OutOfMemory (PermGen space) under Linux / Firefox when switching bw. applets XEmbedClientHelper is uninstalled when its embedded frame is disposed. Reviewed-by: dcherepanov, ant --- .../sun/awt/X11/XEmbedClientHelper.java | 60 +++++++++++++++---- .../sun/awt/X11/XEmbeddedFramePeer.java | 22 ++++++- 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/jdk/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java b/jdk/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java index 139f375fa40..8be2390754c 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbedClientHelper.java @@ -31,6 +31,9 @@ import sun.awt.SunToolkit; import java.awt.Component; import java.awt.Container; +import sun.awt.X11GraphicsConfig; +import sun.awt.X11GraphicsDevice; + /** * Helper class implementing XEmbed protocol handling routines(client side) * Window which wants to participate in a protocol should create an instance, @@ -39,20 +42,34 @@ import java.awt.Container; public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher { private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper"); - private XEmbeddedFramePeer embedded; + private XEmbeddedFramePeer embedded; // XEmbed client + private long server; // XEmbed server + private boolean active; - private long server; private boolean applicationActive; XEmbedClientHelper() { super(); } - void install(XEmbeddedFramePeer embedded) { - this.embedded = embedded; + void setClient(XEmbeddedFramePeer client) { + if (xembedLog.isLoggable(Level.FINE)) { + xembedLog.fine("XEmbed client: " + client); + } + if (embedded != null) { + XToolkit.removeEventDispatcher(embedded.getWindow(), this); + active = false; + } + embedded = client; + if (embedded != null) { + XToolkit.addEventDispatcher(embedded.getWindow(), this); + } + } - if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Installing xembedder on " + embedded); - XToolkit.addEventDispatcher(embedded.getWindow(), this); + void install() { + if (xembedLog.isLoggable(Level.FINE)) { + xembedLog.fine("Installing xembedder on " + embedded); + } long[] info = new long[] { XEMBED_VERSION, XEMBED_MAPPED }; long data = Native.card32ToData(info); try { @@ -155,7 +172,24 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher } public void handleReparentNotify(XEvent xev) { XReparentEvent re = xev.get_xreparent(); - server = re.get_parent(); + long newParent = re.get_parent(); + if (active) { + // unregister accelerators, etc. for old parent + embedded.notifyStopped(); + // check if newParent is a root window + X11GraphicsConfig gc = (X11GraphicsConfig)embedded.getGraphicsConfiguration(); + X11GraphicsDevice gd = (X11GraphicsDevice)gc.getDevice(); + if ((newParent == XlibUtil.getRootWindow(gd.getScreen())) || + (newParent == XToolkit.getDefaultRootWindow())) + { + // reparenting to root means XEmbed termination + active = false; + } else { + // continue XEmbed with a new parent + server = newParent; + embedded.notifyStarted(); + } + } } boolean requestFocus() { if (active && embedded.focusAllowedFor()) { @@ -201,12 +235,16 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher } void registerAccelerator(AWTKeyStroke stroke, int id) { - long sym = getX11KeySym(stroke); - long mods = getX11Mods(stroke); - sendMessage(server, XEMBED_REGISTER_ACCELERATOR, id, sym, mods); + if (active) { + long sym = getX11KeySym(stroke); + long mods = getX11Mods(stroke); + sendMessage(server, XEMBED_REGISTER_ACCELERATOR, id, sym, mods); + } } void unregisterAccelerator(int id) { - sendMessage(server, XEMBED_UNREGISTER_ACCELERATOR, id, 0, 0); + if (active) { + sendMessage(server, XEMBED_UNREGISTER_ACCELERATOR, id, 0, 0); + } } long getX11KeySym(AWTKeyStroke stroke) { diff --git a/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java b/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java index 90eb7ff8ddc..892d7c94e99 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XEmbeddedFramePeer.java @@ -63,7 +63,10 @@ public class XEmbeddedFramePeer extends XFramePeer { void postInit(XCreateWindowParams params) { super.postInit(params); if (embedder != null) { - embedder.install(this); + // install X11 event dispatcher + embedder.setClient(this); + // reparent to XEmbed server + embedder.install(); } else if (getParentWindowHandle() != 0) { XToolkit.awtLock(); try { @@ -77,6 +80,15 @@ public class XEmbeddedFramePeer extends XFramePeer { } } + @Override + public void dispose() { + if (embedder != null) { + // uninstall X11 event dispatcher + embedder.setClient(null); + } + super.dispose(); + } + public void updateMinimumSize() { } @@ -249,6 +261,14 @@ public class XEmbeddedFramePeer extends XFramePeer { // XEmbed. updateDropTarget(); } + void notifyStopped() { + if (embedder != null && embedder.isActive()) { + for (int i = strokes.size() - 1; i >= 0; i--) { + embedder.unregisterAccelerator(i); + } + } + } + long getFocusTargetWindow() { return getWindow(); } From 9330abadeaef38e2ed74c6f97f7c933250ae2edc Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Mon, 22 Dec 2008 17:42:49 +0300 Subject: [PATCH 033/199] 4864117: RFE: Make XMLDecoder API more reusable Reviewed-by: peterz, loneid --- .../classes/com/sun/beans/ObjectHandler.java | 479 ------------------ .../beans/decoder/AccessorElementHandler.java | 105 ++++ .../beans/decoder/ArrayElementHandler.java | 133 +++++ .../beans/decoder/BooleanElementHandler.java | 69 +++ .../sun/beans/decoder/ByteElementHandler.java | 63 +++ .../sun/beans/decoder/CharElementHandler.java | 92 ++++ .../beans/decoder/ClassElementHandler.java | 62 +++ .../sun/beans/decoder/DocumentHandler.java | 389 ++++++++++++++ .../beans/decoder/DoubleElementHandler.java | 63 +++ .../com/sun/beans/decoder/ElementHandler.java | 224 ++++++++ .../beans/decoder/FalseElementHandler.java | 56 ++ .../beans/decoder/FieldElementHandler.java | 189 +++++++ .../beans/decoder/FloatElementHandler.java | 63 +++ .../sun/beans/decoder/IntElementHandler.java | 63 +++ .../sun/beans/decoder/JavaElementHandler.java | 151 ++++++ .../sun/beans/decoder/LongElementHandler.java | 63 +++ .../beans/decoder/MethodElementHandler.java | 109 ++++ .../sun/beans/decoder/NewElementHandler.java | 205 ++++++++ .../sun/beans/decoder/NullElementHandler.java | 76 +++ .../beans/decoder/ObjectElementHandler.java | 168 ++++++ .../beans/decoder/PropertyElementHandler.java | 287 +++++++++++ .../beans/decoder/ShortElementHandler.java | 63 +++ .../beans/decoder/StringElementHandler.java | 116 +++++ .../sun/beans/decoder/TrueElementHandler.java | 56 ++ .../com/sun/beans/decoder/ValueObject.java | 50 ++ .../sun/beans/decoder/ValueObjectImpl.java | 88 ++++ .../sun/beans/decoder/VarElementHandler.java | 82 +++ .../sun/beans/decoder/VoidElementHandler.java | 68 +++ .../com/sun/beans/finder/AbstractFinder.java | 213 ++++++++ .../com/sun/beans/finder/ClassFinder.java | 99 ++-- .../sun/beans/finder/ConstructorFinder.java | 127 +++++ .../com/sun/beans/finder/FieldFinder.java | 106 ++++ .../com/sun/beans/finder/MethodFinder.java | 205 ++++++++ .../sun/beans/finder/PrimitiveTypeMap.java | 29 +- .../sun/beans/finder/PrimitiveWrapperMap.java | 86 ++++ .../com/sun/beans/finder/Signature.java | 169 ++++++ .../share/classes/java/beans/MetaData.java | 4 +- .../classes/java/beans/ReflectionUtils.java | 13 +- .../share/classes/java/beans/XMLDecoder.java | 153 +++--- .../javax/swing/plaf/synth/SynthParser.java | 107 ++-- .../java/beans/XMLDecoder/Test4864117.java | 146 ++++++ .../java/beans/XMLDecoder/Test6341798.java | 4 +- .../beans/XMLDecoder/spec/AbstractTest.java | 76 +++ .../java/beans/XMLDecoder/spec/TestArray.java | 86 ++++ .../beans/XMLDecoder/spec/TestBoolean.java | 52 ++ .../java/beans/XMLDecoder/spec/TestByte.java | 56 ++ .../java/beans/XMLDecoder/spec/TestChar.java | 52 ++ .../java/beans/XMLDecoder/spec/TestClass.java | 61 +++ .../beans/XMLDecoder/spec/TestDouble.java | 58 +++ .../java/beans/XMLDecoder/spec/TestFalse.java | 48 ++ .../java/beans/XMLDecoder/spec/TestField.java | 74 +++ .../java/beans/XMLDecoder/spec/TestFloat.java | 58 +++ .../java/beans/XMLDecoder/spec/TestInt.java | 64 +++ .../java/beans/XMLDecoder/spec/TestJava.java | 63 +++ .../java/beans/XMLDecoder/spec/TestLong.java | 68 +++ .../beans/XMLDecoder/spec/TestMethod.java | 178 +++++++ .../java/beans/XMLDecoder/spec/TestNew.java | 90 ++++ .../java/beans/XMLDecoder/spec/TestNull.java | 48 ++ .../beans/XMLDecoder/spec/TestObject.java | 84 +++ .../beans/XMLDecoder/spec/TestProperty.java | 88 ++++ .../java/beans/XMLDecoder/spec/TestShort.java | 60 +++ .../beans/XMLDecoder/spec/TestString.java | 60 +++ .../java/beans/XMLDecoder/spec/TestTrue.java | 48 ++ .../java/beans/XMLDecoder/spec/TestVar.java | 54 ++ 64 files changed, 5946 insertions(+), 673 deletions(-) delete mode 100644 jdk/src/share/classes/com/sun/beans/ObjectHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/AccessorElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/BooleanElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ByteElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/CharElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ClassElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/DoubleElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/FalseElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/FieldElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/FloatElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/IntElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/JavaElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/LongElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/NewElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/NullElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ObjectElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ShortElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/StringElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/TrueElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ValueObject.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/ValueObjectImpl.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/VarElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/decoder/VoidElementHandler.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/AbstractFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/PrimitiveWrapperMap.java create mode 100644 jdk/src/share/classes/com/sun/beans/finder/Signature.java create mode 100644 jdk/test/java/beans/XMLDecoder/Test4864117.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/AbstractTest.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestArray.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestBoolean.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestByte.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestChar.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestClass.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestDouble.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestFalse.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestField.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestFloat.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestInt.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestJava.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestLong.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestMethod.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestNew.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestNull.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestObject.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestProperty.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestShort.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestString.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestTrue.java create mode 100644 jdk/test/java/beans/XMLDecoder/spec/TestVar.java diff --git a/jdk/src/share/classes/com/sun/beans/ObjectHandler.java b/jdk/src/share/classes/com/sun/beans/ObjectHandler.java deleted file mode 100644 index 6daeab953a2..00000000000 --- a/jdk/src/share/classes/com/sun/beans/ObjectHandler.java +++ /dev/null @@ -1,479 +0,0 @@ -/* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -package com.sun.beans; - -import com.sun.beans.finder.ClassFinder; - -import java.beans.*; -import java.util.*; - -import org.xml.sax.*; - -import static java.util.Locale.ENGLISH; - -/** - * WARNING: This class is an implementation detail and only meant - * for use within the core platform. You should NOT depend upon it! This - * API may change drastically between dot dot release, and it may even be - * removed. - * - * @see java.beans.XMLEncoder - * @see java.io.ObjectInputStream - * - * @since 1.4 - * - * @author Philip Milne - */ -public class ObjectHandler extends HandlerBase { - - public static Class typeNameToClass(String typeName) { - typeName = typeName.intern(); - if (typeName == "boolean") return Boolean.class; - if (typeName == "byte") return Byte.class; - if (typeName == "char") return Character.class; - if (typeName == "short") return Short.class; - if (typeName == "int") return Integer.class; - if (typeName == "long") return Long.class; - if (typeName == "float") return Float.class; - if (typeName == "double") return Double.class; - if (typeName == "void") return Void.class; - return null; - } - - public static Class typeNameToPrimitiveClass(String typeName) { - typeName = typeName.intern(); - if (typeName == "boolean") return boolean.class; - if (typeName == "byte") return byte.class; - if (typeName == "char") return char.class; - if (typeName == "short") return short.class; - if (typeName == "int") return int.class; - if (typeName == "long") return long.class; - if (typeName == "float") return float.class; - if (typeName == "double") return double.class; - if (typeName == "void") return void.class; - return null; - } - - /** - * Returns the Class object associated with - * the class or interface with the given string name, - * using the default class loader. - * - * @param name fully qualified name of the desired class - * @param cl class loader from which the class must be loaded - * @return class object representing the desired class - * - * @exception ClassNotFoundException if the class cannot be located - * by the specified class loader - * - * @deprecated As of JDK version 7, replaced by - * {@link ClassFinder#resolveClass(String)}. - */ - @Deprecated - public static Class classForName(String name) throws ClassNotFoundException { - return ClassFinder.resolveClass(name); - } - - /** - * Returns the Class object associated with - * the class or interface with the given string name, - * using the given class loader. - * - * @param name fully qualified name of the desired class - * @param cl class loader from which the class must be loaded - * @return class object representing the desired class - * - * @exception ClassNotFoundException if the class cannot be located - * by the specified class loader - * - * @deprecated As of JDK version 7, replaced by - * {@link ClassFinder#resolveClass(String,ClassLoader)}. - */ - @Deprecated - public static Class classForName(String name, ClassLoader cl) - throws ClassNotFoundException { - return ClassFinder.resolveClass(name, cl); - } - - private Hashtable environment; - private Vector expStack; - private StringBuffer chars; - private XMLDecoder is; - private ClassLoader ldr; - private int itemsRead = 0; - private boolean isString; - - public ObjectHandler() { - environment = new Hashtable(); - expStack = new Vector(); - chars = new StringBuffer(); - } - - public ObjectHandler(XMLDecoder is) { - this(); - this.is = is; - } - - /* loader can be null */ - public ObjectHandler(XMLDecoder is, ClassLoader loader) { - this(is); - this.ldr = loader; - } - - - public void reset() { - expStack.clear(); - chars.setLength(0); - MutableExpression e = new MutableExpression(); - e.setTarget(classForName2("java.lang.Object")); - e.setMethodName("null"); - expStack.add(e); - } - - private Object getValue(Expression exp) { - try { - return exp.getValue(); - } - catch (Exception e) { - if (is != null) { - is.getExceptionListener().exceptionThrown(e); - } - return null; - } - } - - private void addArg(Object arg) { - lastExp().addArg(arg); - } - - private Object pop(Vector v) { - int last = v.size()-1; - Object result = v.get(last); - v.remove(last); - return result; - } - - private Object eval() { - return getValue(lastExp()); - } - - private MutableExpression lastExp() { - return (MutableExpression)expStack.lastElement(); - } - - public Object dequeueResult() { - Object[] results = lastExp().getArguments(); - return results[itemsRead++]; - } - - private boolean isPrimitive(String name) { - return name != "void" && typeNameToClass(name) != null; - } - - private void simulateException(String message) { - Exception e = new Exception(message); - e.fillInStackTrace(); - if (is != null) { - is.getExceptionListener().exceptionThrown(e); - } - } - - private Class classForName2(String name) { - try { - return ClassFinder.resolveClass(name, this.ldr); - } - catch (ClassNotFoundException e) { - if (is != null) { - is.getExceptionListener().exceptionThrown(e); - } - } - return null; - } - - private HashMap getAttributes(AttributeList attrs) { - HashMap attributes = new HashMap(); - if (attrs != null && attrs.getLength() > 0) { - for(int i = 0; i < attrs.getLength(); i++) { - attributes.put(attrs.getName(i), attrs.getValue(i)); - } - } - return attributes; - } - - public void startElement(String name, AttributeList attrs) throws SAXException { - name = name.intern(); // Xerces parser does not supply unique tag names. - if (this.isString) { - parseCharCode(name, getAttributes(attrs)); - return; - } - chars.setLength(0); - - HashMap attributes = getAttributes(attrs); - MutableExpression e = new MutableExpression(); - - // Target - String className = (String)attributes.get("class"); - if (className != null) { - e.setTarget(classForName2(className)); - } - - // Property - Object property = attributes.get("property"); - String index = (String)attributes.get("index"); - if (index != null) { - property = new Integer(index); - e.addArg(property); - } - e.setProperty(property); - - // Method - String methodName = (String)attributes.get("method"); - if (methodName == null && property == null) { - methodName = "new"; - } - e.setMethodName(methodName); - - // Tags - if (name == "string") { - e.setTarget(String.class); - e.setMethodName("new"); - this.isString = true; - } - else if (isPrimitive(name)){ - Class wrapper = typeNameToClass(name); - e.setTarget(wrapper); - e.setMethodName("new"); - parseCharCode(name, attributes); - } - else if (name == "class") { - e.setTarget(Class.class); - e.setMethodName("forName"); - } - else if (name == "null") { - // Create an arbitrary expression that has a value of null - for - // consistency. - e.setTarget(Object.class); - e.setMethodName("getSuperclass"); - e.setValue(null); - } - else if (name == "void") { - if (e.getTarget() == null) { // this check is for "void class="foo" method= ..." - e.setTarget(eval()); - } - } - else if (name == "array") { - // The class attribute means sub-type for arrays. - String subtypeName = (String)attributes.get("class"); - Class subtype = (subtypeName == null) ? Object.class : classForName2(subtypeName); - String length = (String)attributes.get("length"); - if (length != null) { - e.setTarget(java.lang.reflect.Array.class); - e.addArg(subtype); - e.addArg(new Integer(length)); - } - else { - Class arrayClass = java.lang.reflect.Array.newInstance(subtype, 0).getClass(); - e.setTarget(arrayClass); - } - } - else if (name == "java") { - e.setValue(is); // The outermost scope is the stream itself. - } - else if (name == "object") { - } - else { - simulateException("Unrecognized opening tag: " + name + " " + attrsToString(attrs)); - return; - } - - // ids - String idName = (String)attributes.get("id"); - if (idName != null) { - environment.put(idName, e); - } - - // idrefs - String idrefName = (String)attributes.get("idref"); - if (idrefName != null) { - e.setValue(lookup(idrefName)); - } - - // fields - String fieldName = (String)attributes.get("field"); - if (fieldName != null) { - e.setValue(getFieldValue(e.getTarget(), fieldName)); - } - expStack.add(e); - } - - private Object getFieldValue(Object target, String fieldName) { - try { - Class type = target.getClass(); - if (type == Class.class) { - type = (Class)target; - } - java.lang.reflect.Field f = sun.reflect.misc.FieldUtil.getField(type, fieldName); - return f.get(target); - } - catch (Exception e) { - if (is != null) { - is.getExceptionListener().exceptionThrown(e); - } - return null; - } - } - - private String attrsToString(AttributeList attrs) { - StringBuffer b = new StringBuffer(); - for (int i = 0; i < attrs.getLength (); i++) { - b.append(attrs.getName(i)+"=\""+attrs.getValue(i)+"\" "); - } - return b.toString(); - } - - public void characters(char buf [], int offset, int len) throws SAXException { - chars.append(new String(buf, offset, len)); - } - - private void parseCharCode(String name, Map map) { - if (name == "char") { - String value = (String) map.get("code"); - if (value != null) { - int code = Integer.decode(value); - for (char ch : Character.toChars(code)) { - this.chars.append(ch); - } - } - } - } - - public Object lookup(String s) { - Expression e = (Expression)environment.get(s); - if (e == null) { - simulateException("Unbound variable: " + s); - } - return getValue(e); - } - - public void register(String id, Object value) { - Expression e = new MutableExpression(); - e.setValue(value); - environment.put(id, e); - } - - public void endElement(String name) throws SAXException { - name = name.intern(); // Xerces parser does not supply unique tag names. - if (name == "string") { - this.isString = false; - } else if (this.isString) { - return; - } - if (name == "java") { - return; - } - if (isPrimitive(name) || name == "string" || name == "class") { - addArg(chars.toString()); - } - if (name == "object" || name == "array" || name == "void" || - isPrimitive(name) || name == "string" || name == "class" || - name == "null") { - Expression e = (Expression)pop(expStack); - Object value = getValue(e); - if (name != "void") { - addArg(value); - } - } - else { - simulateException("Unrecognized closing tag: " + name); - } - } -} - - -class MutableExpression extends Expression { - private Object target; - private String methodName; - - private Object property; - private Vector argV = new Vector(); - - private String capitalize(String propertyName) { - if (propertyName.length() == 0) { - return propertyName; - } - return propertyName.substring(0, 1).toUpperCase(ENGLISH) + propertyName.substring(1); - } - - public MutableExpression() { - super(null, null, null); - } - - public Object[] getArguments() { - return argV.toArray(); - } - - public String getMethodName() { - if (property == null) { - return methodName; - } - int setterArgs = (property instanceof String) ? 1 : 2; - String methodName = (argV.size() == setterArgs) ? "set" : "get"; - if (property instanceof String) { - return methodName + capitalize((String)property); - } - else { - return methodName; - } - } - - public void addArg(Object arg) { - argV.add(arg); - } - - public void setTarget(Object target) { - this.target = target; - } - - public Object getTarget() { - return target; - } - - public void setMethodName(String methodName) { - this.methodName = methodName; - } - - public void setProperty(Object property) { - this.property = property; - } - - public void setValue(Object value) { - super.setValue(value); - } - - public Object getValue() throws Exception { - return super.getValue(); - } -} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/AccessorElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/AccessorElementHandler.java new file mode 100644 index 00000000000..d34fce45635 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/AccessorElementHandler.java @@ -0,0 +1,105 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This is base class that simplifies access to entities (fields or properties). + * The {@code name} attribute specifies the name of the accessible entity. + * The element defines getter if it contains no argument + * or setter if it contains one argument. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +abstract class AccessorElementHandler extends ElementHandler { + private String name; + private ValueObject value; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
name + *
the name of the accessible entity + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("name")) { // NON-NLS: the attribute name + this.name = value; + } else { + super.addAttribute(name, value); + } + } + + /** + * Adds the argument that is used to set the value of this element. + * + * @param argument the value of the element that contained in this one + */ + @Override + protected final void addArgument(Object argument) { + if (this.value != null) { + throw new IllegalStateException("Could not add argument to evaluated element"); + } + setValue(this.name, argument); + this.value = ValueObjectImpl.VOID; + } + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + @Override + protected final ValueObject getValueObject() { + if (this.value == null) { + this.value = ValueObjectImpl.create(getValue(this.name)); + } + return this.value; + } + + /** + * Returns the value of the entity with specified {@code name}. + * + * @param name the name of the accessible entity + * @return the value of the specified entity + */ + protected abstract Object getValue(String name); + + /** + * Sets the new value for the entity with specified {@code name}. + * + * @param name the name of the accessible entity + * @param value the new value for the specified entity + */ + protected abstract void setValue(String name, Object value); +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java new file mode 100644 index 00000000000..0bfcec6e46a --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ArrayElementHandler.java @@ -0,0 +1,133 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import java.lang.reflect.Array; + +/** + * This class is intended to handle <array> element, + * that is used to array creation. + * The {@code length} attribute specifies the length of the array. + * The {@code class} attribute specifies the elements type. + * The {@link Object} type is used by default. + * For example:
+ * <array length="10"/>
+ * is equivalent to {@code new Component[10]} in Java code. + * The {@code set} and {@code get} methods, + * as defined in the {@link java.util.List} interface, + * can be used as if they could be applied to array instances. + * The {@code index} attribute can thus be used with arrays. + * For example:
+ * <array length="3" class="java.lang.String">
+ *     <void index="1">
+ *         <string>Hello, world</string>
+ *     </void>
+ * </array>
+ * is equivalent to the following Java code:
+ * String[] s = new String[3];
+ * s[1] = "Hello, world";
+ * It is possible to omit the {@code length} attribute and + * specify the values directly, without using {@code void} tags. + * The length of the array is equal to the number of values specified. + * For example:
+ * <array id="array" class="int">
+ *     <int>123</int>
+ *     <int>456</int>
+ * </array>
+ * is equivalent to {@code int[] array = {123, 456}} in Java code. + *

The following atributes are supported: + *

+ *
length + *
the array length + *
class + *
the type of object for instantiation + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class ArrayElementHandler extends NewElementHandler { + private Integer length; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
length + *
the array length + *
class + *
the type of object for instantiation + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("length")) { // NON-NLS: the attribute name + this.length = Integer.valueOf(value); + } else { + super.addAttribute(name, value); + } + } + + /** + * Calculates the value of this element + * if the lentgh attribute is set. + */ + @Override + public void startElement() { + if (this.length != null) { + getValueObject(); + } + } + + /** + * Creates an instance of the array. + * + * @param type the base class + * @param args the array of arguments + * @return the value of this element + */ + @Override + protected ValueObject getValueObject(Class type, Object[] args) { + if (type == null) { + type = Object.class; + } + if (this.length != null) { + return ValueObjectImpl.create(Array.newInstance(type, this.length)); + } + Object array = Array.newInstance(type, args.length); + for (int i = 0; i < args.length; i++) { + Array.set(array, i, args[i]); + } + return ValueObjectImpl.create(array); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/BooleanElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/BooleanElementHandler.java new file mode 100644 index 00000000000..a5f401b5f49 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/BooleanElementHandler.java @@ -0,0 +1,69 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <boolean> element. + * This element specifies {@code boolean} values. + * The class {@link Boolean} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <boolean>true</boolean>
+ * is shortcut to
+ * <method name="valueOf" class="java.lang.Boolean">
+ *     <string>true</string>
+ * </method>
+ * which is equivalent to {@code Boolean.valueOf("true")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class BooleanElementHandler extends StringElementHandler { + + /** + * Creates {@code boolean} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code boolean} value + */ + @Override + public Object getValue(String argument) { + if (Boolean.TRUE.toString().equalsIgnoreCase(argument)) { + return Boolean.TRUE; + } + if (Boolean.FALSE.toString().equalsIgnoreCase(argument)) { + return Boolean.FALSE; + } + throw new IllegalArgumentException("Unsupported boolean argument: " + argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ByteElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/ByteElementHandler.java new file mode 100644 index 00000000000..d7d458f0104 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ByteElementHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <byte> element. + * This element specifies {@code byte} values. + * The class {@link Byte} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <byte>127</byte>
+ * is shortcut to
+ * <method name="decode" class="java.lang.Byte">
+ *     <string>127</string>
+ * </method>
+ * which is equivalent to {@code Byte.decode("127")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class ByteElementHandler extends StringElementHandler { + + /** + * Creates {@code byte} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code byte} value + */ + @Override + public Object getValue(String argument) { + return Byte.decode(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/CharElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/CharElementHandler.java new file mode 100644 index 00000000000..910b5a63f70 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/CharElementHandler.java @@ -0,0 +1,92 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <char> element. + * This element specifies {@code char} values. + * The class {@link Character} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <char>X</char>
+ * which is equivalent to {@code Character.valueOf('X')} in Java code. + *

The following atributes are supported: + *

+ *
code + *
this attribute specifies character code + *
id + *
the identifier of the variable that is intended to store the result + *
+ * The {@code code} attribute can be used for characters + * that are illegal in XML document, for example:
+ * <char code="0"/>
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class CharElementHandler extends StringElementHandler { + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
code + *
this attribute specifies character code + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("code")) { // NON-NLS: the attribute name + int code = Integer.decode(value); + for (char ch : Character.toChars(code)) { + addCharacter(ch); + } + } else { + super.addAttribute(name, value); + } + } + + /** + * Creates {@code char} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code char} value + */ + @Override + public Object getValue(String argument) { + if (argument.length() != 1) { + throw new IllegalArgumentException("Wrong characters count"); + } + return Character.valueOf(argument.charAt(0)); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ClassElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/ClassElementHandler.java new file mode 100644 index 00000000000..c6ca9856416 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ClassElementHandler.java @@ -0,0 +1,62 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <class> element. + * This element specifies {@link Class} values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <class>java.lang.Class</class>
+ * is shortcut to
+ * <method name="forName" class="java.lang.Class">
+ *     <string>java.lang.Class</string>
+ * </method>
+ * which is equivalent to {@code Class.forName("java.lang.Class")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class ClassElementHandler extends StringElementHandler { + + /** + * Creates class by the name from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code Class} value + */ + @Override + public Object getValue(String argument) { + return getOwner().findClass(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java new file mode 100644 index 00000000000..4c409a12a9b --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java @@ -0,0 +1,389 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import com.sun.beans.finder.ClassFinder; + +import java.beans.ExceptionListener; + +import java.io.IOException; + +import java.lang.ref.Reference; +import java.lang.ref.WeakReference; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/** + * The main class to parse JavaBeans XML archive. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + * + * @see ElementHandler + */ +public final class DocumentHandler extends DefaultHandler { + private final Map> handlers = new HashMap>(); + + private final Map environment = new HashMap(); + + private final List objects = new ArrayList(); + + private Reference loader; + private ExceptionListener listener; + private Object owner; + + private ElementHandler handler; + + /** + * Creates new instance of document handler. + */ + public DocumentHandler() { + setElementHandler("java", JavaElementHandler.class); // NON-NLS: the element name + setElementHandler("null", NullElementHandler.class); // NON-NLS: the element name + setElementHandler("array", ArrayElementHandler.class); // NON-NLS: the element name + setElementHandler("class", ClassElementHandler.class); // NON-NLS: the element name + setElementHandler("string", StringElementHandler.class); // NON-NLS: the element name + setElementHandler("object", ObjectElementHandler.class); // NON-NLS: the element name + + setElementHandler("void", VoidElementHandler.class); // NON-NLS: the element name + setElementHandler("char", CharElementHandler.class); // NON-NLS: the element name + setElementHandler("byte", ByteElementHandler.class); // NON-NLS: the element name + setElementHandler("short", ShortElementHandler.class); // NON-NLS: the element name + setElementHandler("int", IntElementHandler.class); // NON-NLS: the element name + setElementHandler("long", LongElementHandler.class); // NON-NLS: the element name + setElementHandler("float", FloatElementHandler.class); // NON-NLS: the element name + setElementHandler("double", DoubleElementHandler.class); // NON-NLS: the element name + setElementHandler("boolean", BooleanElementHandler.class); // NON-NLS: the element name + + // some handlers for new elements + setElementHandler("new", NewElementHandler.class); // NON-NLS: the element name + setElementHandler("var", VarElementHandler.class); // NON-NLS: the element name + setElementHandler("true", TrueElementHandler.class); // NON-NLS: the element name + setElementHandler("false", FalseElementHandler.class); // NON-NLS: the element name + setElementHandler("field", FieldElementHandler.class); // NON-NLS: the element name + setElementHandler("method", MethodElementHandler.class); // NON-NLS: the element name + setElementHandler("property", PropertyElementHandler.class); // NON-NLS: the element name + } + + /** + * Returns the class loader used to instantiate objects. + * If the class loader has not been explicitly set + * then {@code null} is returned. + * + * @return the class loader used to instantiate objects + */ + public ClassLoader getClassLoader() { + return (this.loader != null) + ? this.loader.get() + : null; + } + + /** + * Sets the class loader used to instantiate objects. + * If the class loader is not set + * then default class loader will be used. + * + * @param loader a classloader to use + */ + public void setClassLoader(ClassLoader loader) { + this.loader = new WeakReference(loader); + } + + /** + * Returns the exception listener for parsing. + * The exception listener is notified + * when handler catches recoverable exceptions. + * If the exception listener has not been explicitly set + * then default exception listener is returned. + * + * @return the exception listener for parsing + */ + public ExceptionListener getExceptionListener() { + return this.listener; + } + + /** + * Sets the exception listener for parsing. + * The exception listener is notified + * when handler catches recoverable exceptions. + * + * @param listener the exception listener for parsing + */ + public void setExceptionListener(ExceptionListener listener) { + this.listener = listener; + } + + /** + * Returns the owner of this document handler. + * + * @return the owner of this document handler + */ + public Object getOwner() { + return this.owner; + } + + /** + * Sets the owner of this document handler. + * + * @param owner the owner of this document handler + */ + public void setOwner(Object owner) { + this.owner = owner; + } + + /** + * Returns the handler for the element with specified name. + * + * @param name the name of the element + * @return the corresponding element handler + */ + public Class getElementHandler(String name) { + Class type = this.handlers.get(name); + if (type == null) { + throw new IllegalArgumentException("Unsupported element: " + name); + } + return type; + } + + /** + * Sets the handler for the element with specified name. + * + * @param name the name of the element + * @param handler the corresponding element handler + */ + public void setElementHandler(String name, Class handler) { + this.handlers.put(name, handler); + } + + /** + * Indicates whether the variable with specified identifier is defined. + * + * @param id the identifier + * @return @{code true} if the variable is defined; + * @{code false} otherwise + */ + public boolean hasVariable(String id) { + return this.environment.containsKey(id); + } + + /** + * Returns the value of the variable with specified identifier. + * + * @param id the identifier + * @return the value of the variable + */ + public Object getVariable(String id) { + if (!this.environment.containsKey(id)) { + throw new IllegalArgumentException("Unbound variable: " + id); + } + return this.environment.get(id); + } + + /** + * Sets new value of the variable with specified identifier. + * + * @param id the identifier + * @param value new value of the variable + */ + public void setVariable(String id, Object value) { + this.environment.put(id, value); + } + + /** + * Returns the array of readed objects. + * + * @return the array of readed objects + */ + public Object[] getObjects() { + return this.objects.toArray(); + } + + /** + * Adds the object to the list of readed objects. + * + * @param object the object that is readed from XML document + */ + void addObject(Object object) { + this.objects.add(object); + } + + /** + * Prepares this handler to read objects from XML document. + */ + @Override + public void startDocument() { + this.objects.clear(); + this.handler = null; + } + + /** + * Parses opening tag of XML element + * using corresponding element handler. + * + * @param uri the namespace URI, or the empty string + * if the element has no namespace URI or + * if namespace processing is not being performed + * @param localName the local name (without prefix), or the empty string + * if namespace processing is not being performed + * @param qName the qualified name (with prefix), or the empty string + * if qualified names are not available + * @param attributes the attributes attached to the element + */ + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + ElementHandler parent = this.handler; + try { + this.handler = getElementHandler(qName).newInstance(); + this.handler.setOwner(this); + this.handler.setParent(parent); + } + catch (Exception exception) { + throw new SAXException(exception); + } + for (int i = 0; i < attributes.getLength(); i++) + try { + String name = attributes.getQName(i); + String value = attributes.getValue(i); + this.handler.addAttribute(name, value); + } + catch (RuntimeException exception) { + handleException(exception); + } + + this.handler.startElement(); + } + + /** + * Parses closing tag of XML element + * using corresponding element handler. + * + * @param uri the namespace URI, or the empty string + * if the element has no namespace URI or + * if namespace processing is not being performed + * @param localName the local name (without prefix), or the empty string + * if namespace processing is not being performed + * @param qName the qualified name (with prefix), or the empty string + * if qualified names are not available + */ + @Override + public void endElement(String uri, String localName, String qName) { + try { + this.handler.endElement(); + } + catch (RuntimeException exception) { + handleException(exception); + } + finally { + this.handler = this.handler.getParent(); + } + } + + /** + * Parses character data inside XML element. + * + * @param chars the array of characters + * @param start the start position in the character array + * @param length the number of characters to use + */ + @Override + public void characters(char[] chars, int start, int length) { + if (this.handler != null) { + try { + while (0 < length--) { + this.handler.addCharacter(chars[start++]); + } + } + catch (RuntimeException exception) { + handleException(exception); + } + } + } + + /** + * Handles an exception using current exception listener. + * + * @param exception an exception to handle + * @see #setExceptionListener + */ + public void handleException(Exception exception) { + if (this.listener == null) { + throw new IllegalStateException(exception); + } + this.listener.exceptionThrown(exception); + } + + /** + * Starts parsing of the specified input source. + * + * @param input the input source to parse + */ + public void parse(InputSource input) { + try { + SAXParserFactory.newInstance().newSAXParser().parse(input, this); + } + catch (ParserConfigurationException exception) { + handleException(exception); + } + catch (SAXException wrapper) { + Exception exception = wrapper.getException(); + if (exception == null) { + exception = wrapper; + } + handleException(exception); + } + catch (IOException exception) { + handleException(exception); + } + } + + /** + * Resolves class by name using current class loader. + * This method handles exception using current exception listener. + * + * @param name the name of the class + * @return the object that represents the class + */ + public Class findClass(String name) { + try { + return ClassFinder.resolveClass(name, getClassLoader()); + } + catch (ClassNotFoundException exception) { + handleException(exception); + return null; + } + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/DoubleElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/DoubleElementHandler.java new file mode 100644 index 00000000000..e0f58677627 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/DoubleElementHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <double> element. + * This element specifies {@code double} values. + * The class {@link Double} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <double>1.23e45</double>
+ * is shortcut to
+ * <method name="valueOf" class="java.lang.Double">
+ *     <string>1.23e45</string>
+ * </method>
+ * which is equivalent to {@code Double.valueOf("1.23e45")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class DoubleElementHandler extends StringElementHandler { + + /** + * Creates {@code double} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code double} value + */ + @Override + public Object getValue(String argument) { + return Double.valueOf(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/ElementHandler.java new file mode 100644 index 00000000000..ca85cd6ed08 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ElementHandler.java @@ -0,0 +1,224 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * The base class for element handlers. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + * + * @see DocumentHandler + */ +public abstract class ElementHandler { + private DocumentHandler owner; + private ElementHandler parent; + + private String id; + + /** + * Returns the document handler that creates this element handler. + * + * @return the owner document handler + */ + public final DocumentHandler getOwner() { + return this.owner; + } + + /** + * Sets the document handler that creates this element handler. + * The owner document handler should be set after instantiation. + * Such approach is used to simplify the extensibility. + * + * @param owner the owner document handler + * @see DocumentHandler#startElement + */ + final void setOwner(DocumentHandler owner) { + if (owner == null) { + throw new IllegalArgumentException("Every element should have owner"); + } + this.owner = owner; + } + + /** + * Returns the element handler that contains this one. + * + * @return the parent element handler + */ + public final ElementHandler getParent() { + return this.parent; + } + + /** + * Sets the element handler that contains this one. + * The parent element handler should be set after instantiation. + * Such approach is used to simplify the extensibility. + * + * @param parent the parent element handler + * @see DocumentHandler#startElement + */ + final void setParent(ElementHandler parent) { + this.parent = parent; + } + + /** + * Returns the value of the variable with specified identifier. + * + * @param id the identifier + * @return the value of the variable + */ + protected final Object getVariable(String id) { + if (id.equals(this.id)) { + ValueObject value = getValueObject(); + if (value.isVoid()) { + throw new IllegalStateException("The element does not return value"); + } + return value.getValue(); + } + return (this.parent != null) + ? this.parent.getVariable(id) + : this.owner.getVariable(id); + } + + /** + * Returns the value of the parent element. + * + * @return the value of the parent element + */ + protected Object getContextBean() { + if (this.parent != null) { + ValueObject value = this.parent.getValueObject(); + if (!value.isVoid()) { + return value.getValue(); + } + throw new IllegalStateException("The outer element does not return value"); + } else { + Object value = this.owner.getOwner(); + if (value != null) { + return value; + } + throw new IllegalStateException("The topmost element does not have context"); + } + } + + /** + * Parses attributes of the element. + * By default, the following atribute is supported: + *
+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + public void addAttribute(String name, String value) { + if (name.equals("id")) { // NON-NLS: the attribute name + this.id = value; + } else { + throw new IllegalArgumentException("Unsupported attribute: " + name); + } + } + + /** + * This method is called before parsing of the element's body. + * All attributes are parsed at this point. + * By default, do nothing. + */ + public void startElement() { + } + + /** + * This method is called after parsing of the element's body. + * By default, it calculates the value of this element. + * The following tasks are executing for any non-void value: + *
    + *
  1. If the {@code id} attribute is set + * the value of the variable with the specified identifier + * is set to the value of this element.
  2. + *
  3. This element is used as an argument of parent element if it is possible.
  4. + *
+ * + * @see #isArgument + */ + public void endElement() { + // do nothing if no value returned + ValueObject value = getValueObject(); + if (!value.isVoid()) { + if (this.id != null) { + this.owner.setVariable(this.id, value.getValue()); + } + if (isArgument()) { + if (this.parent != null) { + this.parent.addArgument(value.getValue()); + } else { + this.owner.addObject(value.getValue()); + } + } + } + } + + /** + * Adds the character that contained in this element. + * By default, only whitespaces are acceptable. + * + * @param ch the character + */ + public void addCharacter(char ch) { + if ((ch != ' ') && (ch != '\n') && (ch != '\t') && (ch != '\r')) { + throw new IllegalStateException("Illegal character with code " + (int) ch); + } + } + + /** + * Adds the argument that is used to calculate the value of this element. + * By default, no arguments are acceptable. + * + * @param argument the value of the element that contained in this one + */ + protected void addArgument(Object argument) { + throw new IllegalStateException("Could not add argument to simple element"); + } + + /** + * Tests whether the value of this element can be used + * as an argument of the element that contained in this one. + * + * @return {@code true} if the value of this element can be used + * as an argument of the element that contained in this one, + * {@code false} otherwise + */ + protected boolean isArgument() { + return this.id == null; + } + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + protected abstract ValueObject getValueObject(); +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/FalseElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/FalseElementHandler.java new file mode 100644 index 00000000000..6e8d786aa14 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/FalseElementHandler.java @@ -0,0 +1,56 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <false> element. + * This element specifies {@code false} value. + * It should not contain body or inner elements. + * For example:
+ * <false/>
+ * is equivalent to {@code false} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class FalseElementHandler extends NullElementHandler { + + /** + * Returns {@code Boolean.FALSE} + * as a value of <false> element. + * + * @return {@code Boolean.FALSE} by default + */ + @Override + public Object getValue() { + return Boolean.FALSE; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/FieldElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/FieldElementHandler.java new file mode 100644 index 00000000000..ac255dde7fd --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/FieldElementHandler.java @@ -0,0 +1,189 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import com.sun.beans.finder.FieldFinder; + +import java.lang.reflect.Field; + +/** + * This class is intended to handle <field> element. + * This element simplifies access to the fields. + * If the {@code class} attribute is specified + * this element accesses static field of specified class. + * This element defines getter if it contains no argument. + * It returns the value of the field in this case. + * For example:
+ * <field name="TYPE" class="java.lang.Long"/>
+ * is equivalent to {@code Long.TYPE} in Java code. + * This element defines setter if it contains one argument. + * It does not return the value of the field in this case. + * For example:
+ * <field name="id"><int>0</int></field>
+ * is equivalent to {@code id = 0} in Java code. + *

The following atributes are supported: + *

+ *
name + *
the field name + *
class + *
the type is used for static fields only + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class FieldElementHandler extends AccessorElementHandler { + private Class type; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
name + *
the field name + *
class + *
the type is used for static fields only + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("class")) { // NON-NLS: the attribute name + this.type = getOwner().findClass(value); + } else { + super.addAttribute(name, value); + } + } + + /** + * Tests whether the value of this element can be used + * as an argument of the element that contained in this one. + * + * @return {@code true} if the value of this element should be used + * as an argument of the element that contained in this one, + * {@code false} otherwise + */ + @Override + protected boolean isArgument() { + return super.isArgument() && (this.type != null); // only static accessor can be used an argument + } + + /** + * Returns the context of the field. + * The context of the static field is the class object. + * The context of the non-static field is the value of the parent element. + * + * @return the context of the field + */ + @Override + protected Object getContextBean() { + return (this.type != null) + ? this.type + : super.getContextBean(); + } + + /** + * Returns the value of the field with specified {@code name}. + * + * @param name the name of the field + * @return the value of the specified field + */ + @Override + protected Object getValue(String name) { + try { + return getFieldValue(getContextBean(), name); + } + catch (Exception exception) { + getOwner().handleException(exception); + } + return null; + } + + /** + * Sets the new value for the field with specified {@code name}. + * + * @param name the name of the field + * @param value the new value for the specified field + */ + @Override + protected void setValue(String name, Object value) { + try { + setFieldValue(getContextBean(), name, value); + } + catch (Exception exception) { + getOwner().handleException(exception); + } + } + + /** + * Performs the search of the field with specified {@code name} + * in specified context and returns its value. + * + * @param bean the context bean that contains field + * @param name the name of the field + * @return the value of the field + * @throws IllegalAccessException if the field is not accesible + * @throws NoSuchFieldException if the field is not found + */ + static Object getFieldValue(Object bean, String name) throws IllegalAccessException, NoSuchFieldException { + return findField(bean, name).get(bean); + } + + /** + * Performs the search of the field with specified {@code name} + * in specified context and updates its value. + * + * @param bean the context bean that contains field + * @param name the name of the field + * @param value the new value for the field + * @throws IllegalAccessException if the field is not accesible + * @throws NoSuchFieldException if the field is not found + */ + private static void setFieldValue(Object bean, String name, Object value) throws IllegalAccessException, NoSuchFieldException { + findField(bean, name).set(bean, value); + } + + /** + * Performs the search of the field + * with specified {@code name} in specified context. + * + * @param bean the context bean that contains field + * @param name the name of the field + * @return field object that represents found field + * @throws NoSuchFieldException if the field is not found + */ + private static Field findField(Object bean, String name) throws NoSuchFieldException { + return (bean instanceof Class) + ? FieldFinder.findStaticField((Class) bean, name) + : FieldFinder.findField(bean.getClass(), name); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/FloatElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/FloatElementHandler.java new file mode 100644 index 00000000000..08311b49f29 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/FloatElementHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <float> element. + * This element specifies {@code float} values. + * The class {@link Float} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <float>-1.23</float>
+ * is shortcut to
+ * <method name="valueOf" class="java.lang.Float">
+ *     <string>-1.23</string>
+ * </method>
+ * which is equivalent to {@code Float.valueOf("-1.23")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class FloatElementHandler extends StringElementHandler { + + /** + * Creates {@code float} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code float} value + */ + @Override + public Object getValue(String argument) { + return Float.valueOf(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/IntElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/IntElementHandler.java new file mode 100644 index 00000000000..ec5063fcd8e --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/IntElementHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <int> element. + * This element specifies {@code int} values. + * The class {@link Integer} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <int>-1</int>
+ * is shortcut to
+ * <method name="decode" class="java.lang.Integer">
+ *     <string>-1</string>
+ * </method>
+ * which is equivalent to {@code Integer.decode("-1")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class IntElementHandler extends StringElementHandler { + + /** + * Creates {@code int} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code int} value + */ + @Override + public Object getValue(String argument) { + return Integer.decode(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/JavaElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/JavaElementHandler.java new file mode 100644 index 00000000000..2d416a139fb --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/JavaElementHandler.java @@ -0,0 +1,151 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import java.beans.XMLDecoder; + +/** + * This class is intended to handle <java> element. + * Each element that appears in the body of this element + * is evaluated in the context of the decoder itself. + * Typically this outer context is used to retrieve the owner of the decoder, + * which can be set before reading the archive. + *

The following atributes are supported: + *

+ *
version + *
the Java version (not supported) + *
class + *
the type of preferable parser (not supported) + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @see DocumentHandler#getOwner + * @see DocumentHandler#setOwner + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class JavaElementHandler extends ElementHandler { + private Class type; + private ValueObject value; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
version + *
the Java version (not supported) + *
class + *
the type of preferable parser (not supported) + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("version")) { // NON-NLS: the attribute name + // unsupported attribute + } else if (name.equals("class")) { // NON-NLS: the attribute name + // check class for owner + this.type = getOwner().findClass(value); + } else { + super.addAttribute(name, value); + } + } + + /** + * Adds the argument to the list of readed objects. + * + * @param argument the value of the element that contained in this one + */ + @Override + protected void addArgument(Object argument) { + getOwner().addObject(argument); + } + + /** + * Tests whether the value of this element can be used + * as an argument of the element that contained in this one. + * + * @return {@code true} if the value of this element should be used + * as an argument of the element that contained in this one, + * {@code false} otherwise + */ + @Override + protected boolean isArgument() { + return false; // do not use owner as object + } + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + @Override + protected ValueObject getValueObject() { + if (this.value == null) { + this.value = ValueObjectImpl.create(getValue()); + } + return this.value; + } + + /** + * Returns the owner of the owner document handler + * as a value of <java> element. + * + * @return the owner of the owner document handler + */ + private Object getValue() { + Object owner = getOwner().getOwner(); + if ((this.type == null) || isValid(owner)) { + return owner; + } + if (owner instanceof XMLDecoder) { + XMLDecoder decoder = (XMLDecoder) owner; + owner = decoder.getOwner(); + if (isValid(owner)) { + return owner; + } + } + throw new IllegalStateException("Unexpected owner class: " + owner.getClass().getName()); + } + + /** + * Validates the owner of the <java> element. + * The owner is valid if it is {@code null} or an instance + * of the class specified by the {@code class} attribute. + * + * @param owner the owner of the <java> element + * @return {@code true} if the {@code owner} is valid; + * {@code false} otherwise + */ + private boolean isValid(Object owner) { + return (owner == null) || this.type.isInstance(owner); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/LongElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/LongElementHandler.java new file mode 100644 index 00000000000..a26f2f57fb6 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/LongElementHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <long> element. + * This element specifies {@code long} values. + * The class {@link Long} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <long>0xFFFF</long>
+ * is shortcut to
+ * <method name="decode" class="java.lang.Long">
+ *     <string>0xFFFF</string>
+ * </method>
+ * which is equivalent to {@code Long.decode("0xFFFF")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class LongElementHandler extends StringElementHandler { + + /** + * Creates {@code long} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code long} value + */ + @Override + public Object getValue(String argument) { + return Long.decode(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java new file mode 100644 index 00000000000..34d030c90b3 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/MethodElementHandler.java @@ -0,0 +1,109 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import com.sun.beans.finder.MethodFinder; + +import java.lang.reflect.Method; + +/** + * This class is intended to handle <method> element. + * It describes invocation of the method. + * The {@code name} attribute denotes + * the name of the method to invoke. + * If the {@code class} attribute is specified + * this element invokes static method of specified class. + * The inner elements specifies the arguments of the method. + * For example:
+ * <method name="valueOf" class="java.lang.Long">
+ *     <string>10</string>
+ * </method>
+ * is equivalent to {@code Long.valueOf("10")} in Java code. + *

The following atributes are supported: + *

+ *
name + *
the method name + *
class + *
the type of object for instantiation + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class MethodElementHandler extends NewElementHandler { + private String name; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
name + *
the method name + *
class + *
the type of object for instantiation + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("name")) { // NON-NLS: the attribute name + this.name = value; + } else { + super.addAttribute(name, value); + } + } + + /** + * Returns the result of method execution. + * + * @param type the base class + * @param args the array of arguments + * @return the value of this element + * @throws Exception if calculation is failed + */ + @Override + protected ValueObject getValueObject(Class type, Object[] args) throws Exception { + Object bean = getContextBean(); + Class[] types = getArgumentTypes(args); + Method method = (type != null) + ? MethodFinder.findStaticMethod(type, this.name, types) + : MethodFinder.findMethod(bean.getClass(), this.name, types); + + if (method.isVarArgs()) { + args = getArguments(args, method.getParameterTypes()); + } + Object value = method.invoke(bean, args); + return method.getReturnType().equals(void.class) + ? ValueObjectImpl.VOID + : ValueObjectImpl.create(value); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/NewElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/NewElementHandler.java new file mode 100644 index 00000000000..fc7debfc500 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/NewElementHandler.java @@ -0,0 +1,205 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import com.sun.beans.finder.ConstructorFinder; + +import java.lang.reflect.Array; +import java.lang.reflect.Constructor; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is intended to handle <new> element. + * It describes instantiation of the object. + * The {@code class} attribute denotes + * the name of the class to instantiate. + * The inner elements specifies the arguments of the constructor. + * For example:
+ * <new class="java.lang.Long">
+ *     <string>10</string>
+ * </new>
+ * is equivalent to {@code new Long("10")} in Java code. + *

The following atributes are supported: + *

+ *
class + *
the type of object for instantiation + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +class NewElementHandler extends ElementHandler { + private List arguments = new ArrayList(); + private ValueObject value = ValueObjectImpl.VOID; + + private Class type; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
class + *
the type of object for instantiation + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("class")) { // NON-NLS: the attribute name + this.type = getOwner().findClass(value); + } else { + super.addAttribute(name, value); + } + } + + /** + * Adds the argument to the list of arguments + * that is used to calculate the value of this element. + * + * @param argument the value of the element that contained in this one + */ + @Override + protected final void addArgument(Object argument) { + if (this.arguments == null) { + throw new IllegalStateException("Could not add argument to evaluated element"); + } + this.arguments.add(argument); + } + + /** + * Returns the context of the method. + * The context of the static method is the class object. + * The context of the non-static method is the value of the parent element. + * + * @return the context of the method + */ + @Override + protected final Object getContextBean() { + return (this.type != null) + ? this.type + : super.getContextBean(); + } + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + @Override + protected final ValueObject getValueObject() { + if (this.arguments != null) { + try { + this.value = getValueObject(this.type, this.arguments.toArray()); + } + catch (Exception exception) { + getOwner().handleException(exception); + } + finally { + this.arguments = null; + } + } + return this.value; + } + + /** + * Calculates the value of this element + * using the base class and the array of arguments. + * By default, it creates an instance of the base class. + * This method should be overridden in those handlers + * that extend behavior of this element. + * + * @param type the base class + * @param args the array of arguments + * @return the value of this element + * @throws Exception if calculation is failed + */ + ValueObject getValueObject(Class type, Object[] args) throws Exception { + if (type == null) { + throw new IllegalArgumentException("Class name is not set"); + } + Class[] types = getArgumentTypes(args); + Constructor constructor = ConstructorFinder.findConstructor(type, types); + if (constructor.isVarArgs()) { + args = getArguments(args, constructor.getParameterTypes()); + } + return ValueObjectImpl.create(constructor.newInstance(args)); + } + + /** + * Converts the array of arguments to the array of corresponding classes. + * If argument is {@code null} the class is {@code null} too. + * + * @param arguments the array of arguments + * @return the array of corresponding classes + */ + static Class[] getArgumentTypes(Object[] arguments) { + Class[] types = new Class[arguments.length]; + for (int i = 0; i < arguments.length; i++) { + if (arguments[i] != null) { + types[i] = arguments[i].getClass(); + } + } + return types; + } + + /** + * Resolves variable arguments. + * + * @param arguments the array of arguments + * @param types the array of parameter types + * @return the resolved array of arguments + */ + static Object[] getArguments(Object[] arguments, Class[] types) { + int index = types.length - 1; + if (types.length == arguments.length) { + Object argument = arguments[index]; + if (argument == null) { + return arguments; + } + Class type = types[index]; + if (type.isAssignableFrom(argument.getClass())) { + return arguments; + } + } + int length = arguments.length - index; + Class type = types[index].getComponentType(); + Object array = Array.newInstance(type, length); + System.arraycopy(arguments, index, array, 0, length); + + Object[] args = new Object[types.length]; + System.arraycopy(arguments, 0, args, 0, index); + args[index] = array; + return args; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/NullElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/NullElementHandler.java new file mode 100644 index 00000000000..a3e2d699c39 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/NullElementHandler.java @@ -0,0 +1,76 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <null> element. + * This element specifies {@code null} value. + * It should not contain body or inner elements. + * For example:
+ * <null/>
+ * is equivalent to {@code null} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +class NullElementHandler extends ElementHandler implements ValueObject { + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + @Override + protected final ValueObject getValueObject() { + return this; + } + + /** + * Returns {@code null} + * as a value of <null> element. + * This method should be overridden in those handlers + * that extend behavior of this element. + * + * @return {@code null} by default + */ + public Object getValue() { + return null; + } + + /** + * Returns {@code void} state of this value object. + * + * @return {@code false} always + */ + public final boolean isVoid() { + return false; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ObjectElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/ObjectElementHandler.java new file mode 100644 index 00000000000..3ab5ddca942 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ObjectElementHandler.java @@ -0,0 +1,168 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import java.beans.Expression; + +import static java.util.Locale.ENGLISH; + +/** + * This class is intended to handle <object> element. + * This element looks like <void> element, + * but its value is always used as an argument for element + * that contains this one. + *

The following atributes are supported: + *

+ *
class + *
the type is used for static methods and fields + *
method + *
the method name + *
property + *
the property name + *
index + *
the property index + *
field + *
the field name + *
idref + *
the identifier to refer to the variable + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +class ObjectElementHandler extends NewElementHandler { + private String idref; + private String field; + private Integer index; + private String property; + private String method; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
class + *
the type is used for static methods and fields + *
method + *
the method name + *
property + *
the property name + *
index + *
the property index + *
field + *
the field name + *
idref + *
the identifier to refer to the variable + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public final void addAttribute(String name, String value) { + if (name.equals("idref")) { // NON-NLS: the attribute name + this.idref = value; + } else if (name.equals("field")) { // NON-NLS: the attribute name + this.field = value; + } else if (name.equals("index")) { // NON-NLS: the attribute name + this.index = Integer.valueOf(value); + addArgument(this.index); // hack for compatibility + } else if (name.equals("property")) { // NON-NLS: the attribute name + this.property = value; + } else if (name.equals("method")) { // NON-NLS: the attribute name + this.method = value; + } else { + super.addAttribute(name, value); + } + } + + /** + * Calculates the value of this element + * if the field attribute or the idref attribute is set. + */ + @Override + public final void startElement() { + if ((this.field != null) || (this.idref != null)) { + getValueObject(); + } + } + + /** + * Tests whether the value of this element can be used + * as an argument of the element that contained in this one. + * + * @return {@code true} if the value of this element can be used + * as an argument of the element that contained in this one, + * {@code false} otherwise + */ + @Override + protected boolean isArgument() { + return true; // hack for compatibility + } + + /** + * Creates the value of this element. + * + * @param type the base class + * @param args the array of arguments + * @return the value of this element + * @throws Exception if calculation is failed + */ + @Override + protected final ValueObject getValueObject(Class type, Object[] args) throws Exception { + if (this.field != null) { + return ValueObjectImpl.create(FieldElementHandler.getFieldValue(getContextBean(), this.field)); + } + if (this.idref != null) { + return ValueObjectImpl.create(getVariable(this.idref)); + } + Object bean = getContextBean(); + String name; + if (this.index != null) { + name = (args.length == 2) + ? PropertyElementHandler.SETTER + : PropertyElementHandler.GETTER; + } else if (this.property != null) { + name = (args.length == 1) + ? PropertyElementHandler.SETTER + : PropertyElementHandler.GETTER; + + if (0 < this.property.length()) { + name += this.property.substring(0, 1).toUpperCase(ENGLISH) + this.property.substring(1); + } + } else { + name = (this.method != null) && (0 < this.method.length()) + ? this.method + : "new"; // NON-NLS: the constructor marker + } + Expression expression = new Expression(bean, name, args); + return ValueObjectImpl.create(expression.getValue()); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java new file mode 100644 index 00000000000..dcc55062945 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/PropertyElementHandler.java @@ -0,0 +1,287 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +import com.sun.beans.finder.MethodFinder; + +import java.beans.IndexedPropertyDescriptor; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; + +import java.lang.reflect.Array; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +/** + * This class is intended to handle <property> element. + * This element simplifies access to the properties. + * If the {@code index} attribute is specified + * this element uses additional {@code int} parameter. + * If the {@code name} attribute is not specified + * this element uses method "get" as getter + * and method "set" as setter. + * This element defines getter if it contains no argument. + * It returns the value of the property in this case. + * For example:
+ * <property name="object" index="10"/>
+ * is shortcut to
+ * <method name="getObject">
+ *     <int>10</int>
+ * </method>
+ * which is equivalent to {@code getObject(10)} in Java code. + * This element defines setter if it contains one argument. + * It does not return the value of the property in this case. + * For example:
+ * <property><int>0</int></property>
+ * is shortcut to
+ * <method name="set">
+ *     <int>0</int>
+ * </method>
+ * which is equivalent to {@code set(0)} in Java code. + *

The following atributes are supported: + *

+ *
name + *
the property name + *
index + *
the property index + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class PropertyElementHandler extends AccessorElementHandler { + static final String GETTER = "get"; // NON-NLS: the getter prefix + static final String SETTER = "set"; // NON-NLS: the setter prefix + + private Integer index; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
name + *
the property name + *
index + *
the property index + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("index")) { // NON-NLS: the attribute name + this.index = Integer.valueOf(value); + } else { + super.addAttribute(name, value); + } + } + + /** + * Tests whether the value of this element can be used + * as an argument of the element that contained in this one. + * + * @return {@code true} if the value of this element should be used + * as an argument of the element that contained in this one, + * {@code false} otherwise + */ + @Override + protected boolean isArgument() { + return false; // non-static accessor cannot be used an argument + } + + /** + * Returns the value of the property with specified {@code name}. + * + * @param name the name of the property + * @return the value of the specified property + */ + @Override + protected Object getValue(String name) { + try { + return getPropertyValue(getContextBean(), name, this.index); + } + catch (Exception exception) { + getOwner().handleException(exception); + } + return null; + } + + /** + * Sets the new value for the property with specified {@code name}. + * + * @param name the name of the property + * @param value the new value for the specified property + */ + @Override + protected void setValue(String name, Object value) { + try { + setPropertyValue(getContextBean(), name, this.index, value); + } + catch (Exception exception) { + getOwner().handleException(exception); + } + } + + /** + * Performs the search of the getter for the property + * with specified {@code name} in specified class + * and returns value of the property. + * + * @param bean the context bean that contains property + * @param name the name of the property + * @param index the index of the indexed property + * @return the value of the property + * @throws IllegalAccessException if the property is not accesible + * @throws IntrospectionException if the bean introspection is failed + * @throws InvocationTargetException if the getter cannot be invoked + * @throws NoSuchMethodException if the getter is not found + */ + private static Object getPropertyValue(Object bean, String name, Integer index) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { + Class type = bean.getClass(); + if (index == null) { + return findGetter(type, name).invoke(bean); + } else if (type.isArray() && (name == null)) { + return Array.get(bean, index); + } else { + return findGetter(type, name, int.class).invoke(bean, index); + } + } + + /** + * Performs the search of the setter for the property + * with specified {@code name} in specified class + * and updates value of the property. + * + * @param bean the context bean that contains property + * @param name the name of the property + * @param index the index of the indexed property + * @param value the new value for the property + * @throws IllegalAccessException if the property is not accesible + * @throws IntrospectionException if the bean introspection is failed + * @throws InvocationTargetException if the setter cannot be invoked + * @throws NoSuchMethodException if the setter is not found + */ + private static void setPropertyValue(Object bean, String name, Integer index, Object value) throws IllegalAccessException, IntrospectionException, InvocationTargetException, NoSuchMethodException { + Class type = bean.getClass(); + Class param = (value != null) + ? value.getClass() + : null; + + if (index == null) { + findSetter(type, name, param).invoke(bean, value); + } else if (type.isArray() && (name == null)) { + Array.set(bean, index, value); + } else { + findSetter(type, name, int.class, param).invoke(bean, index, value); + } + } + + /** + * Performs the search of the getter for the property + * with specified {@code name} in specified class. + * + * @param type the class that contains method + * @param name the name of the property + * @param args the method arguments + * @return method object that represents found getter + * @throws IntrospectionException if the bean introspection is failed + * @throws NoSuchMethodException if method is not found + */ + private static Method findGetter(Class type, String name, Class...args) throws IntrospectionException, NoSuchMethodException { + if (name == null) { + return MethodFinder.findInstanceMethod(type, GETTER, args); + } + PropertyDescriptor pd = getProperty(type, name); + if (args.length == 0) { + Method method = pd.getReadMethod(); + if (method != null) { + return method; + } + } else if (pd instanceof IndexedPropertyDescriptor) { + IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; + Method method = ipd.getIndexedReadMethod(); + if (method != null) { + return method; + } + } + throw new IntrospectionException("Could not find getter for the " + name + " property"); + } + + /** + * Performs the search of the setter for the property + * with specified {@code name} in specified class. + * + * @param type the class that contains method + * @param name the name of the property + * @param args the method arguments + * @return method object that represents found setter + * @throws IntrospectionException if the bean introspection is failed + * @throws NoSuchMethodException if method is not found + */ + private static Method findSetter(Class type, String name, Class...args) throws IntrospectionException, NoSuchMethodException { + if (name == null) { + return MethodFinder.findInstanceMethod(type, SETTER, args); + } + PropertyDescriptor pd = getProperty(type, name); + if (args.length == 1) { + Method method = pd.getWriteMethod(); + if (method != null) { + return method; + } + } else if (pd instanceof IndexedPropertyDescriptor) { + IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; + Method method = ipd.getIndexedWriteMethod(); + if (method != null) { + return method; + } + } + throw new IntrospectionException("Could not find setter for the " + name + " property"); + } + + /** + * Performs the search of the descriptor for the property + * with specified {@code name} in specified class. + * + * @param type the class to introspect + * @param name the property name + * @return descriptor for the named property + * @throws IntrospectionException if property descriptor is not found + */ + private static PropertyDescriptor getProperty(Class type, String name) throws IntrospectionException { + for (PropertyDescriptor pd : Introspector.getBeanInfo(type).getPropertyDescriptors()) { + if (name.equals(pd.getName())) { + return pd; + } + } + throw new IntrospectionException("Could not find the " + name + " property descriptor"); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ShortElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/ShortElementHandler.java new file mode 100644 index 00000000000..5f91e254424 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ShortElementHandler.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <short> element. + * This element specifies {@code short} values. + * The class {@link Short} is used as wrapper for these values. + * The result value is created from text of the body of this element. + * The body parsing is described in the class {@link StringElementHandler}. + * For example:
+ * <short>200</short>
+ * is shortcut to
+ * <method name="decode" class="java.lang.Short">
+ *     <string>200</string>
+ * </method>
+ * which is equivalent to {@code Short.decode("200")} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class ShortElementHandler extends StringElementHandler { + + /** + * Creates {@code short} value from + * the text of the body of this element. + * + * @param argument the text of the body + * @return evaluated {@code short} value + */ + @Override + public Object getValue(String argument) { + return Short.decode(argument); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/StringElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/StringElementHandler.java new file mode 100644 index 00000000000..6075f436aa0 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/StringElementHandler.java @@ -0,0 +1,116 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <string> element. + * This element specifies {@link String} values. + * The result value is created from text of the body of this element. + * For example:
+ * <string>description</string>
+ * is equivalent to {@code "description"} in Java code. + * The value of inner element is calculated + * before adding to the string using {@link String#valueOf(Object)}. + * Note that all characters are used including whitespaces (' ', '\t', '\n', '\r'). + * So the value of the element
+ * <string><true></string>
+ * is not equal to the value of the element
+ * <string>
+ *     <true>
+ * </string>
+ *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public class StringElementHandler extends ElementHandler { + private StringBuilder sb = new StringBuilder(); + private ValueObject value = ValueObjectImpl.NULL; + + /** + * Adds the character that contained in this element. + * + * @param ch the character + */ + @Override + public final void addCharacter(char ch) { + if (this.sb == null) { + throw new IllegalStateException("Could not add chararcter to evaluated string element"); + } + this.sb.append(ch); + } + + /** + * Adds the string value of the argument to the string value of this element. + * + * @param argument the value of the element that contained in this one + */ + @Override + protected final void addArgument(Object argument) { + if (this.sb == null) { + throw new IllegalStateException("Could not add argument to evaluated string element"); + } + this.sb.append(argument); + } + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + @Override + protected final ValueObject getValueObject() { + if (this.sb != null) { + try { + this.value = ValueObjectImpl.create(getValue(this.sb.toString())); + } + catch (RuntimeException exception) { + getOwner().handleException(exception); + } + finally { + this.sb = null; + } + } + return this.value; + } + + /** + * Returns the text of the body of this element. + * This method evaluates value from text of the body, + * and should be overridden in those handlers + * that extend behavior of this element. + * + * @param argument the text of the body + * @return evaluated value + */ + protected Object getValue(String argument) { + return argument; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/TrueElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/TrueElementHandler.java new file mode 100644 index 00000000000..faf8904d4d0 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/TrueElementHandler.java @@ -0,0 +1,56 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <true> element. + * This element specifies {@code true} value. + * It should not contain body or inner elements. + * For example:
+ * <true/>
+ * is equivalent to {@code true} in Java code. + *

The following atribute is supported: + *

+ *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class TrueElementHandler extends NullElementHandler { + + /** + * Returns {@code Boolean.TRUE} + * as a value of <true> element. + * + * @return {@code Boolean.TRUE} by default + */ + @Override + public Object getValue() { + return Boolean.TRUE; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ValueObject.java b/jdk/src/share/classes/com/sun/beans/decoder/ValueObject.java new file mode 100644 index 00000000000..04f28278e34 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ValueObject.java @@ -0,0 +1,50 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This interface represents the result of method execution. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public interface ValueObject { + + /** + * Returns the result of method execution. + * + * @return the result of method execution + */ + Object getValue(); + + /** + * Returns {@code void} state of this value object. + * + * @return {@code true} if value can be ignored, + * {@code false} otherwise + */ + boolean isVoid(); +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/ValueObjectImpl.java b/jdk/src/share/classes/com/sun/beans/decoder/ValueObjectImpl.java new file mode 100644 index 00000000000..cb891fe6c61 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/ValueObjectImpl.java @@ -0,0 +1,88 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This utility class provides {@code static} method + * to create the object that contains the result of method execution. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class ValueObjectImpl implements ValueObject { + static final ValueObject NULL = new ValueObjectImpl(null); + static final ValueObject VOID = new ValueObjectImpl(); + + /** + * Returns the object that describes returning value. + * + * @param value the result of method execution + * @return the object that describes value + */ + static ValueObject create(Object value) { + return (value != null) + ? new ValueObjectImpl(value) + : NULL; + } + + private Object value; + private boolean isVoid; + + /** + * Creates the object that describes returning void value. + */ + private ValueObjectImpl() { + this.isVoid = true; + } + + /** + * Creates the object that describes returning non-void value. + * + * @param value the result of method execution + */ + private ValueObjectImpl(Object value) { + this.value = value; + } + + /** + * Returns the result of method execution. + * + * @return the result of method execution + */ + public Object getValue() { + return this.value; + } + + /** + * Returns {@code void} state of this value object. + * + * @return {@code true} if value should be ignored, + * {@code false} otherwise + */ + public boolean isVoid() { + return this.isVoid; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/VarElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/VarElementHandler.java new file mode 100644 index 00000000000..d948c18e538 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/VarElementHandler.java @@ -0,0 +1,82 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <var> element. + * This element retrieves the value of specified variable. + * For example:
+ * <var id="id1" idref="id2"/>
+ * is equivalent to {@code id1 = id2} in Java code. + *

The following atributes are supported: + *

+ *
idref + *
the identifier to refer to the variable + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class VarElementHandler extends ElementHandler { + private ValueObject value; + + /** + * Parses attributes of the element. + * The following atributes are supported: + *
+ *
idref + *
the identifier to refer to the variable + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @param name the attribute name + * @param value the attribute value + */ + @Override + public void addAttribute(String name, String value) { + if (name.equals("idref")) { // NON-NLS: the attribute name + this.value = ValueObjectImpl.create(getVariable(value)); + } else { + super.addAttribute(name, value); + } + } + + /** + * Returns the value of this element. + * + * @return the value of this element + */ + @Override + protected ValueObject getValueObject() { + if (this.value == null) { + throw new IllegalArgumentException("Variable name is not set"); + } + return this.value; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/decoder/VoidElementHandler.java b/jdk/src/share/classes/com/sun/beans/decoder/VoidElementHandler.java new file mode 100644 index 00000000000..44726a0f7a1 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/decoder/VoidElementHandler.java @@ -0,0 +1,68 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.decoder; + +/** + * This class is intended to handle <void> element. + * This element looks like <object> element, + * but its value is not used as an argument for element + * that contains this one. + *

The following atributes are supported: + *

+ *
class + *
the type is used for static methods and fields + *
method + *
the method name + *
property + *
the property name + *
index + *
the property index + *
field + *
the field name + *
idref + *
the identifier to refer to the variable + *
id + *
the identifier of the variable that is intended to store the result + *
+ * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class VoidElementHandler extends ObjectElementHandler { + + /** + * Tests whether the value of this element can be used + * as an argument of the element that contained in this one. + * + * @return {@code true} if the value of this element should be used + * as an argument of the element that contained in this one, + * {@code false} otherwise + */ + @Override + protected boolean isArgument() { + return false; // hack for compatibility + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/AbstractFinder.java b/jdk/src/share/classes/com/sun/beans/finder/AbstractFinder.java new file mode 100644 index 00000000000..396d6cbf8f8 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/AbstractFinder.java @@ -0,0 +1,213 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import java.util.HashMap; +import java.util.Map; + +/** + * This abstract class provides functionality + * to find a public method or constructor + * with specified parameter types. + * It supports a variable number of parameters. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +abstract class AbstractFinder { + private final Class[] args; + + /** + * Creates finder for array of classes of arguments. + * If a particular element of array equals {@code null}, + * than the appropriate pair of classes + * does not take into consideration. + * + * @param args array of classes of arguments + */ + protected AbstractFinder(Class[] args) { + this.args = args; + } + + /** + * Returns an array of {@code Class} objects + * that represent the formal parameter types of the method + * Returns an empty array if the method takes no parameters. + * + * @param method the object that represents method + * @return the parameter types of the method + */ + protected abstract Class[] getParameters(T method); + + /** + * Returns {@code true} if and only if the method + * was declared to take a variable number of arguments. + * + * @param method the object that represents method + * @return {@code true} if the method was declared + * to take a variable number of arguments; + * {@code false} otherwise + */ + protected abstract boolean isVarArgs(T method); + + /** + * Checks validness of the method. + * At least the valid method should be public. + * + * @param method the object that represents method + * @return {@code true} if the method is valid, + * {@code false} otherwise + */ + protected abstract boolean isValid(T method); + + /** + * Performs a search in the {@code methods} array. + * The one method is selected from the array of the valid methods. + * The list of parameters of the selected method shows + * the best correlation with the list of arguments + * specified at class initialization. + * If more than one method is both accessible and applicable + * to a method invocation, it is necessary to choose one + * to provide the descriptor for the run-time method dispatch. + * The most specific method should be chosen. + * + * @param methods the array of methods to search within + * @return the object that represents found method + * @throws NoSuchMethodException if no method was found or several + * methods meet the search criteria + * @see #isAssignable + */ + final T find(T[] methods) throws NoSuchMethodException { + Map[]> map = new HashMap[]>(); + + T oldMethod = null; + Class[] oldParams = null; + boolean ambiguous = false; + + for (T newMethod : methods) { + if (isValid(newMethod)) { + Class[] newParams = getParameters(newMethod); + if (newParams.length == this.args.length) { + PrimitiveWrapperMap.replacePrimitivesWithWrappers(newParams); + if (isAssignable(newParams, this.args)) { + if (oldMethod == null) { + oldMethod = newMethod; + oldParams = newParams; + } else { + boolean useNew = isAssignable(oldParams, newParams); + boolean useOld = isAssignable(newParams, oldParams); + + if (useOld == useNew) { + ambiguous = true; + } else if (useNew) { + oldMethod = newMethod; + oldParams = newParams; + ambiguous = false; + } + } + } + } + if (isVarArgs(newMethod)) { + int length = newParams.length - 1; + if (length <= this.args.length) { + Class[] array = new Class[this.args.length]; + System.arraycopy(newParams, 0, array, 0, length); + if (length < this.args.length) { + Class type = newParams[length].getComponentType(); + if (type.isPrimitive()) { + type = PrimitiveWrapperMap.getType(type.getName()); + } + for (int i = length; i < this.args.length; i++) { + array[i] = type; + } + } + map.put(newMethod, array); + } + } + } + } + for (T newMethod : methods) { + Class[] newParams = map.get(newMethod); + if (newParams != null) { + if (isAssignable(newParams, this.args)) { + if (oldMethod == null) { + oldMethod = newMethod; + oldParams = newParams; + } else { + boolean useNew = isAssignable(oldParams, newParams); + boolean useOld = isAssignable(newParams, oldParams); + + if (useOld == useNew) { + if (oldParams == map.get(oldMethod)) { + ambiguous = true; + } + } else if (useNew) { + oldMethod = newMethod; + oldParams = newParams; + ambiguous = false; + } + } + } + } + } + + if (ambiguous) { + throw new NoSuchMethodException("Ambiguous methods are found"); + } + if (oldMethod == null) { + throw new NoSuchMethodException("Method is not found"); + } + return oldMethod; + } + + /** + * Determines if every class in {@code min} array is either the same as, + * or is a superclass of, the corresponding class in {@code max} array. + * The length of every array must equal the number of arguments. + * This comparison is performed in the {@link #find} method + * before the first call of the isAssignable method. + * If an argument equals {@code null} + * the appropriate pair of classes does not take into consideration. + * + * @param min the array of classes to be checked + * @param max the array of classes that is used to check + * @return {@code true} if all classes in {@code min} array + * are assignable from corresponding classes in {@code max} array, + * {@code false} otherwise + * + * @see Class#isAssignableFrom + */ + private boolean isAssignable(Class[] min, Class[] max) { + for (int i = 0; i < this.args.length; i++) { + if (null != this.args[i]) { + if (!min[i].isAssignableFrom(max[i])) { + return false; + } + } + } + return true; + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java b/jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java index 79b77415653..01a72fa5809 100644 --- a/jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java +++ b/jdk/src/share/classes/com/sun/beans/finder/ClassFinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ package com.sun.beans.finder; /** - * This is utility class that provides static methods + * This is utility class that provides {@code static} methods * to find a class with the specified name using the specified class loader. * * @since 1.7 @@ -33,137 +33,138 @@ package com.sun.beans.finder; * @author Sergey A. Malenkov */ public final class ClassFinder { + /** - * Returns the Class object associated + * Returns the {@code Class} object associated * with the class or interface with the given string name, * using the default class loader. *

- * The name can denote an array class + * The {@code name} can denote an array class * (see {@link Class#getName} for details). * * @param name fully qualified name of the desired class * @return class object representing the desired class * - * @exception ClassNotFoundException if the class cannot be located - * by the specified class loader + * @throws ClassNotFoundException if the class cannot be located + * by the specified class loader * * @see Class#forName(String) * @see Class#forName(String,boolean,ClassLoader) * @see ClassLoader#getSystemClassLoader() * @see Thread#getContextClassLoader() */ - public static Class findClass( String name ) throws ClassNotFoundException { + public static Class findClass(String name) throws ClassNotFoundException { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); - if ( loader == null ) { + if (loader == null) { // can be null in IE (see 6204697) loader = ClassLoader.getSystemClassLoader(); } - if ( loader != null ) { - return Class.forName( name, false, loader ); + if (loader != null) { + return Class.forName(name, false, loader); } - } catch ( ClassNotFoundException exception ) { + } catch (ClassNotFoundException exception) { // use current class loader instead - } catch ( SecurityException exception ) { + } catch (SecurityException exception) { // use current class loader instead } - return Class.forName( name ); + return Class.forName(name); } /** - * Returns the Class object associated with + * Returns the {@code Class} object associated with * the class or interface with the given string name, * using the given class loader. *

- * The name can denote an array class + * The {@code name} can denote an array class * (see {@link Class#getName} for details). *

- * If the parameter loader is null, + * If the parameter {@code loader} is null, * the class is loaded through the default class loader. * * @param name fully qualified name of the desired class * @param loader class loader from which the class must be loaded * @return class object representing the desired class * - * @exception ClassNotFoundException if the class cannot be located - * by the specified class loader + * @throws ClassNotFoundException if the class cannot be located + * by the specified class loader * * @see #findClass(String,ClassLoader) * @see Class#forName(String,boolean,ClassLoader) */ - public static Class findClass( String name, ClassLoader loader ) throws ClassNotFoundException { - if ( loader != null ) { + public static Class findClass(String name, ClassLoader loader) throws ClassNotFoundException { + if (loader != null) { try { - return Class.forName( name, false, loader ); - } catch ( ClassNotFoundException exception ) { + return Class.forName(name, false, loader); + } catch (ClassNotFoundException exception) { // use default class loader instead - } catch ( SecurityException exception ) { + } catch (SecurityException exception) { // use default class loader instead } } - return findClass( name ); + return findClass(name); } /** - * Returns the Class object associated + * Returns the {@code Class} object associated * with the class or interface with the given string name, * using the default class loader. *

- * The name can denote an array class + * The {@code name} can denote an array class * (see {@link Class#getName} for details). *

* This method can be used to obtain - * any of the Class objects - * representing void or primitive Java types: - * char, byte, short, - * int, long, float, - * double and boolean. + * any of the {@code Class} objects + * representing {@code void} or primitive Java types: + * {@code char}, {@code byte}, {@code short}, + * {@code int}, {@code long}, {@code float}, + * {@code double} and {@code boolean}. * * @param name fully qualified name of the desired class * @return class object representing the desired class * - * @exception ClassNotFoundException if the class cannot be located - * by the specified class loader + * @throws ClassNotFoundException if the class cannot be located + * by the specified class loader * * @see #resolveClass(String,ClassLoader) */ - public static Class resolveClass( String name ) throws ClassNotFoundException { - return resolveClass( name, null ); + public static Class resolveClass(String name) throws ClassNotFoundException { + return resolveClass(name, null); } /** - * Returns the Class object associated with + * Returns the {@code Class} object associated with * the class or interface with the given string name, * using the given class loader. *

- * The name can denote an array class + * The {@code name} can denote an array class * (see {@link Class#getName} for details). *

- * If the parameter loader is null, + * If the parameter {@code loader} is null, * the class is loaded through the default class loader. *

* This method can be used to obtain - * any of the Class objects - * representing void or primitive Java types: - * char, byte, short, - * int, long, float, - * double and boolean. + * any of the {@code Class} objects + * representing {@code void} or primitive Java types: + * {@code char}, {@code byte}, {@code short}, + * {@code int}, {@code long}, {@code float}, + * {@code double} and {@code boolean}. * * @param name fully qualified name of the desired class * @param loader class loader from which the class must be loaded * @return class object representing the desired class * - * @exception ClassNotFoundException if the class cannot be located - * by the specified class loader + * @throws ClassNotFoundException if the class cannot be located + * by the specified class loader * * @see #findClass(String,ClassLoader) * @see PrimitiveTypeMap#getType(String) */ - public static Class resolveClass( String name, ClassLoader loader ) throws ClassNotFoundException { - Class type = PrimitiveTypeMap.getType( name ); - return ( type == null ) - ? findClass( name, loader ) + public static Class resolveClass(String name, ClassLoader loader) throws ClassNotFoundException { + Class type = PrimitiveTypeMap.getType(name); + return (type == null) + ? findClass(name, loader) : type; } diff --git a/jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java b/jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java new file mode 100644 index 00000000000..e7bb33421fe --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/ConstructorFinder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import com.sun.beans.WeakCache; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Modifier; + +/** + * This utility class provides {@code static} methods + * to find a public constructor with specified parameter types + * in specified class. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class ConstructorFinder extends AbstractFinder> { + private static final WeakCache> CACHE = new WeakCache>(); + + /** + * Finds public constructor + * that is declared in public class. + * + * @param type the class that can have constructor + * @param args parameter types that is used to find constructor + * @return object that represents found constructor + * @throws NoSuchMethodException if constructor could not be found + * or some constructors are found + */ + public static Constructor findConstructor(Class type, Class...args) throws NoSuchMethodException { + if (type.isPrimitive()) { + throw new NoSuchMethodException("Primitive wrapper does not contain constructors"); + } + if (type.isInterface()) { + throw new NoSuchMethodException("Interface does not contain constructors"); + } + if (Modifier.isAbstract(type.getModifiers())) { + throw new NoSuchMethodException("Abstract class cannot be instantiated"); + } + if (!Modifier.isPublic(type.getModifiers())) { + throw new NoSuchMethodException("Class is not accessible"); + } + PrimitiveWrapperMap.replacePrimitivesWithWrappers(args); + Signature signature = new Signature(type, args); + + Constructor constructor = CACHE.get(signature); + if (constructor != null) { + return constructor; + } + constructor = new ConstructorFinder(args).find(type.getConstructors()); + CACHE.put(signature, constructor); + return constructor; + } + + /** + * Creates constructor finder with specified array of parameter types. + * + * @param args the array of parameter types + */ + private ConstructorFinder(Class[] args) { + super(args); + } + + /** + * Returns an array of {@code Class} objects + * that represent the formal parameter types of the constructor + * Returns an empty array if the constructor takes no parameters. + * + * @param constructor the object that represents constructor + * @return the parameter types of the constructor + */ + @Override + protected Class[] getParameters(Constructor constructor) { + return constructor.getParameterTypes(); + } + + /** + * Returns {@code true} if and only if the constructor + * was declared to take a variable number of arguments. + * + * @param constructor the object that represents constructor + * @return {@code true} if the constructor was declared + * to take a variable number of arguments; + * {@code false} otherwise + */ + @Override + protected boolean isVarArgs(Constructor constructor) { + return constructor.isVarArgs(); + } + + /** + * Checks validness of the constructor. + * The valid constructor should be public. + * + * @param constructor the object that represents constructor + * @return {@code true} if the constructor is valid, + * {@code false} otherwise + */ + @Override + protected boolean isValid(Constructor constructor) { + return Modifier.isPublic(constructor.getModifiers()); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java b/jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java new file mode 100644 index 00000000000..cb17d02417d --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/FieldFinder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +/** + * This utility class provides {@code static} methods + * to find a public field with specified name + * in specified class. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class FieldFinder { + + /** + * Finds public field (static or non-static) + * that is declared in public class. + * + * @param type the class that can have field + * @param name the name of field to find + * @return object that represents found field + * @throws NoSuchFieldException if field is not found + * @see Class#getField + */ + public static Field findField(Class type, String name) throws NoSuchFieldException { + if (name == null) { + throw new IllegalArgumentException("Field name is not set"); + } + Field field = type.getField(name); + if (!Modifier.isPublic(field.getModifiers())) { + throw new NoSuchFieldException("Field '" + name + "' is not public"); + } + if (!Modifier.isPublic(field.getDeclaringClass().getModifiers())) { + throw new NoSuchFieldException("Field '" + name + "' is not accessible"); + } + return field; + } + + /** + * Finds public non-static field + * that is declared in public class. + * + * @param type the class that can have field + * @param name the name of field to find + * @return object that represents found field + * @throws NoSuchFieldException if field is not found + * @see Class#getField + */ + public static Field findInstanceField(Class type, String name) throws NoSuchFieldException { + Field field = findField(type, name); + if (Modifier.isStatic(field.getModifiers())) { + throw new NoSuchFieldException("Field '" + name + "' is static"); + } + return field; + } + + /** + * Finds public static field + * that is declared in public class. + * + * @param type the class that can have field + * @param name the name of field to find + * @return object that represents found field + * @throws NoSuchFieldException if field is not found + * @see Class#getField + */ + public static Field findStaticField(Class type, String name) throws NoSuchFieldException { + Field field = findField(type, name); + if (!Modifier.isStatic(field.getModifiers())) { + throw new NoSuchFieldException("Field '" + name + "' is not static"); + } + return field; + } + + /** + * Disable instantiation. + */ + private FieldFinder() { + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java b/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java new file mode 100644 index 00000000000..d4aa0844ad3 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java @@ -0,0 +1,205 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import com.sun.beans.WeakCache; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +/** + * This utility class provides {@code static} methods + * to find a public method with specified name and parameter types + * in specified class. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class MethodFinder extends AbstractFinder { + private static final WeakCache CACHE = new WeakCache(); + + /** + * Finds public method (static or non-static) + * that is accessible from public class. + * + * @param type the class that can have method + * @param name the name of method to find + * @param args parameter types that is used to find method + * @return object that represents found method + * @throws NoSuchMethodException if method could not be found + * or some methods are found + */ + public static Method findMethod(Class type, String name, Class...args) throws NoSuchMethodException { + if (name == null) { + throw new IllegalArgumentException("Method name is not set"); + } + PrimitiveWrapperMap.replacePrimitivesWithWrappers(args); + Signature signature = new Signature(type, name, args); + + Method method = CACHE.get(signature); + if (method != null) { + return method; + } + method = findAccessibleMethod(new MethodFinder(name, args).find(type.getMethods())); + CACHE.put(signature, method); + return method; + } + + /** + * Finds public non-static method + * that is accessible from public class. + * + * @param type the class that can have method + * @param name the name of method to find + * @param args parameter types that is used to find method + * @return object that represents found method + * @throws NoSuchMethodException if method could not be found + * or some methods are found + */ + public static Method findInstanceMethod(Class type, String name, Class... args) throws NoSuchMethodException { + Method method = findMethod(type, name, args); + if (Modifier.isStatic(method.getModifiers())) { + throw new NoSuchMethodException("Method '" + name + "' is static"); + } + return method; + } + + /** + * Finds public static method + * that is accessible from public class. + * + * @param type the class that can have method + * @param name the name of method to find + * @param args parameter types that is used to find method + * @return object that represents found method + * @throws NoSuchMethodException if method could not be found + * or some methods are found + */ + public static Method findStaticMethod(Class type, String name, Class...args) throws NoSuchMethodException { + Method method = findMethod(type, name, args); + if (!Modifier.isStatic(method.getModifiers())) { + throw new NoSuchMethodException("Method '" + name + "' is not static"); + } + return method; + } + + /** + * Finds method that is accessible from public class or interface through class hierarchy. + * + * @param method object that represents found method + * @return object that represents accessible method + * @throws NoSuchMethodException if method is not accessible or is not found + * in specified superclass or interface + */ + private static Method findAccessibleMethod(Method method) throws NoSuchMethodException { + Class type = method.getDeclaringClass(); + if (Modifier.isPublic(type.getModifiers())) { + return method; + } + if (Modifier.isStatic(method.getModifiers())) { + throw new NoSuchMethodException("Method '" + method.getName() + "' is not accessible"); + } + for (Class face : type.getInterfaces()) { + try { + return findAccessibleMethod(method, face); + } + catch (NoSuchMethodException exception) { + // try to find in superclass or another interface + } + } + return findAccessibleMethod(method, type.getSuperclass()); + } + + /** + * Finds method that accessible from specified class. + * + * @param method object that represents found method + * @param type class that is used to find accessible method + * @return object that represents accessible method + * @throws NoSuchMethodException if method is not accessible or is not found + * in specified superclass or interface + */ + private static Method findAccessibleMethod(Method method, Class type) throws NoSuchMethodException { + String name = method.getName(); + Class[] params = method.getParameterTypes(); + return findAccessibleMethod(type.getMethod(name, params)); + } + + + private final String name; + + /** + * Creates method finder with specified array of parameter types. + * + * @param name the name of method to find + * @param args the array of parameter types + */ + private MethodFinder(String name, Class[] args) { + super(args); + this.name = name; + } + + /** + * Returns an array of {@code Class} objects + * that represent the formal parameter types of the method + * Returns an empty array if the method takes no parameters. + * + * @param method the object that represents method + * @return the parameter types of the method + */ + @Override + protected Class[] getParameters(Method method) { + return method.getParameterTypes(); + } + + /** + * Returns {@code true} if and only if the method + * was declared to take a variable number of arguments. + * + * @param method the object that represents method + * @return {@code true} if the method was declared + * to take a variable number of arguments; + * {@code false} otherwise + */ + @Override + protected boolean isVarArgs(Method method) { + return method.isVarArgs(); + } + + /** + * Checks validness of the method. + * The valid method should be public and + * should have the specified name. + * + * @param method the object that represents method + * @return {@code true} if the method is valid, + * {@code false} otherwise + */ + @Override + protected boolean isValid(Method method) { + return Modifier.isPublic(method.getModifiers()) && method.getName().equals(this.name); + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/PrimitiveTypeMap.java b/jdk/src/share/classes/com/sun/beans/finder/PrimitiveTypeMap.java index 0bdb09e5be1..36a552b906c 100644 --- a/jdk/src/share/classes/com/sun/beans/finder/PrimitiveTypeMap.java +++ b/jdk/src/share/classes/com/sun/beans/finder/PrimitiveTypeMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2006-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,29 +36,30 @@ import java.util.Map; * @author Sergey A. Malenkov */ final class PrimitiveTypeMap { + /** * Returns primitive type class by its name. * * @param name the name of primitive type * @return found primitive type class, - * or null if not found + * or {@code null} if not found */ - static Class getType( String name ) { - return map.get( name ); + static Class getType(String name) { + return map.get(name); } - private static final Map map = new HashMap( 9 ); + private static final Map> map = new HashMap>(9); static { - map.put( boolean.class.getName(), boolean.class ); - map.put( char.class.getName(), char.class ); - map.put( byte.class.getName(), byte.class ); - map.put( short.class.getName(), short.class ); - map.put( int.class.getName(), int.class ); - map.put( long.class.getName(), long.class ); - map.put( float.class.getName(), float.class ); - map.put( double.class.getName(), double.class ); - map.put( void.class.getName(), void.class ); + map.put(boolean.class.getName(), boolean.class); + map.put(char.class.getName(), char.class); + map.put(byte.class.getName(), byte.class); + map.put(short.class.getName(), short.class); + map.put(int.class.getName(), int.class); + map.put(long.class.getName(), long.class); + map.put(float.class.getName(), float.class); + map.put(double.class.getName(), double.class); + map.put(void.class.getName(), void.class); } /** diff --git a/jdk/src/share/classes/com/sun/beans/finder/PrimitiveWrapperMap.java b/jdk/src/share/classes/com/sun/beans/finder/PrimitiveWrapperMap.java new file mode 100644 index 00000000000..f39b3ea3df0 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/PrimitiveWrapperMap.java @@ -0,0 +1,86 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +import java.util.HashMap; +import java.util.Map; + +/** + * This utility class associates + * name of primitive type with appropriate wrapper. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +public final class PrimitiveWrapperMap { + + /** + * Replaces all primitive types in specified array with wrappers. + * + * @param types array of classes where all primitive types + * will be replaced by appropriate wrappers + */ + static void replacePrimitivesWithWrappers(Class[] types) { + for (int i = 0; i < types.length; i++) { + if (types[i] != null) { + if (types[i].isPrimitive()) { + types[i] = getType(types[i].getName()); + } + } + } + } + + /** + * Returns wrapper for primitive type by its name. + * + * @param name the name of primitive type + * @return found wrapper for primitive type, + * or {@code null} if not found + */ + public static Class getType(String name) { + return map.get(name); + } + + private static final Map> map = new HashMap>(9); + + static { + map.put(Boolean.TYPE.getName(), Boolean.class); + map.put(Character.TYPE.getName(), Character.class); + map.put(Byte.TYPE.getName(), Byte.class); + map.put(Short.TYPE.getName(), Short.class); + map.put(Integer.TYPE.getName(), Integer.class); + map.put(Long.TYPE.getName(), Long.class); + map.put(Float.TYPE.getName(), Float.class); + map.put(Double.TYPE.getName(), Double.class); + map.put(Void.TYPE.getName(), Void.class); + } + + /** + * Disable instantiation. + */ + private PrimitiveWrapperMap() { + } +} diff --git a/jdk/src/share/classes/com/sun/beans/finder/Signature.java b/jdk/src/share/classes/com/sun/beans/finder/Signature.java new file mode 100644 index 00000000000..8c09e11f4b4 --- /dev/null +++ b/jdk/src/share/classes/com/sun/beans/finder/Signature.java @@ -0,0 +1,169 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.beans.finder; + +/** + * This class is designed to be a key of a cache + * of constructors or methods. + * + * @since 1.7 + * + * @author Sergey A. Malenkov + */ +final class Signature { + private final Class type; + private final String name; + private final Class[] args; + + private volatile int code; + + /** + * Constructs signature for constructor. + * + * @param type the class that contains constructor + * @param args the types of constructor's parameters + */ + Signature(Class type, Class[] args) { + this(type, null, args); + } + + /** + * Constructs signature for method. + * + * @param type the class that contains method + * @param name the name of the method + * @param args the types of method's parameters + */ + Signature(Class type, String name, Class[] args) { + this.type = type; + this.name = name; + this.args = args; + } + + /** + * Indicates whether some other object is "equal to" this one. + * + * @param object the reference object with which to compare + * @return {@code true} if this object is the same as the + * {@code object} argument, {@code false} otherwise + * @see #hashCode() + */ + @Override + public boolean equals(Object object) { + if (this == object) { + return true; + } + if (object instanceof Signature) { + Signature signature = (Signature) object; + return isEqual(signature.type, this.type) + && isEqual(signature.name, this.name) + && isEqual(signature.args, this.args); + } + return false; + } + + /** + * Indicates whether some object is "equal to" another one. + * This method supports {@code null} values. + * + * @param obj1 the first reference object that will compared + * @param obj2 the second reference object that will compared + * @return {@code true} if first object is the same as the second object, + * {@code false} otherwise + */ + private static boolean isEqual(Object obj1, Object obj2) { + return (obj1 == null) + ? obj2 == null + : obj1.equals(obj2); + } + + /** + * Indicates whether some array is "equal to" another one. + * This method supports {@code null} values. + * + * @param args1 the first reference array that will compared + * @param args2 the second reference array that will compared + * @return {@code true} if first array is the same as the second array, + * {@code false} otherwise + */ + private static boolean isEqual(Class[] args1, Class[] args2) { + if ((args1 == null) || (args2 == null)) { + return args1 == args2; + } + if (args1.length != args2.length) { + return false; + } + for (int i = 0; i < args1.length; i++) { + if (!isEqual(args1[i], args2[i])) { + return false; + } + } + return true; + } + + /** + * Returns a hash code value for the object. + * This method is supported for the benefit of hashtables + * such as {@link java.util.HashMap} or {@link java.util.HashSet}. + * Hash code computed using algorithm + * suggested in Effective Java, Item 8. + * + * @return a hash code value for this object + * @see #equals(Object) + */ + @Override + public int hashCode() { + if (this.code == 0) { + int code = 17; + code = addHashCode(code, this.type); + code = addHashCode(code, this.name); + + if (this.args != null) { + for (Class arg : this.args) { + code = addHashCode(code, arg); + } + } + this.code = code; + } + return this.code; + } + + /** + * Adds hash code value if specified object. + * This is a part of the algorithm + * suggested in Effective Java, Item 8. + * + * @param code current hash code value + * @param object object that updates hash code value + * @return updated hash code value + * @see #hashCode() + */ + private static int addHashCode(int code, Object object) { + code *= 37; + return (object != null) + ? code + object.hashCode() + : code; + } +} diff --git a/jdk/src/share/classes/java/beans/MetaData.java b/jdk/src/share/classes/java/beans/MetaData.java index 5d8fd697918..defd196457e 100644 --- a/jdk/src/share/classes/java/beans/MetaData.java +++ b/jdk/src/share/classes/java/beans/MetaData.java @@ -24,6 +24,8 @@ */ package java.beans; +import com.sun.beans.finder.PrimitiveWrapperMap; + import java.awt.AWTKeyStroke; import java.awt.BorderLayout; import java.awt.Dimension; @@ -204,7 +206,7 @@ class java_lang_Class_PersistenceDelegate extends PersistenceDelegate { if (c.isPrimitive()) { Field field = null; try { - field = ReflectionUtils.typeToClass(c).getDeclaredField("TYPE"); + field = PrimitiveWrapperMap.getType(c.getName()).getDeclaredField("TYPE"); } catch (NoSuchFieldException ex) { System.err.println("Unknown primitive type: " + c); } diff --git a/jdk/src/share/classes/java/beans/ReflectionUtils.java b/jdk/src/share/classes/java/beans/ReflectionUtils.java index 167b02995f0..c2553fd4176 100644 --- a/jdk/src/share/classes/java/beans/ReflectionUtils.java +++ b/jdk/src/share/classes/java/beans/ReflectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,8 @@ */ package java.beans; +import com.sun.beans.finder.PrimitiveWrapperMap; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -34,7 +36,6 @@ import java.lang.ref.SoftReference; import java.util.*; -import com.sun.beans.ObjectHandler; import sun.reflect.misc.MethodUtil; import sun.reflect.misc.ConstructorUtil; import sun.reflect.misc.ReflectUtil; @@ -47,10 +48,6 @@ class ReflectionUtils { private static Reference methodCacheRef; - public static Class typeToClass(Class type) { - return type.isPrimitive() ? ObjectHandler.typeNameToClass(type.getName()) : type; - } - public static boolean isPrimitive(Class type) { return primitiveTypeFor(type) != null; } @@ -99,7 +96,7 @@ class ReflectionUtils { for(int j = 0; j < argClasses.length && match; j++) { Class argType = argTypes[j]; if (argType.isPrimitive()) { - argType = typeToClass(argType); + argType = PrimitiveWrapperMap.getType(argType.getName()); } if (explicit) { // Test each element for equality @@ -210,7 +207,7 @@ class ReflectionUtils { for (int i = 0; i < args.length; i++) { Class mArg = mArgs[i]; if (mArg.isPrimitive()) { - mArg = typeToClass(mArg); + mArg = PrimitiveWrapperMap.getType(mArg.getName()); } if (args[i] == mArg) { matches++; diff --git a/jdk/src/share/classes/java/beans/XMLDecoder.java b/jdk/src/share/classes/java/beans/XMLDecoder.java index 688edfae406..5e0327d65f5 100644 --- a/jdk/src/share/classes/java/beans/XMLDecoder.java +++ b/jdk/src/share/classes/java/beans/XMLDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,19 +24,14 @@ */ package java.beans; -import com.sun.beans.ObjectHandler; +import com.sun.beans.decoder.DocumentHandler; +import java.io.Closeable; import java.io.InputStream; import java.io.IOException; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; - -import org.xml.sax.SAXException; - -import javax.xml.parsers.SAXParserFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; +import org.xml.sax.InputSource; +import org.xml.sax.helpers.DefaultHandler; /** * The XMLDecoder class is used to read XML documents @@ -66,11 +61,11 @@ import javax.xml.parsers.SAXParser; * @author Philip Milne */ public class XMLDecoder { - private InputStream in; + private final DocumentHandler handler = new DocumentHandler(); + private final InputSource input; private Object owner; - private ExceptionListener exceptionListener; - private ObjectHandler handler; - private Reference clref; + private Object[] array; + private int index; /** * Creates a new input stream for reading archives @@ -126,36 +121,45 @@ public class XMLDecoder { */ public XMLDecoder(InputStream in, Object owner, ExceptionListener exceptionListener, ClassLoader cl) { - this.in = in; - setOwner(owner); - setExceptionListener(exceptionListener); - setClassLoader(cl); + this(new InputSource(in), owner, exceptionListener, cl); } /** - * Set the class loader used to instantiate objects for this stream. + * Creates a new decoder to parse XML archives + * created by the {@code XMLEncoder} class. + * If the input source {@code is} is {@code null}, + * no exception is thrown and no parsing is performed. + * This behavior is similar to behavior of other constructors + * that use {@code InputStream} as a parameter. * - * @param cl a classloader to use; if null then the default class loader - * will be used + * @param is the input source to parse + * + * @since 1.7 */ - private void setClassLoader(ClassLoader cl) { - if (cl != null) { - this.clref = new WeakReference(cl); - } + public XMLDecoder(InputSource is) { + this(is, null, null, null); } /** - * Return the class loader used to instantiate objects. If the class loader - * has not been explicitly set then null is returned. + * Creates a new decoder to parse XML archives + * created by the {@code XMLEncoder} class. * - * @return the class loader used to instantiate objects + * @param is the input source to parse + * @param owner the owner of this decoder + * @param el the exception handler for the parser, + * or {@code null} to use the default exception handler + * @param cl the class loader used for instantiating objects, + * or {@code null} to use the default class loader + * + * @since 1.7 */ - private ClassLoader getClassLoader() { - if (clref != null) { - return (ClassLoader)clref.get(); - } - return null; + private XMLDecoder(InputSource is, Object owner, ExceptionListener el, ClassLoader cl) { + this.input = is; + this.owner = owner; + setExceptionListener(el); + this.handler.setClassLoader(cl); + this.handler.setOwner(this); } /** @@ -163,8 +167,14 @@ public class XMLDecoder { * with this stream. */ public void close() { + if (parsingComplete()) { + close(this.input.getCharacterStream()); + close(this.input.getByteStream()); + } + } + + private void close(Closeable in) { if (in != null) { - getHandler(); try { in.close(); } @@ -174,6 +184,17 @@ public class XMLDecoder { } } + private boolean parsingComplete() { + if (this.input == null) { + return false; + } + if (this.array == null) { + this.handler.parse(this.input); + this.array = this.handler.getObjects(); + } + return true; + } + /** * Sets the exception handler for this stream to exceptionListener. * The exception handler is notified when this stream catches recoverable @@ -185,7 +206,10 @@ public class XMLDecoder { * @see #getExceptionListener */ public void setExceptionListener(ExceptionListener exceptionListener) { - this.exceptionListener = exceptionListener; + if (exceptionListener == null) { + exceptionListener = Statement.defaultExceptionListener; + } + this.handler.setExceptionListener(exceptionListener); } /** @@ -197,8 +221,7 @@ public class XMLDecoder { * @see #setExceptionListener */ public ExceptionListener getExceptionListener() { - return (exceptionListener != null) ? exceptionListener : - Statement.defaultExceptionListener; + return this.handler.getExceptionListener(); } /** @@ -212,10 +235,9 @@ public class XMLDecoder { * @see XMLEncoder#writeObject */ public Object readObject() { - if (in == null) { - return null; - } - return getHandler().dequeueResult(); + return (parsingComplete()) + ? this.array[this.index++] + : null; } /** @@ -241,33 +263,32 @@ public class XMLDecoder { } /** - * Returns the object handler for input stream. - * The object handler is created if necessary. + * Creates a new handler for SAX parser + * that can be used to parse embedded XML archives + * created by the {@code XMLEncoder} class. * - * @return the object handler + * The {@code owner} should be used if parsed XML document contains + * the method call within context of the <java> element. + * The {@code null} value may cause illegal parsing in such case. + * The same problem may occur, if the {@code owner} class + * does not contain expected method to call. See details here. + * + * @param owner the owner of the default handler + * that can be used as a value of <java> element + * @param el the exception handler for the parser, + * or {@code null} to use the default exception handler + * @param cl the class loader used for instantiating objects, + * or {@code null} to use the default class loader + * @return an instance of {@code DefaultHandler} for SAX parser + * + * @since 1.7 */ - private ObjectHandler getHandler() { - if ( handler == null ) { - SAXParserFactory factory = SAXParserFactory.newInstance(); - try { - SAXParser parser = factory.newSAXParser(); - handler = new ObjectHandler( this, getClassLoader() ); - parser.parse( in, handler ); - } - catch ( ParserConfigurationException e ) { - getExceptionListener().exceptionThrown( e ); - } - catch ( SAXException se ) { - Exception e = se.getException(); - if ( e == null ) { - e = se; - } - getExceptionListener().exceptionThrown( e ); - } - catch ( IOException ioe ) { - getExceptionListener().exceptionThrown( ioe ); - } - } + public static DefaultHandler createHandler(Object owner, ExceptionListener el, ClassLoader cl) { + DocumentHandler handler = new DocumentHandler(); + handler.setOwner(owner); + handler.setExceptionListener(el); + handler.setClassLoader(cl); return handler; } } diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java index 5f7a9b6c282..7fe2278fd20 100644 --- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java +++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,16 +59,16 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import org.xml.sax.AttributeList; -import org.xml.sax.HandlerBase; +import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.Locator; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; -import com.sun.beans.ObjectHandler; +import com.sun.beans.decoder.DocumentHandler; -class SynthParser extends HandlerBase { +class SynthParser extends DefaultHandler { // // Known element names // @@ -119,7 +119,7 @@ class SynthParser extends HandlerBase { /** * Lazily created, used for anything we don't understand. */ - private ObjectHandler _handler; + private DocumentHandler _handler; /** * Indicates the depth of how many elements we've encountered but don't @@ -292,8 +292,9 @@ class SynthParser extends HandlerBase { /** * Handles beans persistance. */ - private ObjectHandler getHandler() { + private DocumentHandler getHandler() { if (_handler == null) { + _handler = new DocumentHandler(); if (_urlResourceBase != null) { // getHandler() is never called before parse() so it is safe // to create a URLClassLoader with _resourceBase. @@ -304,14 +305,13 @@ class SynthParser extends HandlerBase { URL[] urls = new URL[] { getResource(".") }; ClassLoader parent = Thread.currentThread().getContextClassLoader(); ClassLoader urlLoader = new URLClassLoader(urls, parent); - _handler = new ObjectHandler(null, urlLoader); + _handler.setClassLoader(urlLoader); } else { - _handler = new ObjectHandler(null, - _classResourceBase.getClassLoader()); + _handler.setClassLoader(_classResourceBase.getClassLoader()); } for (String key : _mapping.keySet()) { - _handler.register(key, _mapping.get(key)); + _handler.setVariable(key, _mapping.get(key)); } } return _handler; @@ -336,8 +336,8 @@ class SynthParser extends HandlerBase { private Object lookup(String key, Class type) throws SAXException { Object value; if (_handler != null) { - if ((value = _handler.lookup(key)) != null) { - return checkCast(value, type); + if (_handler.hasVariable(key)) { + return checkCast(_handler.getVariable(key), type); } } value = _mapping.get(key); @@ -354,11 +354,11 @@ class SynthParser extends HandlerBase { private void register(String key, Object value) throws SAXException { if (key != null) { if (_mapping.get(key) != null || - (_handler != null && _handler.lookup(key) != null)) { + (_handler != null && _handler.hasVariable(key))) { throw new SAXException("ID " + key + " is already defined"); } if (_handler != null) { - _handler.register(key, value); + _handler.setVariable(key, value); } else { _mapping.put(key, value); @@ -400,12 +400,12 @@ class SynthParser extends HandlerBase { // The following methods are invoked from startElement/stopElement // - private void startStyle(AttributeList attributes) throws SAXException { + private void startStyle(Attributes attributes) throws SAXException { String id = null; _style = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_CLONE)) { _style = (ParsedSynthStyle)((ParsedSynthStyle)lookup( attributes.getValue(i), ParsedSynthStyle.class)). @@ -421,7 +421,7 @@ class SynthParser extends HandlerBase { register(id, _style); } - private void endStyle() throws SAXException { + private void endStyle() { int size = _stylePainters.size(); if (size > 0) { _style.setPainters(_stylePainters.toArray(new ParsedSynthStyle.PainterInfo[size])); @@ -435,14 +435,14 @@ class SynthParser extends HandlerBase { _style = null; } - private void startState(AttributeList attributes) throws SAXException { + private void startState(Attributes attributes) throws SAXException { ParsedSynthStyle.StateInfo stateInfo = null; int state = 0; String id = null; _stateInfo = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_ID)) { id = attributes.getValue(i); } @@ -496,7 +496,7 @@ class SynthParser extends HandlerBase { _stateInfos.add(_stateInfo); } - private void endState() throws SAXException { + private void endState() { int size = _statePainters.size(); if (size > 0) { _stateInfo.setPainters(_statePainters.toArray(new ParsedSynthStyle.PainterInfo[size])); @@ -505,7 +505,7 @@ class SynthParser extends HandlerBase { _stateInfo = null; } - private void startFont(AttributeList attributes) throws SAXException { + private void startFont(Attributes attributes) throws SAXException { Font font = null; int style = Font.PLAIN; int size = 0; @@ -513,7 +513,7 @@ class SynthParser extends HandlerBase { String name = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_ID)) { id = attributes.getValue(i); } @@ -568,13 +568,13 @@ class SynthParser extends HandlerBase { } } - private void startColor(AttributeList attributes) throws SAXException { + private void startColor(Attributes attributes) throws SAXException { Color color = null; String id = null; _colorTypes.clear(); for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_ID)) { id = attributes.getValue(i); } @@ -697,7 +697,7 @@ class SynthParser extends HandlerBase { } } - private void startProperty(AttributeList attributes, + private void startProperty(Attributes attributes, Object property) throws SAXException { Object value = null; String key = null; @@ -707,7 +707,7 @@ class SynthParser extends HandlerBase { String aValue = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String aName = attributes.getName(i); + String aName = attributes.getQName(i); if (aName.equals(ATTRIBUTE_TYPE)) { String type = attributes.getValue(i).toUpperCase(); if (type.equals("IDREF")) { @@ -795,11 +795,11 @@ class SynthParser extends HandlerBase { } } - private void startGraphics(AttributeList attributes) throws SAXException { + private void startGraphics(Attributes attributes) throws SAXException { SynthGraphicsUtils graphics = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_IDREF)) { graphics = (SynthGraphicsUtils)lookup(attributes.getValue(i), SynthGraphicsUtils.class); @@ -813,7 +813,7 @@ class SynthParser extends HandlerBase { } } - private void startInsets(AttributeList attributes) throws SAXException { + private void startInsets(Attributes attributes) throws SAXException { int top = 0; int bottom = 0; int left = 0; @@ -822,7 +822,7 @@ class SynthParser extends HandlerBase { String id = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); try { if (key.equals(ATTRIBUTE_IDREF)) { @@ -858,13 +858,13 @@ class SynthParser extends HandlerBase { } } - private void startBind(AttributeList attributes) throws SAXException { + private void startBind(Attributes attributes) throws SAXException { ParsedSynthStyle style = null; String path = null; int type = -1; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_STYLE)) { style = (ParsedSynthStyle)lookup(attributes.getValue(i), @@ -899,7 +899,7 @@ class SynthParser extends HandlerBase { } } - private void startPainter(AttributeList attributes, String type) throws SAXException { + private void startPainter(Attributes attributes, String type) throws SAXException { Insets sourceInsets = null; Insets destInsets = null; String path = null; @@ -915,7 +915,7 @@ class SynthParser extends HandlerBase { boolean paintCenterSpecified = false; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); String value = attributes.getValue(i); if (key.equals(ATTRIBUTE_ID)) { @@ -1042,12 +1042,12 @@ class SynthParser extends HandlerBase { painters.add(painterInfo); } - private void startImageIcon(AttributeList attributes) throws SAXException { + private void startImageIcon(Attributes attributes) throws SAXException { String path = null; String id = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_ID)) { id = attributes.getValue(i); @@ -1062,12 +1062,11 @@ class SynthParser extends HandlerBase { register(id, new LazyImageIcon(getResource(path))); } - private void startOpaque(AttributeList attributes) throws - SAXException { + private void startOpaque(Attributes attributes) { if (_style != null) { _style.setOpaque(true); for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_VALUE)) { _style.setOpaque("true".equals(attributes.getValue(i). @@ -1077,12 +1076,12 @@ class SynthParser extends HandlerBase { } } - private void startInputMap(AttributeList attributes) throws SAXException { + private void startInputMap(Attributes attributes) throws SAXException { _inputMapBindings.clear(); _inputMapID = null; if (_style != null) { for(int i = attributes.getLength() - 1; i >= 0; i--) { - String key = attributes.getName(i); + String key = attributes.getQName(i); if (key.equals(ATTRIBUTE_ID)) { _inputMapID = attributes.getValue(i); @@ -1101,7 +1100,7 @@ class SynthParser extends HandlerBase { _inputMapID = null; } - private void startBindKey(AttributeList attributes) throws SAXException { + private void startBindKey(Attributes attributes) throws SAXException { if (_inputMapID == null) { // Not in an inputmap, bail. return; @@ -1110,7 +1109,7 @@ class SynthParser extends HandlerBase { String key = null; String value = null; for(int i = attributes.getLength() - 1; i >= 0; i--) { - String aKey = attributes.getName(i); + String aKey = attributes.getQName(i); if (aKey.equals(ATTRIBUTE_KEY)) { key = attributes.getValue(i); @@ -1129,26 +1128,26 @@ class SynthParser extends HandlerBase { } // - // SAX methods, these forward to the ObjectHandler if we don't know + // SAX methods, these forward to the DocumentHandler if we don't know // the element name. // public InputSource resolveEntity(String publicId, String systemId) - throws SAXException { + throws IOException, SAXException { if (isForwarding()) { return getHandler().resolveEntity(publicId, systemId); } return null; } - public void notationDecl(String name, String publicId, String systemId) { + public void notationDecl(String name, String publicId, String systemId) throws SAXException { if (isForwarding()) { getHandler().notationDecl(name, publicId, systemId); } } public void unparsedEntityDecl(String name, String publicId, - String systemId, String notationName) { + String systemId, String notationName) throws SAXException { if (isForwarding()) { getHandler().unparsedEntityDecl(name, publicId, systemId, notationName); @@ -1173,7 +1172,7 @@ class SynthParser extends HandlerBase { } } - public void startElement(String name, AttributeList attributes) + public void startElement(String uri, String local, String name, Attributes attributes) throws SAXException { name = name.intern(); if (name == ELEMENT_STYLE) { @@ -1223,18 +1222,18 @@ class SynthParser extends HandlerBase { } else if (name != ELEMENT_SYNTH) { if (_depth++ == 0) { - getHandler().reset(); + getHandler().startDocument(); } - getHandler().startElement(name, attributes); + getHandler().startElement(uri, local, name, attributes); } } - public void endElement(String name) throws SAXException { + public void endElement(String uri, String local, String name) throws SAXException { if (isForwarding()) { - getHandler().endElement(name); + getHandler().endElement(uri, local, name); _depth--; if (!isForwarding()) { - getHandler().reset(); + getHandler().startDocument(); } } else { diff --git a/jdk/test/java/beans/XMLDecoder/Test4864117.java b/jdk/test/java/beans/XMLDecoder/Test4864117.java new file mode 100644 index 00000000000..a3459f918c6 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/Test4864117.java @@ -0,0 +1,146 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 4864117 + * @summary Tests XMLDecoder within another DefaultHandler for SAX parser + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; +import java.beans.ExceptionListener; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.IOException; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +public final class Test4864117 extends DefaultHandler implements ExceptionListener { + private static final String TEST = "test"; + private static final String DATA + = "\n" + + " \n" + + " Hello, world!\n" + + " \n" + + ""; + + public static void main(String[] args) { + Test4864117 test = new Test4864117(); + InputStream input = new ByteArrayInputStream(DATA.getBytes()); + Exception error = null; + try { + SAXParserFactory.newInstance().newSAXParser().parse(input, test); + } + catch (ParserConfigurationException exception) { + error = exception; + } + catch (SAXException exception) { + error = exception.getException(); + if (error == null) { + error = exception; + } + } + catch (IOException exception) { + error = exception; + } + if (error != null) { + throw new Error("unexpected error", error); + } + test.print('?', test.getMessage()); + } + + private String message; + + public String getMessage() { + if (this.message == null) { + throw new Error("owner's method is not called"); + } + return this.message; + } + + public void setMessage(String message) { + this.message = message; + print(':', this.message); + } + + // DefaultHandler implementation + + private DefaultHandler handler; + private int depth; + + @Override + public void startDocument() throws SAXException { + this.handler = XMLDecoder.createHandler(this, this, null); + this.handler.startDocument(); + } + + @Override + public void endDocument() { + this.handler = null; + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + print('>', qName); + if (this.depth > 0) { + this.handler.startElement(uri, localName, qName, attributes); + } else if (!TEST.equals(qName)) { + throw new SAXException("unexpected element name: " + qName); + } + this.depth++; + } + + @Override + public void endElement(String uri, String localName, String qName) throws SAXException { + this.depth--; + print('<', qName); + if (this.depth > 0) { + this.handler.endElement(uri, localName, qName); + } else if (!TEST.equals(qName)) { + throw new SAXException("unexpected element name: " + qName); + } + } + + @Override + public void characters(char[] ch, int start, int length) throws SAXException { + this.handler.characters(ch, start, length); + } + + public void exceptionThrown(Exception exception) { + throw new Error("unexpected exception", exception); + } + + private void print(char ch, String name) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < this.depth; i++) sb.append(' '); + sb.append(ch).append(' ').append(name); + System.out.println(sb.toString()); + } +} diff --git a/jdk/test/java/beans/XMLDecoder/Test6341798.java b/jdk/test/java/beans/XMLDecoder/Test6341798.java index 2bc43e87565..677ff842352 100644 --- a/jdk/test/java/beans/XMLDecoder/Test6341798.java +++ b/jdk/test/java/beans/XMLDecoder/Test6341798.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ public class Test6341798 { private static final String DATA = "\n" - + " \n" + + " \n" + " \n" + " true\n" + " \n" diff --git a/jdk/test/java/beans/XMLDecoder/spec/AbstractTest.java b/jdk/test/java/beans/XMLDecoder/spec/AbstractTest.java new file mode 100644 index 00000000000..2b8abb2af9e --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/AbstractTest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +import java.beans.ExceptionListener; +import java.beans.XMLDecoder; + +import java.io.ByteArrayInputStream; + +abstract class AbstractTest implements ExceptionListener { + public void exceptionThrown(Exception exception) { + throw new Error("unexpected exception", exception); + } + + /** + * Validates the XML decoder for XML archive + * that defined in the public field of the subclass. + * + * @param decoder the initialized XML decoder + * @throws Error if validation failed + */ + protected abstract void validate(XMLDecoder decoder); + + /** + * This is entry point to start testing. + * + * @param security use {@code true} to start + * second pass in secure context + */ + final void test(boolean security) { + byte[] array = getFieldValue("XML").getBytes(); // NON-NLS: the field name + ByteArrayInputStream input = new ByteArrayInputStream(array); + XMLDecoder decoder = new XMLDecoder(input); + decoder.setExceptionListener(this); + validate(decoder); + try { + throw new Error("unexpected object" + decoder.readObject()); + } catch (ArrayIndexOutOfBoundsException exception) { + // expected exception + } + decoder.close(); + if (security) { + System.setSecurityManager(new SecurityManager()); + test(false); + } + } + + private String getFieldValue(String field) { + try { + return getClass().getField(field).get(this).toString(); + } catch (NoSuchFieldException exception) { + throw new Error("unexpected exception", exception); + } catch (IllegalAccessException exception) { + throw new Error("unexpected exception", exception); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestArray.java b/jdk/test/java/beans/XMLDecoder/spec/TestArray.java new file mode 100644 index 00000000000..7ae34a148e5 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestArray.java @@ -0,0 +1,86 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; +import java.lang.reflect.Array; + +public final class TestArray extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " -111\n" + + " 1111\n" + + " \n" + + " \n" + + " \n" + + " Hello, world!\n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestArray().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + Number[] numbers = getArray(Number.class, 2, decoder.readObject()); + if (!numbers[0].equals(Byte.valueOf("-111"))) { // NON-NLS: hardcoded in XML + throw new Error("unexpected byte value"); + } + if (!numbers[1].equals(Long.valueOf("1111"))) { // NON-NLS: hardcoded in XML + throw new Error("unexpected long value"); + } + + Object[] objects = getArray(Object.class, 3, decoder.readObject()); + if (objects[0] != null) { + throw new Error("unexpected first value"); + } + if (!objects[1].equals("Hello, world!")) { // NON-NLS: hardcoded in XML + throw new Error("unexpected string value"); + } + if (objects[2] != null) { + throw new Error("unexpected last value"); + } + } + + private static T[] getArray(Class component, int length, Object object) { + Class type = object.getClass(); + if (!type.isArray()) { + throw new Error("array expected"); + } + if (!type.getComponentType().equals(component)) { + throw new Error("unexpected component type"); + } + if (length != Array.getLength(object)) { + throw new Error("unexpected array length"); + } + return (T[]) object; + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestBoolean.java b/jdk/test/java/beans/XMLDecoder/spec/TestBoolean.java new file mode 100644 index 00000000000..e24d1fb4f72 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestBoolean.java @@ -0,0 +1,52 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestBoolean extends AbstractTest { + public static final String XML + = "\n" + + " true\n" + + " false\n" + + ""; + + public static void main(String[] args) { + new TestBoolean().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + if (!Boolean.TRUE.equals(decoder.readObject())) { + throw new Error("true expected"); + } + if (!Boolean.FALSE.equals(decoder.readObject())) { + throw new Error("false expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestByte.java b/jdk/test/java/beans/XMLDecoder/spec/TestByte.java new file mode 100644 index 00000000000..46693d94c0b --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestByte.java @@ -0,0 +1,56 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestByte extends AbstractTest { + public static final String XML + = "\n" + + " 0\n" + + " 127\n" + + " -128\n" + + ""; + + public static void main(String[] args) { + new TestByte().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate((byte) 0, decoder.readObject()); + validate(Byte.MAX_VALUE, decoder.readObject()); + validate(Byte.MIN_VALUE, decoder.readObject()); + } + + private static void validate(byte value, Object object) { + if (!object.equals(Byte.valueOf(value))) { + throw new Error("byte " + value + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestChar.java b/jdk/test/java/beans/XMLDecoder/spec/TestChar.java new file mode 100644 index 00000000000..cb29b713bce --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestChar.java @@ -0,0 +1,52 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestChar extends AbstractTest { + public static final String XML + = "\n" + + " X\n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestChar().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + if (!decoder.readObject().equals(Character.valueOf('X'))) { + throw new Error("unexpected character"); + } + if (!decoder.readObject().equals(Character.valueOf((char) 0x20))) { + throw new Error("unexpected character code"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestClass.java b/jdk/test/java/beans/XMLDecoder/spec/TestClass.java new file mode 100644 index 00000000000..2c16ba75f3c --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestClass.java @@ -0,0 +1,61 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestClass extends AbstractTest { + public static final String PREFIX = "javax.swing.colorchooser."; + public static final String INTERFACE = "ColorSelectionModel"; + public static final String PUBLIC_CLASS = "DefaultColorSelectionModel"; + public static final String PRIVATE_CLASS = "DiagramComponent"; + public static final String XML + = "\n" + + " " + PREFIX + INTERFACE + "\n" + + " " + PREFIX + PUBLIC_CLASS + "\n" + + " " + PREFIX + PRIVATE_CLASS + "\n" + + ""; + + public static void main(String[] args) { + new TestClass().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(PREFIX + INTERFACE, decoder.readObject()); + validate(PREFIX + PUBLIC_CLASS, decoder.readObject()); + validate(PREFIX + PRIVATE_CLASS, decoder.readObject()); + } + + private static void validate(String name, Object object) { + Class type = (Class) object; + if (!type.getName().equals(name)) { + throw new Error(name + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestDouble.java b/jdk/test/java/beans/XMLDecoder/spec/TestDouble.java new file mode 100644 index 00000000000..8e3d918c886 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestDouble.java @@ -0,0 +1,58 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestDouble extends AbstractTest { + public static final String XML + = "\n" + + " 0\n" + + " 1000\n" + + " -1.1e15\n" + + " 10.11e-123\n" + + ""; + + public static void main(String[] args) { + new TestDouble().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(0.0, decoder.readObject()); + validate(1000.0, decoder.readObject()); + validate(-1.1e15, decoder.readObject()); + validate(10.11e-123, decoder.readObject()); + } + + private static void validate(double value, Object object) { + if (!object.equals(Double.valueOf(value))) { + throw new Error("double " + value + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestFalse.java b/jdk/test/java/beans/XMLDecoder/spec/TestFalse.java new file mode 100644 index 00000000000..57a81b87740 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestFalse.java @@ -0,0 +1,48 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestFalse extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestFalse().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + if (!Boolean.FALSE.equals(decoder.readObject())) { + throw new Error("false expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestField.java b/jdk/test/java/beans/XMLDecoder/spec/TestField.java new file mode 100644 index 00000000000..aa84408814e --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestField.java @@ -0,0 +1,74 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestField extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " \n" + + " static postfix\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " postfix\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestField().test(true); + } + + public static String FIELD; + public String field; + + @Override + protected void validate(XMLDecoder decoder) { + FIELD = "static prefix"; + field = "prefix"; + decoder.setOwner(this); + validate(decoder, "static prefix"); + validate(decoder, "static postfix"); + validate(decoder, "prefix"); + validate(decoder, "postfix"); + } + + private static void validate(XMLDecoder decoder, String name) { + if (!decoder.readObject().equals(name)) { + throw new Error(name + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestFloat.java b/jdk/test/java/beans/XMLDecoder/spec/TestFloat.java new file mode 100644 index 00000000000..bb1287f8804 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestFloat.java @@ -0,0 +1,58 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestFloat extends AbstractTest { + public static final String XML + = "\n" + + " 0\n" + + " 100\n" + + " -1e15\n" + + " 100e-20\n" + + ""; + + public static void main(String[] args) { + new TestFloat().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(0.0f, decoder.readObject()); + validate(100.0f, decoder.readObject()); + validate(-1e15f, decoder.readObject()); + validate(100e-20f, decoder.readObject()); + } + + private static void validate(float value, Object object) { + if (!object.equals(Float.valueOf(value))) { + throw new Error("float " + value + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestInt.java b/jdk/test/java/beans/XMLDecoder/spec/TestInt.java new file mode 100644 index 00000000000..531c9447b64 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestInt.java @@ -0,0 +1,64 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestInt extends AbstractTest { + public static final String XML + = "\n" + + " 0\n" + + " 127\n" + + " -128\n" + + " 32767\n" + + " -32768\n" + + " 2147483647\n" + + " -2147483648\n" + + ""; + + public static void main(String[] args) { + new TestInt().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(0, decoder.readObject()); + validate((int) Byte.MAX_VALUE, decoder.readObject()); + validate((int) Byte.MIN_VALUE, decoder.readObject()); + validate((int) Short.MAX_VALUE, decoder.readObject()); + validate((int) Short.MIN_VALUE, decoder.readObject()); + validate(Integer.MAX_VALUE, decoder.readObject()); + validate(Integer.MIN_VALUE, decoder.readObject()); + } + + private static void validate(int value, Object object) { + if (!object.equals(Integer.valueOf(value))) { + throw new Error("int " + value + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestJava.java b/jdk/test/java/beans/XMLDecoder/spec/TestJava.java new file mode 100644 index 00000000000..5786195aaa0 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestJava.java @@ -0,0 +1,63 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestJava extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " \n" + + " Hello, world!\n" + + " \n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestJava().test(true); + } + + private String message; + + public void init(String message) { + this.message = message; + } + + @Override + protected void validate(XMLDecoder decoder) { + decoder.setOwner(this); + if (this != decoder.readObject()) { + throw new Error("owner should be the same"); + } + if (this.message == null) { + throw new Error("owner's method is not called"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestLong.java b/jdk/test/java/beans/XMLDecoder/spec/TestLong.java new file mode 100644 index 00000000000..16a7e324014 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestLong.java @@ -0,0 +1,68 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestLong extends AbstractTest { + public static final String XML + = "\n" + + " 0\n" + + " 127\n" + + " -128\n" + + " 32767\n" + + " -32768\n" + + " 2147483647\n" + + " -2147483648\n" + + " 9223372036854775807\n" + + " -9223372036854775808\n" + + ""; + + public static void main(String[] args) { + new TestLong().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(0L, decoder.readObject()); + validate((long) Byte.MAX_VALUE, decoder.readObject()); + validate((long) Byte.MIN_VALUE, decoder.readObject()); + validate((long) Short.MAX_VALUE, decoder.readObject()); + validate((long) Short.MIN_VALUE, decoder.readObject()); + validate((long) Integer.MAX_VALUE, decoder.readObject()); + validate((long) Integer.MIN_VALUE, decoder.readObject()); + validate(Long.MAX_VALUE, decoder.readObject()); + validate(Long.MIN_VALUE, decoder.readObject()); + } + + private static void validate(long value, Object object) { + if (!object.equals(Long.valueOf(value))) { + throw new Error("long " + value + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestMethod.java b/jdk/test/java/beans/XMLDecoder/spec/TestMethod.java new file mode 100644 index 00000000000..01ee5e1cf95 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestMethod.java @@ -0,0 +1,178 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestMethod extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestMethod().test(true); + } + + private NoSuchMethodException exception; + + @Override + public void exceptionThrown(Exception exception) { + if (this.exception != null) { + // only one exception allowed + super.exceptionThrown(exception); + } else if (exception instanceof NoSuchMethodException) { + // expected exception: ambiguous methods are found + this.exception = (NoSuchMethodException) exception; + } else { + super.exceptionThrown(exception); + } + } + + @Override + protected void validate(XMLDecoder decoder) { + this.exception = null; + validate(decoder, A.class); + validate(decoder, B.class); + validate(decoder, C.class); + validate(decoder, D.class); + validate(decoder, E.class); + if (this.exception == null) { + throw new Error("NoSuchMethodException expected"); + } + } + + private static void validate(XMLDecoder decoder, Class type) { + if (!type.equals(decoder.readObject().getClass())) { + throw new Error("unexpected class"); + } + } + + /** + * All ambiguous method declarations should fail. + */ + public static class A { + public void m(X x1, X x2) { + throw new Error("A.m(X,X) should not be called"); + } + + public void m(X x1, Y y2) { + throw new Error("A.m(X,Y) should not be called"); + } + + public void m(Y y1, X x2) { + throw new Error("A.m(Y,X) should not be called"); + } + } + + /** + * The most specific method in this case would be the second declaration. + */ + public static class B { + public void m(X x1, X x2) { + throw new Error("B.m(X,X) should not be called"); + } + + public void m(X x1, Y y2) { + // expected: B.m(X,Y) should be called + } + } + + /** + * The most specific method in this case would be the first declaration. + */ + public static class C { + public void m(Y y1, Y y2) { + // expected: C.m(Y,Y) should be called + } + + public void m(X x1, X x2) { + throw new Error("C.m(X,X) should not be called"); + } + } + + /** + * Same as the previous case but flip methods. + */ + public static class D { + public void m(X x1, X x2) { + throw new Error("D.m(X,X) should not be called"); + } + + public void m(Y y1, Y y2) { + // expected: D.m(Y,Y) should be called + } + } + + /** + * The method should be called with (Z,Z). + */ + public static class E { + public void m(X x1, X x2) { + // expected: E.m(X,X) should be called + } + } + + public static class X { + } + + public static class Y extends X { + } + + public static class Z extends Y { + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestNew.java b/jdk/test/java/beans/XMLDecoder/spec/TestNew.java new file mode 100644 index 00000000000..3e1e86d9951 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestNew.java @@ -0,0 +1,90 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; +import java.util.ArrayList; +import java.util.List; + +public final class TestNew extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " single\n" + + " \n" + + " \n" + + " first\n" + + " second\n" + + " third\n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestNew().test(true); + } + + private List list; + + public TestNew(String...messages) { + if (messages != null) { + this.list = new ArrayList(); + for (String message : messages) { + this.list.add(message); + } + } + } + + @Override + public boolean equals(Object object) { + if (object instanceof TestNew) { + TestNew test = (TestNew) object; + return (test.list == null) + ? this.list == null + : test.list.equals(this.list); + } + return false; + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(decoder.readObject()); + validate(decoder.readObject(), null); + validate(decoder.readObject(), "single"); + validate(decoder.readObject(), "first", "second", "third"); + } + + private static void validate(Object object, String...messages) { + if (!object.equals(new TestNew(messages))) { + throw new Error("expected object"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestNull.java b/jdk/test/java/beans/XMLDecoder/spec/TestNull.java new file mode 100644 index 00000000000..e14bf951e58 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestNull.java @@ -0,0 +1,48 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestNull extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestNull().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + if (null != decoder.readObject()) { + throw new Error("null value expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestObject.java b/jdk/test/java/beans/XMLDecoder/spec/TestObject.java new file mode 100644 index 00000000000..d9531b3d646 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestObject.java @@ -0,0 +1,84 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.SwingConstants; + +public final class TestObject extends AbstractTest { + public static final String XML // TODO + = "\n" + + " \n" + + " \n" + + " \n" + + " button\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " label\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestObject().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + JPanel panel = (JPanel) decoder.readObject(); + if (2 != panel.getComponents().length) { + throw new Error("unexpected component count"); + } + JButton button = (JButton) panel.getComponents()[0]; + if (!button.getText().equals("button")) { // NON-NLS: hardcoded in XML + throw new Error("unexpected button text"); + } + if (SwingConstants.CENTER != button.getVerticalAlignment()) { + throw new Error("unexpected vertical alignment"); + } + JLabel label = (JLabel) panel.getComponents()[1]; + if (!label.getText().equals("label")) { // NON-NLS: hardcoded in XML + throw new Error("unexpected label text"); + } + if (button != label.getLabelFor()) { + throw new Error("unexpected component"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestProperty.java b/jdk/test/java/beans/XMLDecoder/spec/TestProperty.java new file mode 100644 index 00000000000..e1f9c77e445 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestProperty.java @@ -0,0 +1,88 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestProperty extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " \n" + + " message\n" + + " \n" + + " \n" + + " \n" + + " indexed\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestProperty().test(true); + } + + private int index; + private String message; + + public String getMessage() { + return this.message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getIndexed(int index) { + if (this.index != index) { + throw new Error("unexpected index"); + } + return this.message; + } + + public void setIndexed(int index, String message) { + this.index = index; + this.message = message; + } + + @Override + protected void validate(XMLDecoder decoder) { + decoder.setOwner(this); + validate(decoder, "message"); + validate(decoder, "indexed"); + } + + private static void validate(XMLDecoder decoder, String name) { + if (!decoder.readObject().equals(name)) { + throw new Error(name + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestShort.java b/jdk/test/java/beans/XMLDecoder/spec/TestShort.java new file mode 100644 index 00000000000..99a0c57d357 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestShort.java @@ -0,0 +1,60 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestShort extends AbstractTest { + public static final String XML + = "\n" + + " 0\n" + + " 127\n" + + " -128\n" + + " 32767\n" + + " -32768\n" + + ""; + + public static void main(String[] args) { + new TestShort().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate((short) 0, decoder.readObject()); + validate((short) Byte.MAX_VALUE, decoder.readObject()); + validate((short) Byte.MIN_VALUE, decoder.readObject()); + validate(Short.MAX_VALUE, decoder.readObject()); + validate(Short.MIN_VALUE, decoder.readObject()); + } + + private static void validate(short value, Object object) { + if (!object.equals(Short.valueOf(value))) { + throw new Error("short " + value + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestString.java b/jdk/test/java/beans/XMLDecoder/spec/TestString.java new file mode 100644 index 00000000000..d41b1bbce38 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestString.java @@ -0,0 +1,60 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestString extends AbstractTest { + public static final String PREFIX = " prefix "; + public static final String POSTFIX = " postfix "; + public static final String XML + = "\n" + + " " + PREFIX + "\n" + + " " + POSTFIX + "\n" + + " " + PREFIX + POSTFIX + "\n" + + " " + PREFIX + "" + POSTFIX + "\n" + + ""; + + public static void main(String[] args) { + new TestString().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + validate(PREFIX, decoder.readObject()); + validate(POSTFIX, decoder.readObject()); + validate(PREFIX + POSTFIX, decoder.readObject()); + validate(PREFIX + '\u0000' + POSTFIX, decoder.readObject()); + } + + private static void validate(String name, Object object) { + if (!object.equals(name)) { + throw new Error(name + " expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestTrue.java b/jdk/test/java/beans/XMLDecoder/spec/TestTrue.java new file mode 100644 index 00000000000..934d28e4f63 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestTrue.java @@ -0,0 +1,48 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestTrue extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestTrue().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + if (!Boolean.TRUE.equals(decoder.readObject())) { + throw new Error("true expected"); + } + } +} diff --git a/jdk/test/java/beans/XMLDecoder/spec/TestVar.java b/jdk/test/java/beans/XMLDecoder/spec/TestVar.java new file mode 100644 index 00000000000..701edad79a8 --- /dev/null +++ b/jdk/test/java/beans/XMLDecoder/spec/TestVar.java @@ -0,0 +1,54 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @summary Tests element + * @author Sergey Malenkov + */ + +import java.beans.XMLDecoder; + +public final class TestVar extends AbstractTest { + public static final String XML + = "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + ""; + + public static void main(String[] args) { + new TestVar().test(true); + } + + @Override + protected void validate(XMLDecoder decoder) { + for (int i = 0; i < 3; i++) { + if (decoder != decoder.readObject()) { + throw new Error("decoder instance expected"); + } + } + } +} From 347b8afe5b76c3351eccbffa61bfc52b6c130014 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Mon, 22 Dec 2008 15:43:02 -0800 Subject: [PATCH 034/199] 6778657: Casts in SharedRuntime::f2i, f2l, d2i and d2l rely on undefined C++ behaviour Replaces SharedRuntime::f2i et al with versions that should work Reviewed-by: never --- .../src/share/vm/runtime/sharedRuntime.cpp | 74 +++++++----------- hotspot/test/compiler/6778657/Test.java | 75 +++++++++++++++++++ 2 files changed, 103 insertions(+), 46 deletions(-) create mode 100644 hotspot/test/compiler/6778657/Test.java diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp index 76067dc8ee1..cf69631c0bb 100644 --- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp +++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp @@ -192,64 +192,46 @@ JRT_END JRT_LEAF(jint, SharedRuntime::f2i(jfloat x)) - if (g_isnan(x)) {return 0;} - jlong lltmp = (jlong)x; - jint ltmp = (jint)lltmp; - if (ltmp == lltmp) { - return ltmp; - } else { - if (x < 0) { - return min_jint; - } else { - return max_jint; - } - } + if (g_isnan(x)) + return 0; + if (x >= (jfloat) max_jint) + return max_jint; + if (x <= (jfloat) min_jint) + return min_jint; + return (jint) x; JRT_END JRT_LEAF(jlong, SharedRuntime::f2l(jfloat x)) - if (g_isnan(x)) {return 0;} - jlong lltmp = (jlong)x; - if (lltmp != min_jlong) { - return lltmp; - } else { - if (x < 0) { - return min_jlong; - } else { - return max_jlong; - } - } + if (g_isnan(x)) + return 0; + if (x >= (jfloat) max_jlong) + return max_jlong; + if (x <= (jfloat) min_jlong) + return min_jlong; + return (jlong) x; JRT_END JRT_LEAF(jint, SharedRuntime::d2i(jdouble x)) - if (g_isnan(x)) {return 0;} - jlong lltmp = (jlong)x; - jint ltmp = (jint)lltmp; - if (ltmp == lltmp) { - return ltmp; - } else { - if (x < 0) { - return min_jint; - } else { - return max_jint; - } - } + if (g_isnan(x)) + return 0; + if (x >= (jdouble) max_jint) + return max_jint; + if (x <= (jdouble) min_jint) + return min_jint; + return (jint) x; JRT_END JRT_LEAF(jlong, SharedRuntime::d2l(jdouble x)) - if (g_isnan(x)) {return 0;} - jlong lltmp = (jlong)x; - if (lltmp != min_jlong) { - return lltmp; - } else { - if (x < 0) { - return min_jlong; - } else { - return max_jlong; - } - } + if (g_isnan(x)) + return 0; + if (x >= (jdouble) max_jlong) + return max_jlong; + if (x <= (jdouble) min_jlong) + return min_jlong; + return (jlong) x; JRT_END diff --git a/hotspot/test/compiler/6778657/Test.java b/hotspot/test/compiler/6778657/Test.java new file mode 100644 index 00000000000..4fdd33e9386 --- /dev/null +++ b/hotspot/test/compiler/6778657/Test.java @@ -0,0 +1,75 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + * + */ + +/* + * @test + * @bug 6778657 + * @summary Casts in SharedRuntime::f2i, f2l, d2i and d2l rely on undefined C++ behaviour + */ + +public class Test { + public static void check_f2i(int expect) { + float check = expect; + check *= 2; + int actual = (int) check; + if (actual != expect) + throw new RuntimeException("expecting " + expect + ", got " + actual); + } + + public static void check_f2l(long expect) { + float check = expect; + check *= 2; + long actual = (long) check; + if (actual != expect) + throw new RuntimeException("expecting " + expect + ", got " + actual); + } + + public static void check_d2i(int expect) { + double check = expect; + check *= 2; + int actual = (int) check; + if (actual != expect) + throw new RuntimeException("expecting " + expect + ", got " + actual); + } + + public static void check_d2l(long expect) { + double check = expect; + check *= 2; + long actual = (long) check; + if (actual != expect) + throw new RuntimeException("expecting " + expect + ", got " + actual); + } + + public static void main(String[] args) { + check_f2i(Integer.MAX_VALUE); + check_f2i(Integer.MIN_VALUE); + check_f2l(Long.MAX_VALUE); + check_f2l(Long.MIN_VALUE); + check_d2i(Integer.MAX_VALUE); + check_d2i(Integer.MIN_VALUE); + check_d2l(Long.MAX_VALUE); + check_d2l(Long.MIN_VALUE); + } +} + From 1ad664c0c9935bdacc6ace90508f117d257c3a12 Mon Sep 17 00:00:00 2001 From: Lillian Angel Date: Mon, 22 Dec 2008 16:53:34 -0800 Subject: [PATCH 035/199] 6778662: fixes 64-bits libraries directory search paths on linux Fixes 64-bits libraries directory search paths. Reviewed-by: never --- hotspot/src/os/linux/vm/os_linux.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index 3b8c0b4dc03..9bab8b56179 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -279,7 +279,11 @@ void os::init_system_properties_values() { * ... * 7: The default directories, normally /lib and /usr/lib. */ +#if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390)) +#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib" +#else #define DEFAULT_LIBPATH "/lib:/usr/lib" +#endif #define EXTENSIONS_DIR "/lib/ext" #define ENDORSED_DIR "/lib/endorsed" From d80f5c02659689a0827209a33fb8448169493de2 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Tue, 23 Dec 2008 06:16:53 -0800 Subject: [PATCH 036/199] 4997835: RFE: crash dump will only be created when running w/ -XX:+ShowMessageBoxOnError Using UseOSErrorReporting will provide both an hs_err file and a crash dump or debug launch and works better. Reviewed-by: xlu, acorn, poonam --- hotspot/src/share/vm/utilities/vmError.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp index d2a0161a7cc..a4d0cb0baf0 100644 --- a/hotspot/src/share/vm/utilities/vmError.cpp +++ b/hotspot/src/share/vm/utilities/vmError.cpp @@ -674,6 +674,11 @@ void VMError::report_and_die() { reset_signal_handlers(); } else { + // If UseOsErrorReporting we call this for each level of the call stack + // while searching for the exception handler. Only the first level needs + // to be reported. + if (UseOSErrorReporting && log_done) return; + // This is not the first error, see if it happened in a different thread // or in the same thread during error reporting. if (first_error_tid != mytid) { From 1880943a7f1fa3066e46be45ad2fa272756bf996 Mon Sep 17 00:00:00 2001 From: Erik Trimble Date: Tue, 23 Dec 2008 19:28:18 -0800 Subject: [PATCH 037/199] 6788797: Fork HS14 to HS15 - renumber Major and build numbers of JVM Fork Hotspot 15 - redo verisoning numbers Reviewed-by: jcoomes --- hotspot/make/hotspot_version | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index 4454f180b5b..ffda334c5de 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -33,9 +33,9 @@ # Don't put quotes (fail windows build). HOTSPOT_VM_COPYRIGHT=Copyright 2008 -HS_MAJOR_VER=14 +HS_MAJOR_VER=15 HS_MINOR_VER=0 -HS_BUILD_NUMBER=10 +HS_BUILD_NUMBER=01 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 From 1362b9fd1d5785d77c79a69f1cd27224b73ca9a9 Mon Sep 17 00:00:00 2001 From: Xiaobin Lu Date: Wed, 24 Dec 2008 13:06:09 -0800 Subject: [PATCH 038/199] 6787106: Hotspot 32 bit build fails on platforms having different definitions for intptr_t & int32_t Avoid casting between int32_t and intptr_t specifically for MasmAssembler::movptr in 32 bit platforms. Reviewed-by: jrose, kvn --- hotspot/src/cpu/x86/vm/assembler_x86.cpp | 14 ++++++------- .../src/cpu/x86/vm/c1_LIRAssembler_x86.cpp | 2 +- hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp | 20 +++++++++---------- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp | 6 +++--- hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp | 2 +- .../src/cpu/x86/vm/interpreterRT_x86_32.cpp | 2 +- hotspot/src/cpu/x86/vm/runtime_x86_32.cpp | 6 +++--- .../src/cpu/x86/vm/sharedRuntime_x86_32.cpp | 16 +++++++-------- .../src/cpu/x86/vm/stubGenerator_x86_64.cpp | 14 ++++++------- .../cpu/x86/vm/templateInterpreter_x86_32.cpp | 16 +++++++-------- .../src/cpu/x86/vm/templateTable_x86_32.cpp | 2 +- hotspot/src/cpu/x86/vm/x86_32.ad | 10 +++++----- .../vm/utilities/globalDefinitions_gcc.hpp | 4 +++- .../globalDefinitions_sparcWorks.hpp | 4 +++- 14 files changed, 61 insertions(+), 57 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp index edf0d3dbcaf..0802f7fb305 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp @@ -5212,15 +5212,15 @@ void MacroAssembler::pushptr(AddressLiteral src) { void MacroAssembler::reset_last_Java_frame(bool clear_fp, bool clear_pc) { // we must set sp to zero to clear frame - movptr(Address(r15_thread, JavaThread::last_Java_sp_offset()), (int32_t)NULL_WORD); + movptr(Address(r15_thread, JavaThread::last_Java_sp_offset()), NULL_WORD); // must clear fp, so that compiled frames are not confused; it is // possible that we need it only for debugging if (clear_fp) { - movptr(Address(r15_thread, JavaThread::last_Java_fp_offset()), (int32_t)NULL_WORD); + movptr(Address(r15_thread, JavaThread::last_Java_fp_offset()), NULL_WORD); } if (clear_pc) { - movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), (int32_t)NULL_WORD); + movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), NULL_WORD); } } @@ -5670,7 +5670,7 @@ void MacroAssembler::call_VM_base(Register oop_result, // get oop result if there is one and reset the value in the thread if (oop_result->is_valid()) { movptr(oop_result, Address(java_thread, JavaThread::vm_result_offset())); - movptr(Address(java_thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); + movptr(Address(java_thread, JavaThread::vm_result_offset()), NULL_WORD); verify_oop(oop_result, "broken oop in call_VM_base"); } } @@ -6426,13 +6426,13 @@ void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp, get_thread(java_thread); } // we must set sp to zero to clear frame - movptr(Address(java_thread, JavaThread::last_Java_sp_offset()), (int32_t)NULL_WORD); + movptr(Address(java_thread, JavaThread::last_Java_sp_offset()), NULL_WORD); if (clear_fp) { - movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), (int32_t)NULL_WORD); + movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), NULL_WORD); } if (clear_pc) - movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), (int32_t)NULL_WORD); + movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD); } diff --git a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp index 4300d196c28..cdf508fab01 100644 --- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp @@ -779,7 +779,7 @@ void LIR_Assembler::const2mem(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmi case T_OBJECT: // fall through case T_ARRAY: if (c->as_jobject() == NULL) { - __ movptr(as_Address(addr), (int32_t)NULL_WORD); + __ movptr(as_Address(addr), NULL_WORD); } else { if (is_literal_address(addr)) { ShouldNotReachHere(); diff --git a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp index eed2ad68de4..9d0d04579c8 100644 --- a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp +++ b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp @@ -78,10 +78,10 @@ int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address e movptr(rax, Address(thread, Thread::pending_exception_offset())); // make sure that the vm_results are cleared if (oop_result1->is_valid()) { - movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); + movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); } if (oop_result2->is_valid()) { - movptr(Address(thread, JavaThread::vm_result_2_offset()), (int32_t)NULL_WORD); + movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD); } if (frame_size() == no_frame_size) { leave(); @@ -96,12 +96,12 @@ int StubAssembler::call_RT(Register oop_result1, Register oop_result2, address e // get oop results if there are any and reset the values in the thread if (oop_result1->is_valid()) { movptr(oop_result1, Address(thread, JavaThread::vm_result_offset())); - movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); + movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); verify_oop(oop_result1); } if (oop_result2->is_valid()) { movptr(oop_result2, Address(thread, JavaThread::vm_result_2_offset())); - movptr(Address(thread, JavaThread::vm_result_2_offset()), (int32_t)NULL_WORD); + movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD); verify_oop(oop_result2); } return call_offset; @@ -728,8 +728,8 @@ void Runtime1::generate_handle_exception(StubAssembler *sasm, OopMapSet* oop_map // clear exception fields in JavaThread because they are no longer needed // (fields must be cleared because they are processed by GC otherwise) - __ movptr(Address(thread, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD); - __ movptr(Address(thread, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); + __ movptr(Address(thread, JavaThread::exception_oop_offset()), NULL_WORD); + __ movptr(Address(thread, JavaThread::exception_pc_offset()), NULL_WORD); // pop the stub frame off __ leave(); @@ -878,7 +878,7 @@ OopMapSet* Runtime1::generate_patching(StubAssembler* sasm, address target) { // load and clear pending exception __ movptr(rax, Address(thread, Thread::pending_exception_offset())); - __ movptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); + __ movptr(Address(thread, Thread::pending_exception_offset()), NULL_WORD); // check that there is really a valid exception __ verify_not_null_oop(rax); @@ -971,14 +971,14 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { // load pending exception oop into rax, __ movptr(exception_oop, Address(thread, Thread::pending_exception_offset())); // clear pending exception - __ movptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); + __ movptr(Address(thread, Thread::pending_exception_offset()), NULL_WORD); // load issuing PC (the return address for this stub) into rdx __ movptr(exception_pc, Address(rbp, 1*BytesPerWord)); // make sure that the vm_results are cleared (may be unnecessary) - __ movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); - __ movptr(Address(thread, JavaThread::vm_result_2_offset()), (int32_t)NULL_WORD); + __ movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); + __ movptr(Address(thread, JavaThread::vm_result_2_offset()), NULL_WORD); // verify that that there is really a valid exception in rax, __ verify_not_null_oop(exception_oop); diff --git a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp index 78f0f123833..3ae93f6c7f6 100644 --- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp @@ -133,7 +133,7 @@ void InterpreterMacroAssembler::load_earlyret_value(TosState state) { + in_ByteSize(wordSize)); switch (state) { case atos: movptr(rax, oop_addr); - movptr(oop_addr, (int32_t)NULL_WORD); + movptr(oop_addr, NULL_WORD); verify_oop(rax, state); break; case ltos: movl(rdx, val_addr1); // fall through @@ -148,7 +148,7 @@ void InterpreterMacroAssembler::load_earlyret_value(TosState state) { } // Clean up tos value in the thread object movl(tos_addr, (int32_t) ilgl); - movptr(val_addr, (int32_t)NULL_WORD); + movptr(val_addr, NULL_WORD); NOT_LP64(movl(val_addr1, (int32_t)NULL_WORD)); } @@ -944,7 +944,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) { movptr(obj_reg, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes ())); // Free entry - movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), (int32_t)NULL_WORD); + movptr(Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()), NULL_WORD); if (UseBiasedLocking) { biased_locking_exit(obj_reg, header_reg, done); diff --git a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp index 247f4ec3b47..57cd7f325fe 100644 --- a/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp +++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_32.hpp @@ -120,7 +120,7 @@ class InterpreterMacroAssembler: public MacroAssembler { void empty_expression_stack() { movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize)); // NULL last_sp until next java call - movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); } // Tagged stack helpers for swap and dup diff --git a/hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp b/hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp index 96a1c3073d4..08596f7c83e 100644 --- a/hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/interpreterRT_x86_32.cpp @@ -54,7 +54,7 @@ void InterpreterRuntime::SignatureHandlerGenerator::box(int from_offset, int to_ __ cmpptr(Address(from(), Interpreter::local_offset_in_bytes(from_offset)), (int32_t)NULL_WORD); // do not use temp() to avoid AGI Label L; __ jcc(Assembler::notZero, L); - __ movptr(temp(), ((int32_t)NULL_WORD)); + __ movptr(temp(), NULL_WORD); __ bind(L); __ movptr(Address(to(), to_offset * wordSize), temp()); } diff --git a/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp b/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp index 72870e11e07..6a92a2c053e 100644 --- a/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp @@ -129,11 +129,11 @@ void OptoRuntime::generate_exception_blob() { // Get the exception pc in case we are deoptimized __ movptr(rdx, Address(rcx, JavaThread::exception_pc_offset())); #ifdef ASSERT - __ movptr(Address(rcx, JavaThread::exception_handler_pc_offset()), (int32_t)NULL_WORD); - __ movptr(Address(rcx, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); + __ movptr(Address(rcx, JavaThread::exception_handler_pc_offset()), NULL_WORD); + __ movptr(Address(rcx, JavaThread::exception_pc_offset()), NULL_WORD); #endif // Clear the exception oop so GC no longer processes it as a root. - __ movptr(Address(rcx, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD); + __ movptr(Address(rcx, JavaThread::exception_oop_offset()), NULL_WORD); __ pop(rcx); diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp index 7c0aa6bf556..2b3d58c4367 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp @@ -1793,7 +1793,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, // reset handle block __ movptr(rcx, Address(thread, JavaThread::active_handles_offset())); - __ movptr(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD); + __ movptr(Address(rcx, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD); // Any exception pending? __ cmpptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD); @@ -1865,7 +1865,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, // Save pending exception around call to VM (which contains an EXCEPTION_MARK) __ pushptr(Address(thread, in_bytes(Thread::pending_exception_offset()))); - __ movptr(Address(thread, in_bytes(Thread::pending_exception_offset())), (int32_t)NULL_WORD); + __ movptr(Address(thread, in_bytes(Thread::pending_exception_offset())), NULL_WORD); // should be a peal @@ -2431,7 +2431,7 @@ void SharedRuntime::generate_deopt_blob() { __ get_thread(rdi); __ movptr(rdx, Address(rdi, JavaThread::exception_pc_offset())); __ movptr(Address(rbp, wordSize), rdx); - __ movptr(Address(rdi, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); + __ movptr(Address(rdi, JavaThread::exception_pc_offset()), NULL_WORD); #ifdef ASSERT // verify that there is really an exception oop in JavaThread @@ -2489,8 +2489,8 @@ void SharedRuntime::generate_deopt_blob() { __ jcc(Assembler::notEqual, noException); __ movptr(rax, Address(rcx, JavaThread::exception_oop_offset())); __ movptr(rdx, Address(rcx, JavaThread::exception_pc_offset())); - __ movptr(Address(rcx, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD); - __ movptr(Address(rcx, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); + __ movptr(Address(rcx, JavaThread::exception_oop_offset()), NULL_WORD); + __ movptr(Address(rcx, JavaThread::exception_pc_offset()), NULL_WORD); __ verify_oop(rax); @@ -2582,7 +2582,7 @@ void SharedRuntime::generate_deopt_blob() { rbx); // Make it walkable #else /* CC_INTERP */ // This value is corrected by layout_activation_impl - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable #endif /* CC_INTERP */ __ movptr(sp_temp, rsp); // pass to next frame @@ -2802,7 +2802,7 @@ void SharedRuntime::generate_uncommon_trap_blob() { rbx); // Make it walkable #else /* CC_INTERP */ // This value is corrected by layout_activation_impl - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD ); __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), rbx); // Make it walkable #endif /* CC_INTERP */ __ movptr(sp_temp, rsp); // pass to next frame @@ -3020,7 +3020,7 @@ static RuntimeStub* generate_resolve_blob(address destination, const char* name) // exception pending => remove activation and forward to exception handler __ get_thread(thread); - __ movptr(Address(thread, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); + __ movptr(Address(thread, JavaThread::vm_result_offset()), NULL_WORD); __ movptr(rax, Address(thread, Thread::pending_exception_offset())); __ jump(RuntimeAddress(StubRoutines::forward_exception_entry())); diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp index 33f6e88ee6d..6c2fb5694e8 100644 --- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp @@ -472,7 +472,7 @@ class StubGenerator: public StubCodeGenerator { // setup rax & rdx, remove return address & clear pending exception __ pop(rdx); __ movptr(rax, Address(r15_thread, Thread::pending_exception_offset())); - __ movptr(Address(r15_thread, Thread::pending_exception_offset()), (int)NULL_WORD); + __ movptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD); #ifdef ASSERT // make sure exception is set @@ -954,9 +954,9 @@ class StubGenerator: public StubCodeGenerator { __ jcc(Assembler::zero, exit); // if obj is NULL it is OK // Check if the oop is in the right area of memory __ movptr(c_rarg2, rax); - __ movptr(c_rarg3, (int64_t) Universe::verify_oop_mask()); + __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_mask()); __ andptr(c_rarg2, c_rarg3); - __ movptr(c_rarg3, (int64_t) Universe::verify_oop_bits()); + __ movptr(c_rarg3, (intptr_t) Universe::verify_oop_bits()); __ cmpptr(c_rarg2, c_rarg3); __ jcc(Assembler::notZero, error); @@ -969,9 +969,9 @@ class StubGenerator: public StubCodeGenerator { __ jcc(Assembler::zero, error); // if klass is NULL it is broken // Check if the klass is in the right area of memory __ mov(c_rarg2, rax); - __ movptr(c_rarg3, (int64_t) Universe::verify_klass_mask()); + __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask()); __ andptr(c_rarg2, c_rarg3); - __ movptr(c_rarg3, (int64_t) Universe::verify_klass_bits()); + __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits()); __ cmpptr(c_rarg2, c_rarg3); __ jcc(Assembler::notZero, error); @@ -980,9 +980,9 @@ class StubGenerator: public StubCodeGenerator { __ testptr(rax, rax); __ jcc(Assembler::zero, error); // if klass' klass is NULL it is broken // Check if the klass' klass is in the right area of memory - __ movptr(c_rarg3, (int64_t) Universe::verify_klass_mask()); + __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask()); __ andptr(rax, c_rarg3); - __ movptr(c_rarg3, (int64_t) Universe::verify_klass_bits()); + __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits()); __ cmpptr(rax, c_rarg3); __ jcc(Assembler::notZero, error); diff --git a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp index ca186af69a1..9b98c775370 100644 --- a/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp @@ -110,7 +110,7 @@ address TemplateInterpreterGenerator::generate_exception_handler_common(const ch if (message != NULL) { __ lea(rbx, ExternalAddress((address)message)); } else { - __ movptr(rbx, (int32_t)NULL_WORD); + __ movptr(rbx, NULL_WORD); } __ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::create_exception), rax, rbx); } @@ -123,7 +123,7 @@ address TemplateInterpreterGenerator::generate_exception_handler_common(const ch address TemplateInterpreterGenerator::generate_continuation_for(TosState state) { address entry = __ pc(); // NULL last_sp until next java call - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); __ dispatch_next(state); return entry; } @@ -176,7 +176,7 @@ address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, // Restore stack bottom in case i2c adjusted stack __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize)); // and NULL it as marker that rsp is now tos until next java call - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); __ restore_bcp(); __ restore_locals(); @@ -211,7 +211,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i // The stack is not extended by deopt but we must NULL last_sp as this // entry is like a "return". - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); __ restore_bcp(); __ restore_locals(); // handle exceptions @@ -1028,7 +1028,7 @@ address InterpreterGenerator::generate_native_entry(bool synchronized) { // reset handle block __ movptr(t, Address(thread, JavaThread::active_handles_offset())); - __ movptr(Address(t, JNIHandleBlock::top_offset_in_bytes()), (int32_t)NULL_WORD); + __ movptr(Address(t, JNIHandleBlock::top_offset_in_bytes()), NULL_WORD); // If result was an oop then unbox and save it in the frame { Label L; @@ -1488,7 +1488,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() { // Restore sp to interpreter_frame_last_sp even though we are going // to empty the expression stack for the exception processing. - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); // rax,: exception // rdx: return address/pc that threw exception __ restore_bcp(); // rsi points to call/send @@ -1608,7 +1608,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() { __ reset_last_Java_frame(rcx, true, true); // Restore the last_sp and null it out __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize)); - __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD); + __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), NULL_WORD); __ restore_bcp(); __ restore_locals(); @@ -1636,7 +1636,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() { // restore exception __ get_thread(rcx); __ movptr(rax, Address(rcx, JavaThread::vm_result_offset())); - __ movptr(Address(rcx, JavaThread::vm_result_offset()), (int32_t)NULL_WORD); + __ movptr(Address(rcx, JavaThread::vm_result_offset()), NULL_WORD); __ verify_oop(rax); // Inbetween activations - previous activation type unknown yet diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp index 5acd696b2b0..ee2ea5fd72c 100644 --- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp @@ -137,7 +137,7 @@ static void do_oop_store(InterpreterMacroAssembler* _masm, // Do the actual store // noreg means NULL if (val == noreg) { - __ movl(Address(rdx, 0), NULL_WORD); + __ movl(Address(rdx, 0), (int32_t)NULL_WORD); // No post barrier for NULL } else { __ movl(Address(rdx, 0), val); diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad index 5f6f8724adb..6f69cbd4999 100644 --- a/hotspot/src/cpu/x86/vm/x86_32.ad +++ b/hotspot/src/cpu/x86/vm/x86_32.ad @@ -3371,7 +3371,7 @@ encode %{ masm.movptr(Address(boxReg, 0), 3) ; // results in ST-before-CAS penalty masm.get_thread (scrReg) ; masm.movptr(boxReg, tmpReg); // consider: LEA box, [tmp-2] - masm.movptr(tmpReg, 0); // consider: xor vs mov + masm.movptr(tmpReg, NULL_WORD); // consider: xor vs mov if (os::is_MP()) { masm.lock(); } masm.cmpxchgptr(scrReg, Address(boxReg, ObjectMonitor::owner_offset_in_bytes()-2)) ; } else @@ -3387,7 +3387,7 @@ encode %{ if ((EmitSync & 64) == 0) { // Optimistic form: consider XORL tmpReg,tmpReg - masm.movptr(tmpReg, 0 ) ; + masm.movptr(tmpReg, NULL_WORD) ; } else { // Can suffer RTS->RTO upgrades on shared or cold $ lines // Test-And-CAS instead of CAS @@ -3587,7 +3587,7 @@ encode %{ masm.orptr(boxReg, Address (tmpReg, ObjectMonitor::EntryList_offset_in_bytes()-2)) ; masm.orptr(boxReg, Address (tmpReg, ObjectMonitor::cxq_offset_in_bytes()-2)) ; masm.jccb (Assembler::notZero, DONE_LABEL) ; - masm.movptr(Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), 0) ; + masm.movptr(Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), NULL_WORD) ; masm.jmpb (DONE_LABEL) ; } else { masm.xorptr(boxReg, Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2)) ; @@ -3596,7 +3596,7 @@ encode %{ masm.movptr(boxReg, Address (tmpReg, ObjectMonitor::EntryList_offset_in_bytes()-2)) ; masm.orptr(boxReg, Address (tmpReg, ObjectMonitor::cxq_offset_in_bytes()-2)) ; masm.jccb (Assembler::notZero, CheckSucc) ; - masm.movptr(Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), 0) ; + masm.movptr(Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), NULL_WORD) ; masm.jmpb (DONE_LABEL) ; } @@ -3644,7 +3644,7 @@ encode %{ // We currently use (3), although it's likely that switching to (2) // is correct for the future. - masm.movptr(Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), 0) ; + masm.movptr(Address (tmpReg, ObjectMonitor::owner_offset_in_bytes()-2), NULL_WORD) ; if (os::is_MP()) { if (VM_Version::supports_sse2() && 1 == FenceInstruction) { masm.mfence(); diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp index 417978f0891..48f2c7e886a 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp @@ -116,7 +116,9 @@ #ifdef _LP64 #define NULL_WORD 0L #else - #define NULL_WORD 0 + // Cast 0 to intptr_t rather than int32_t since they are not the same type + // on platforms such as Mac OS X. + #define NULL_WORD ((intptr_t)0) #endif #else #define NULL_WORD NULL diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp index f25364b72bf..62c8b92e255 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp @@ -115,7 +115,9 @@ #ifdef _LP64 #define NULL_WORD 0L #else - #define NULL_WORD 0 + // Cast 0 to intptr_t rather than int32_t since they are not the same type + // on some platforms. + #define NULL_WORD ((intptr_t)0) #endif #else #define NULL_WORD NULL From f05b009ce8bf16011f1bd0f08bec0796e49d15e7 Mon Sep 17 00:00:00 2001 From: Xiaobin Lu Date: Wed, 24 Dec 2008 19:13:53 -0800 Subject: [PATCH 039/199] 6781583: Hotspot build fails on linux 64 bit platform with gcc 4.3.2 Fixed the wrong cast between types since more restrictions are imposed by gcc 4.3.2 Reviewed-by: jcoomes, acorn, phh, never --- hotspot/src/cpu/sparc/vm/jni_sparc.h | 8 ++++- hotspot/src/cpu/x86/vm/jni_x86.h | 6 ++++ hotspot/src/os/linux/vm/os_linux.cpp | 32 +++++++++++-------- .../src/share/vm/classfile/javaClasses.cpp | 2 +- hotspot/src/share/vm/libadt/port.hpp | 11 ------- hotspot/src/share/vm/oops/constantPoolOop.cpp | 2 +- hotspot/src/share/vm/oops/oopsHierarchy.hpp | 3 ++ .../src/share/vm/opto/idealGraphPrinter.cpp | 2 +- hotspot/src/share/vm/prims/jvm.cpp | 3 +- hotspot/src/share/vm/runtime/arguments.cpp | 2 +- hotspot/src/share/vm/runtime/memprofiler.cpp | 27 ++++++++-------- hotspot/src/share/vm/runtime/safepoint.cpp | 2 +- hotspot/src/share/vm/runtime/synchronizer.cpp | 2 +- .../share/vm/utilities/globalDefinitions.hpp | 11 ++++++- hotspot/src/share/vm/utilities/ostream.cpp | 10 ++++-- hotspot/src/share/vm/utilities/vmError.hpp | 2 +- 16 files changed, 76 insertions(+), 49 deletions(-) diff --git a/hotspot/src/cpu/sparc/vm/jni_sparc.h b/hotspot/src/cpu/sparc/vm/jni_sparc.h index 7d2845e0162..33a494b6066 100644 --- a/hotspot/src/cpu/sparc/vm/jni_sparc.h +++ b/hotspot/src/cpu/sparc/vm/jni_sparc.h @@ -28,5 +28,11 @@ #define JNICALL typedef int jint; -typedef long long jlong; + +#ifdef _LP64 + typedef long jlong; +#else + typedef long long jlong; +#endif + typedef signed char jbyte; diff --git a/hotspot/src/cpu/x86/vm/jni_x86.h b/hotspot/src/cpu/x86/vm/jni_x86.h index 89f95e35749..625562bb3f2 100644 --- a/hotspot/src/cpu/x86/vm/jni_x86.h +++ b/hotspot/src/cpu/x86/vm/jni_x86.h @@ -32,7 +32,13 @@ #define JNICALL typedef int jint; + +#ifdef _LP64 + typedef long jlong; +#else typedef long long jlong; +#endif + #else #define JNIEXPORT __declspec(dllexport) #define JNIIMPORT __declspec(dllimport) diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index 3b8c0b4dc03..4bb6d26f4d2 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -1160,7 +1160,10 @@ void os::Linux::capture_initial_stack(size_t max_size) { /* 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 */ /* 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 */ - i = sscanf(s, "%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %lu %lu %ld %lu %lu %lu %lu", + i = sscanf(s, "%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld " + UINTX_FORMAT UINTX_FORMAT UINTX_FORMAT + " %lu " + UINTX_FORMAT UINTX_FORMAT UINTX_FORMAT, &state, /* 3 %c */ &ppid, /* 4 %d */ &pgrp, /* 5 %d */ @@ -1180,13 +1183,13 @@ void os::Linux::capture_initial_stack(size_t max_size) { &nice, /* 19 %ld */ &junk, /* 20 %ld */ &it_real, /* 21 %ld */ - &start, /* 22 %lu */ - &vsize, /* 23 %lu */ - &rss, /* 24 %ld */ + &start, /* 22 UINTX_FORMAT */ + &vsize, /* 23 UINTX_FORMAT */ + &rss, /* 24 UINTX_FORMAT */ &rsslim, /* 25 %lu */ - &scodes, /* 26 %lu */ - &ecode, /* 27 %lu */ - &stack_start); /* 28 %lu */ + &scodes, /* 26 UINTX_FORMAT */ + &ecode, /* 27 UINTX_FORMAT */ + &stack_start); /* 28 UINTX_FORMAT */ } if (i != 28 - 2) { @@ -2024,7 +2027,8 @@ void os::jvm_path(char *buf, jint len) { CAST_FROM_FN_PTR(address, os::jvm_path), dli_fname, sizeof(dli_fname), NULL); assert(ret != 0, "cannot locate libjvm"); - realpath(dli_fname, buf); + if (realpath(dli_fname, buf) == NULL) + return; if (strcmp(Arguments::sun_java_launcher(), "gamma") == 0) { // Support for the gamma launcher. Typical value for buf is @@ -2048,7 +2052,8 @@ void os::jvm_path(char *buf, jint len) { assert(strstr(p, "/libjvm") == p, "invalid library name"); p = strstr(p, "_g") ? "_g" : ""; - realpath(java_home_var, buf); + if (realpath(java_home_var, buf) == NULL) + return; sprintf(buf + strlen(buf), "/jre/lib/%s", cpu_arch); if (0 == access(buf, F_OK)) { // Use current module name "libjvm[_g].so" instead of @@ -2059,7 +2064,8 @@ void os::jvm_path(char *buf, jint len) { sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p); } else { // Go back to path of .so - realpath(dli_fname, buf); + if (realpath(dli_fname, buf) == NULL) + return; } } } @@ -4184,11 +4190,11 @@ static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time) { // Skip blank chars do s++; while (isspace(*s)); - count = sscanf(s,"%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu", - &idummy, &idummy, &idummy, &idummy, &idummy, &idummy, + count = sscanf(s,"%*c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu", + &idummy, &idummy, &idummy, &idummy, &idummy, &ldummy, &ldummy, &ldummy, &ldummy, &ldummy, &user_time, &sys_time); - if ( count != 13 ) return -1; + if ( count != 12 ) return -1; if (user_sys_cpu_time) { return ((jlong)sys_time + (jlong)user_time) * (1000000000 / clock_tics_per_sec); } else { diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp index ea68a366740..15677b9649e 100644 --- a/hotspot/src/share/vm/classfile/javaClasses.cpp +++ b/hotspot/src/share/vm/classfile/javaClasses.cpp @@ -866,7 +866,7 @@ char* java_lang_Throwable::print_stack_element_to_buffer(methodOop method, int b } nmethod* nm = method->code(); if (WizardMode && nm != NULL) { - sprintf(buf + (int)strlen(buf), "(nmethod %#x)", nm); + sprintf(buf + (int)strlen(buf), "(nmethod " PTR_FORMAT ")", (intptr_t)nm); } } diff --git a/hotspot/src/share/vm/libadt/port.hpp b/hotspot/src/share/vm/libadt/port.hpp index 70034d09bbd..68a84f1a4ce 100644 --- a/hotspot/src/share/vm/libadt/port.hpp +++ b/hotspot/src/share/vm/libadt/port.hpp @@ -34,17 +34,6 @@ #include #include #include -#undef bzero -inline void bzero(void *b, int len) { memset(b,0,len); } -#undef bcopy -inline void bcopy(const void *s, void *d, size_t len) { memmove(d,s,len); } -#undef bcmp -inline int bcmp(const void *s,const void *t,int len) { return memcmp(s,t,len);} -extern "C" unsigned long strtoul(const char *s, char **end, int base); - -// Definition for sys_errlist varies from Sun 4.1 & Solaris. -// We use the new Solaris definition. -#include // Access to the C++ class virtual function pointer // Put the class in the macro diff --git a/hotspot/src/share/vm/oops/constantPoolOop.cpp b/hotspot/src/share/vm/oops/constantPoolOop.cpp index 263b7bbe435..bc12c8f2ce2 100644 --- a/hotspot/src/share/vm/oops/constantPoolOop.cpp +++ b/hotspot/src/share/vm/oops/constantPoolOop.cpp @@ -962,7 +962,7 @@ static void print_cpool_bytes(jint cnt, u1 *bytes) { } case JVM_CONSTANT_Long: { u8 val = Bytes::get_Java_u8(bytes); - printf("long %lldl", *(jlong *) &val); + printf("long "INT64_FORMAT, *(jlong *) &val); ent_size = 8; idx++; // Long takes two cpool slots break; diff --git a/hotspot/src/share/vm/oops/oopsHierarchy.hpp b/hotspot/src/share/vm/oops/oopsHierarchy.hpp index 597dafe3de8..06c64d0e46f 100644 --- a/hotspot/src/share/vm/oops/oopsHierarchy.hpp +++ b/hotspot/src/share/vm/oops/oopsHierarchy.hpp @@ -126,8 +126,11 @@ public: operator jobject () const { return (jobject)obj(); } // from javaClasses.cpp operator JavaThread* () const { return (JavaThread*)obj(); } + +#ifndef _LP64 // from jvm.cpp operator jlong* () const { return (jlong*)obj(); } +#endif // from parNewGeneration and other things that want to get to the end of // an oop for stuff (like constMethodKlass.cpp, objArrayKlass.cpp) diff --git a/hotspot/src/share/vm/opto/idealGraphPrinter.cpp b/hotspot/src/share/vm/opto/idealGraphPrinter.cpp index 6dfc5fc9c8a..ad45b566eda 100644 --- a/hotspot/src/share/vm/opto/idealGraphPrinter.cpp +++ b/hotspot/src/share/vm/opto/idealGraphPrinter.cpp @@ -557,7 +557,7 @@ void IdealGraphPrinter::visit_node(Node *n, void *param) { // max. 2 chars allowed if (value >= -9 && value <= 99) { - sprintf(buffer, "%d", value); + sprintf(buffer, INT64_FORMAT, value); print_prop(short_name, buffer); } else { print_prop(short_name, "L"); diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp index 7f832341c6e..1835594ba0b 100644 --- a/hotspot/src/share/vm/prims/jvm.cpp +++ b/hotspot/src/share/vm/prims/jvm.cpp @@ -2475,7 +2475,8 @@ void jio_print(const char* s) { if (Arguments::vfprintf_hook() != NULL) { jio_fprintf(defaultStream::output_stream(), "%s", s); } else { - ::write(defaultStream::output_fd(), s, (int)strlen(s)); + // Make an unused local variable to avoid warning from gcc 4.x compiler. + size_t count = ::write(defaultStream::output_fd(), s, (int)strlen(s)); } } diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index b9c943d10b2..ce9725bedda 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1361,7 +1361,7 @@ void Arguments::set_aggressive_opts_flags() { // Feed the cache size setting into the JDK char buffer[1024]; - sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax); + sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax); add_property(buffer); } if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) { diff --git a/hotspot/src/share/vm/runtime/memprofiler.cpp b/hotspot/src/share/vm/runtime/memprofiler.cpp index 4d5ad533d83..f8a259f9be2 100644 --- a/hotspot/src/share/vm/runtime/memprofiler.cpp +++ b/hotspot/src/share/vm/runtime/memprofiler.cpp @@ -104,21 +104,22 @@ void MemProfiler::do_trace() { } // Print trace line in log - fprintf(_log_fp, "%6.1f,%5d,%5d,%6ld,%6ld,%6ld,%6ld,", - os::elapsedTime(), - Threads::number_of_threads(), - SystemDictionary::number_of_classes(), - Universe::heap()->used() / K, - Universe::heap()->capacity() / K, - Universe::heap()->permanent_used() / HWperKB, - Universe::heap()->permanent_capacity() / HWperKB); + fprintf(_log_fp, "%6.1f,%5d,%5d," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "," + UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",", + os::elapsedTime(), + Threads::number_of_threads(), + SystemDictionary::number_of_classes(), + Universe::heap()->used() / K, + Universe::heap()->capacity() / K, + Universe::heap()->permanent_used() / HWperKB, + Universe::heap()->permanent_capacity() / HWperKB); - fprintf(_log_fp, "%6ld,", CodeCache::capacity() / K); + fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K); - fprintf(_log_fp, "%6ld,%6ld,%6ld\n", - handles_memory_usage / K, - resource_memory_usage / K, - OopMapCache::memory_usage() / K); + fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",%6ld\n", + handles_memory_usage / K, + resource_memory_usage / K, + OopMapCache::memory_usage() / K); fflush(_log_fp); } diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp index 2a3b838f6e5..c13af643a85 100644 --- a/hotspot/src/share/vm/runtime/safepoint.cpp +++ b/hotspot/src/share/vm/runtime/safepoint.cpp @@ -730,7 +730,7 @@ void SafepointSynchronize::print_safepoint_timeout(SafepointTimeoutReason reason if (DieOnSafepointTimeout) { char msg[1024]; VM_Operation *op = VMThread::vm_operation(); - sprintf(msg, "Safepoint sync time longer than %d ms detected when executing %s.", + sprintf(msg, "Safepoint sync time longer than " INTX_FORMAT "ms detected when executing %s.", SafepointTimeoutDelay, op != NULL ? op->name() : "no vm operation"); fatal(msg); diff --git a/hotspot/src/share/vm/runtime/synchronizer.cpp b/hotspot/src/share/vm/runtime/synchronizer.cpp index aeb66980add..e0f3cfe04bb 100644 --- a/hotspot/src/share/vm/runtime/synchronizer.cpp +++ b/hotspot/src/share/vm/runtime/synchronizer.cpp @@ -424,7 +424,7 @@ void ObjectSynchronizer::Initialize () { // asserts is that error message -- often something about negative array // indices -- is opaque. -#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%X\n", tag); } +#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @" INTPTR_FORMAT "\n", (intptr_t)tag); } void ObjectMonitor::ctAsserts() { CTASSERT(offset_of (ObjectMonitor, _header) == 0); diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp index f87bfad69ac..93b2a2b6745 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp @@ -1087,15 +1087,24 @@ inline int build_int_from_shorts( jushort low, jushort high ) { // Format macros that allow the field width to be specified. The width must be // a string literal (e.g., "8") or a macro that evaluates to one. #ifdef _LP64 +#define UINTX_FORMAT_W(width) UINT64_FORMAT_W(width) #define SSIZE_FORMAT_W(width) INT64_FORMAT_W(width) #define SIZE_FORMAT_W(width) UINT64_FORMAT_W(width) #else +#define UINTX_FORMAT_W(width) UINT32_FORMAT_W(width) #define SSIZE_FORMAT_W(width) INT32_FORMAT_W(width) #define SIZE_FORMAT_W(width) UINT32_FORMAT_W(width) #endif // _LP64 // Format pointers and size_t (or size_t-like integer types) which change size -// between 32- and 64-bit. +// between 32- and 64-bit. The pointer format theoretically should be "%p", +// however, it has different output on different platforms. On Windows, the data +// will be padded with zeros automatically. On Solaris, we can use "%016p" & +// "%08p" on 64 bit & 32 bit platforms to make the data padded with extra zeros. +// On Linux, "%016p" or "%08p" is not be allowed, at least on the latest GCC +// 4.3.2. So we have to use "%016x" or "%08x" to simulate the printing format. +// GCC 4.3.2, however requires the data to be converted to "intptr_t" when +// using "%x". #ifdef _LP64 #define PTR_FORMAT PTR64_FORMAT #define UINTX_FORMAT UINT64_FORMAT diff --git a/hotspot/src/share/vm/utilities/ostream.cpp b/hotspot/src/share/vm/utilities/ostream.cpp index 8770bed52ca..65d18802ba2 100644 --- a/hotspot/src/share/vm/utilities/ostream.cpp +++ b/hotspot/src/share/vm/utilities/ostream.cpp @@ -300,7 +300,10 @@ fileStream::fileStream(const char* file_name) { } void fileStream::write(const char* s, size_t len) { - if (_file != NULL) fwrite(s, 1, len, _file); + if (_file != NULL) { + // Make an unused local variable to avoid warning from gcc 4.x compiler. + size_t count = fwrite(s, 1, len, _file); + } update_position(s, len); } @@ -328,7 +331,10 @@ fdStream::~fdStream() { } void fdStream::write(const char* s, size_t len) { - if (_fd != -1) ::write(_fd, s, (int)len); + if (_fd != -1) { + // Make an unused local variable to avoid warning from gcc 4.x compiler. + size_t count = ::write(_fd, s, (int)len); + } update_position(s, len); } diff --git a/hotspot/src/share/vm/utilities/vmError.hpp b/hotspot/src/share/vm/utilities/vmError.hpp index 414bc7f21eb..8e618d91462 100644 --- a/hotspot/src/share/vm/utilities/vmError.hpp +++ b/hotspot/src/share/vm/utilities/vmError.hpp @@ -50,7 +50,7 @@ class VMError : public StackObj { // additional info for VM internal errors const char * _filename; - int _lineno; + size_t _lineno; // used by fatal error handler int _current_step; From aa3da7789a0dfaa0b95a7b8e31382bf11fdcb765 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 25 Dec 2008 20:43:44 +0300 Subject: [PATCH 040/199] 6736248: EnumEditor bug. Class check incorrect Reviewed-by: rupashka, alexp --- .../classes/sun/beans/editors/EnumEditor.java | 2 +- .../PropertyEditor/TestEnumSubclass.java | 50 +++++++++++++++++ .../PropertyEditor/TestEnumSubclassJava.java | 49 +++++++++++++++++ .../PropertyEditor/TestEnumSubclassNull.java | 49 +++++++++++++++++ .../PropertyEditor/TestEnumSubclassValue.java | 53 +++++++++++++++++++ 5 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 jdk/test/java/beans/PropertyEditor/TestEnumSubclass.java create mode 100644 jdk/test/java/beans/PropertyEditor/TestEnumSubclassJava.java create mode 100644 jdk/test/java/beans/PropertyEditor/TestEnumSubclassNull.java create mode 100644 jdk/test/java/beans/PropertyEditor/TestEnumSubclassValue.java diff --git a/jdk/src/share/classes/sun/beans/editors/EnumEditor.java b/jdk/src/share/classes/sun/beans/editors/EnumEditor.java index 6a465785c17..201c6f24b81 100644 --- a/jdk/src/share/classes/sun/beans/editors/EnumEditor.java +++ b/jdk/src/share/classes/sun/beans/editors/EnumEditor.java @@ -67,7 +67,7 @@ public final class EnumEditor implements PropertyEditor { } public void setValue( Object value ) { - if ( ( value != null ) && ( this.type != value.getClass() ) ) { + if ( ( value != null ) && !this.type.isInstance( value ) ) { throw new IllegalArgumentException( "Unsupported value: " + value ); } Object oldValue; diff --git a/jdk/test/java/beans/PropertyEditor/TestEnumSubclass.java b/jdk/test/java/beans/PropertyEditor/TestEnumSubclass.java new file mode 100644 index 00000000000..f1d5f78c5d2 --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/TestEnumSubclass.java @@ -0,0 +1,50 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6736248 + * @summary Tests PropertyEditor for value of subtype Enum with security manager + * @author Sergey Malenkov + */ + +public class TestEnumSubclass { + public static void main(String[] args) { + System.setSecurityManager(new SecurityManager()); + new TestEditor(Operation.class); + } + + public enum Operation { + PLUS { + public int run(int i, int j) { + return i + j; + } + }, + MINUS { + public int run(int i, int j) { + return i - j; + } + }; + public abstract int run(int i, int j); + } +} diff --git a/jdk/test/java/beans/PropertyEditor/TestEnumSubclassJava.java b/jdk/test/java/beans/PropertyEditor/TestEnumSubclassJava.java new file mode 100644 index 00000000000..296d1f31d1c --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/TestEnumSubclassJava.java @@ -0,0 +1,49 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6736248 + * @summary Tests PropertyEditor for value of subtype Enum + * @author Sergey Malenkov + */ + +public class TestEnumSubclassJava { + public static void main(String[] args) { + new TestEditor(Operation.class).testJava(Operation.PLUS); + } + + public enum Operation { + PLUS { + public int run(int i, int j) { + return i + j; + } + }, + MINUS { + public int run(int i, int j) { + return i - j; + } + }; + public abstract int run(int i, int j); + } +} diff --git a/jdk/test/java/beans/PropertyEditor/TestEnumSubclassNull.java b/jdk/test/java/beans/PropertyEditor/TestEnumSubclassNull.java new file mode 100644 index 00000000000..2a407bf9998 --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/TestEnumSubclassNull.java @@ -0,0 +1,49 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6736248 + * @summary Tests PropertyEditor for null value of subtype Enum + * @author Sergey Malenkov + */ + +public class TestEnumSubclassNull { + public static void main(String[] args) { + new TestEditor(Operation.class).testJava(null); + } + + public enum Operation { + PLUS { + public int run(int i, int j) { + return i + j; + } + }, + MINUS { + public int run(int i, int j) { + return i - j; + } + }; + public abstract int run(int i, int j); + } +} diff --git a/jdk/test/java/beans/PropertyEditor/TestEnumSubclassValue.java b/jdk/test/java/beans/PropertyEditor/TestEnumSubclassValue.java new file mode 100644 index 00000000000..5c0e970f569 --- /dev/null +++ b/jdk/test/java/beans/PropertyEditor/TestEnumSubclassValue.java @@ -0,0 +1,53 @@ +/* + * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +/* + * @test + * @bug 6736248 + * @summary Tests PropertyEditor for value of subtype Enum + * @author Sergey Malenkov + */ + +public class TestEnumSubclassValue { + public static void main(String[] args) { + TestEditor test = new TestEditor(Operation.class); + test.testValue(Operation.PLUS, "PLUS"); + test.testValue(null, null); + test.testText("MINUS", Operation.MINUS); + test.testText(null, null); + } + + public enum Operation { + PLUS { + public int run(int i, int j) { + return i + j; + } + }, + MINUS { + public int run(int i, int j) { + return i - j; + } + }; + public abstract int run(int i, int j); + } +} From 315de68fc04eacbce3098dec0458ebe71480fe5e Mon Sep 17 00:00:00 2001 From: Karen Kinnear Date: Mon, 5 Jan 2009 13:44:03 -0500 Subject: [PATCH 041/199] 4670071: loadClassInternal is too restrictive VM support for deadlock fix. Library fix in 4735126. See API proposal. Reviewed-by: dholmes, blacklion --- .../src/share/vm/classfile/javaClasses.cpp | 18 ++ .../src/share/vm/classfile/javaClasses.hpp | 3 + .../share/vm/classfile/systemDictionary.cpp | 161 +++++++++++------- .../share/vm/classfile/systemDictionary.hpp | 1 + hotspot/src/share/vm/classfile/vmSymbols.hpp | 4 + hotspot/src/share/vm/runtime/globals.hpp | 17 +- 6 files changed, 138 insertions(+), 66 deletions(-) diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp index 15677b9649e..385e6a16e7f 100644 --- a/hotspot/src/share/vm/classfile/javaClasses.cpp +++ b/hotspot/src/share/vm/classfile/javaClasses.cpp @@ -441,6 +441,7 @@ oop java_lang_Class::primitive_mirror(BasicType t) { bool java_lang_Class::offsets_computed = false; int java_lang_Class::classRedefinedCount_offset = -1; +int java_lang_Class::parallelCapable_offset = -1; void java_lang_Class::compute_offsets() { assert(!offsets_computed, "offsets should be initialized only once"); @@ -451,6 +452,23 @@ void java_lang_Class::compute_offsets() { // so don't go fatal. compute_optional_offset(classRedefinedCount_offset, k, vmSymbols::classRedefinedCount_name(), vmSymbols::int_signature()); + + // The field indicating parallelCapable (parallelLockMap) is only present starting in 7, + klassOop k1 = SystemDictionary::classloader_klass(); + compute_optional_offset(parallelCapable_offset, + k1, vmSymbols::parallelCapable_name(), vmSymbols::concurrenthashmap_signature()); +} + +// For class loader classes, parallelCapable defined +// based on non-null field +// Written to by java.lang.ClassLoader, vm only reads this field, doesn't set it +bool java_lang_Class::parallelCapable(oop class_loader) { + if (!JDK_Version::is_gte_jdk17x_version() + || parallelCapable_offset == -1) { + // Default for backward compatibility is false + return false; + } + return (class_loader->obj_field(parallelCapable_offset) != NULL); } int java_lang_Class::classRedefinedCount(oop the_class_mirror) { diff --git a/hotspot/src/share/vm/classfile/javaClasses.hpp b/hotspot/src/share/vm/classfile/javaClasses.hpp index 933d5b82d83..612a0013562 100644 --- a/hotspot/src/share/vm/classfile/javaClasses.hpp +++ b/hotspot/src/share/vm/classfile/javaClasses.hpp @@ -141,6 +141,7 @@ class java_lang_Class : AllStatic { static void compute_offsets(); static bool offsets_computed; static int classRedefinedCount_offset; + static int parallelCapable_offset; public: // Instance creation @@ -168,6 +169,8 @@ class java_lang_Class : AllStatic { // Support for classRedefinedCount field static int classRedefinedCount(oop the_class_mirror); static void set_classRedefinedCount(oop the_class_mirror, int value); + // Support for parallelCapable field + static bool parallelCapable(oop the_class_mirror); // Debugging friend class JavaClasses; friend class instanceKlass; // verification code accesses offsets diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp index 0908e1c8785..40096a26988 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp @@ -89,6 +89,14 @@ bool SystemDictionary::is_internal_format(symbolHandle class_name) { #endif +// ---------------------------------------------------------------------------- +// Parallel class loading check + +bool SystemDictionary::is_parallelCapable(Handle class_loader) { + if (UnsyncloadClass || class_loader.is_null()) return true; + if (AlwaysLockClassLoader) return false; + return java_lang_Class::parallelCapable(class_loader()); +} // ---------------------------------------------------------------------------- // Resolving of classes @@ -196,7 +204,8 @@ klassOop SystemDictionary::resolve_array_class_or_null(symbolHandle class_name, // super-class callers: // ClassFileParser - for defineClass & jvmtiRedefineClasses // load_shared_class - while loading a class from shared archive -// resolve_instance_class_or_fail: +// resolve_instance_class_or_null: +// via: handle_parallel_super_load // when resolving a class that has an existing placeholder with // a saved superclass [i.e. a defineClass is currently in progress] // if another thread is trying to resolve the class, it must do @@ -283,12 +292,9 @@ klassOop SystemDictionary::resolve_super_or_fail(symbolHandle child_name, if (probe && probe->check_seen_thread(THREAD, PlaceholderTable::LOAD_SUPER)) { throw_circularity_error = true; } - - // add placeholder entry even if error - callers will remove on error + } + if (!throw_circularity_error) { PlaceholderEntry* newprobe = placeholders()->find_and_add(p_index, p_hash, child_name, class_loader, PlaceholderTable::LOAD_SUPER, class_name, THREAD); - if (throw_circularity_error) { - newprobe->remove_seen_thread(THREAD, PlaceholderTable::LOAD_SUPER); - } } } if (throw_circularity_error) { @@ -325,7 +331,6 @@ klassOop SystemDictionary::resolve_super_or_fail(symbolHandle child_name, return superk_h(); } - void SystemDictionary::validate_protection_domain(instanceKlassHandle klass, Handle class_loader, Handle protection_domain, @@ -421,7 +426,7 @@ void SystemDictionary::double_lock_wait(Handle lockObject, TRAPS) { bool calledholdinglock = ObjectSynchronizer::current_thread_holds_lock((JavaThread*)THREAD, lockObject); assert(calledholdinglock,"must hold lock for notify"); - assert(!UnsyncloadClass, "unexpected double_lock_wait"); + assert((!(lockObject() == _system_loader_lock_obj) && !is_parallelCapable(lockObject)), "unexpected double_lock_wait"); ObjectSynchronizer::notifyall(lockObject, THREAD); intptr_t recursions = ObjectSynchronizer::complete_exit(lockObject, THREAD); SystemDictionary_lock->wait(); @@ -439,7 +444,7 @@ void SystemDictionary::double_lock_wait(Handle lockObject, TRAPS) { // even in non-circularity situations. // Note: only one thread can define the class, but multiple can resolve // Note: must call resolve_super_or_fail even if null super - -// to force placeholder entry creation for this class +// to force placeholder entry creation for this class for circularity detection // Caller must check for pending exception // Returns non-null klassOop if other thread has completed load // and we are done, @@ -477,9 +482,9 @@ instanceKlassHandle SystemDictionary::handle_parallel_super_load( SystemDictionary_lock->notify_all(); } - // UnsyncloadClass does NOT wait for parallel superclass loads to complete - // Bootstrap classloader does wait for parallel superclass loads - if (UnsyncloadClass) { + // parallelCapable class loaders do NOT wait for parallel superclass loads to complete + // Serial class loaders and bootstrap classloader do wait for superclass loads + if (!class_loader.is_null() && is_parallelCapable(class_loader)) { MutexLocker mu(SystemDictionary_lock, THREAD); // Check if classloading completed while we were loading superclass or waiting klassOop check = find_class(d_index, d_hash, name, class_loader); @@ -566,10 +571,10 @@ klassOop SystemDictionary::resolve_instance_class_or_null(symbolHandle class_nam // This lock must be acquired here so the waiter will find // any successful result in the SystemDictionary and not attempt // the define - // Classloaders that support parallelism, e.g. bootstrap classloader, + // ParallelCapable Classloaders and the bootstrap classloader, // or all classloaders with UnsyncloadClass do not acquire lock here bool DoObjectLock = true; - if (UnsyncloadClass || (class_loader.is_null())) { + if (is_parallelCapable(class_loader)) { DoObjectLock = false; } @@ -627,6 +632,9 @@ klassOop SystemDictionary::resolve_instance_class_or_null(symbolHandle class_nam // Five cases: // All cases need to prevent modifying bootclasssearchpath // in parallel with a classload of same classname + // Redefineclasses uses existence of the placeholder for the duration + // of the class load to prevent concurrent redefinition of not completely + // defined classes. // case 1. traditional classloaders that rely on the classloader object lock // - no other need for LOAD_INSTANCE // case 2. traditional classloaders that break the classloader object lock @@ -642,12 +650,13 @@ klassOop SystemDictionary::resolve_instance_class_or_null(symbolHandle class_nam // This classloader supports parallelism at the classloader level, // but only allows a single load of a class/classloader pair. // No performance benefit and no deadlock issues. - // case 5. Future: parallel user level classloaders - without objectLocker + // case 5. parallelCapable user level classloaders - without objectLocker + // Allow parallel classloading of a class/classloader pair symbolHandle nullsymbolHandle; bool throw_circularity_error = false; { MutexLocker mu(SystemDictionary_lock, THREAD); - if (!UnsyncloadClass) { + if (class_loader.is_null() || !is_parallelCapable(class_loader)) { PlaceholderEntry* oldprobe = placeholders()->get_entry(p_index, p_hash, name, class_loader); if (oldprobe) { // only need check_seen_thread once, not on each loop @@ -681,25 +690,25 @@ klassOop SystemDictionary::resolve_instance_class_or_null(symbolHandle class_nam } } // All cases: add LOAD_INSTANCE - // case 3: UnsyncloadClass: allow competing threads to try + // case 3: UnsyncloadClass || case 5: parallelCapable: allow competing threads to try // LOAD_INSTANCE in parallel // add placeholder entry even if error - callers will remove on error - if (!class_has_been_loaded) { + if (!throw_circularity_error && !class_has_been_loaded) { PlaceholderEntry* newprobe = placeholders()->find_and_add(p_index, p_hash, name, class_loader, PlaceholderTable::LOAD_INSTANCE, nullsymbolHandle, THREAD); - if (throw_circularity_error) { - newprobe->remove_seen_thread(THREAD, PlaceholderTable::LOAD_INSTANCE); - } // For class loaders that do not acquire the classloader object lock, // if they did not catch another thread holding LOAD_INSTANCE, // need a check analogous to the acquire ObjectLocker/find_class // i.e. now that we hold the LOAD_INSTANCE token on loading this class/CL // one final check if the load has already completed + // class loaders holding the ObjectLock shouldn't find the class here klassOop check = find_class(d_index, d_hash, name, class_loader); if (check != NULL) { // Klass is already loaded, so just return it k = instanceKlassHandle(THREAD, check); class_has_been_loaded = true; newprobe->remove_seen_thread(THREAD, PlaceholderTable::LOAD_INSTANCE); + placeholders()->find_and_remove(p_index, p_hash, name, class_loader, THREAD); + SystemDictionary_lock->notify_all(); } } } @@ -714,18 +723,14 @@ klassOop SystemDictionary::resolve_instance_class_or_null(symbolHandle class_nam // Do actual loading k = load_instance_class(name, class_loader, THREAD); - // In custom class loaders, the usual findClass calls - // findLoadedClass, which directly searches the SystemDictionary, then - // defineClass. If these are not atomic with respect to other threads, - // the findLoadedClass can fail, but the defineClass can get a - // LinkageError:: duplicate class definition. + // For UnsyncloadClass and AllowParallelDefineClass only: // If they got a linkageError, check if a parallel class load succeeded. // If it did, then for bytecode resolution the specification requires // that we return the same result we did for the other thread, i.e. the // successfully loaded instanceKlass - // Note: Class can not be unloaded as long as any classloader refs exist // Should not get here for classloaders that support parallelism - // with the new cleaner mechanism, e.g. bootstrap classloader + // with the new cleaner mechanism + // Bootstrap goes through here to allow for an extra guarantee check if (UnsyncloadClass || (class_loader.is_null())) { if (k.is_null() && HAS_PENDING_EXCEPTION && PENDING_EXCEPTION->is_a(SystemDictionary::linkageError_klass())) { @@ -955,10 +960,10 @@ klassOop SystemDictionary::parse_stream(symbolHandle class_name, instanceKlassHandle k = ClassFileParser(st).parseClassFile(class_name, class_loader, protection_domain, - cp_patches, parsed_name, THREAD); + // We don't redefine the class, so we just need to clean up whether there // was an error or not (don't want to modify any system dictionary // data structures). @@ -1013,11 +1018,17 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name, ClassFileStream* st, TRAPS) { - // Make sure we are synchronized on the class loader before we initiate - // loading. + // Classloaders that support parallelism, e.g. bootstrap classloader, + // or all classloaders with UnsyncloadClass do not acquire lock here + bool DoObjectLock = true; + if (is_parallelCapable(class_loader)) { + DoObjectLock = false; + } + + // Make sure we are synchronized on the class loader before we proceed Handle lockObject = compute_loader_lock_object(class_loader, THREAD); check_loader_lock_contention(lockObject, THREAD); - ObjectLocker ol(lockObject, THREAD); + ObjectLocker ol(lockObject, THREAD, DoObjectLock); symbolHandle parsed_name; @@ -1069,7 +1080,13 @@ klassOop SystemDictionary::resolve_from_stream(symbolHandle class_name, "external class name format used internally"); // Add class just loaded - define_instance_class(k, THREAD); + // If a class loader supports parallel classloading handle parallel define requests + // find_or_define_instance_class may return a different instanceKlass + if (is_parallelCapable(class_loader)) { + k = find_or_define_instance_class(class_name, class_loader, k, THREAD); + } else { + define_instance_class(k, THREAD); + } } // If parsing the class file or define_instance_class failed, we @@ -1299,7 +1316,7 @@ instanceKlassHandle SystemDictionary::load_instance_class(symbolHandle class_nam } #endif // KERNEL - // find_or_define_instance_class may return a different k + // find_or_define_instance_class may return a different instanceKlass if (!k.is_null()) { k = find_or_define_instance_class(class_name, class_loader, k, CHECK_(nh)); } @@ -1316,14 +1333,24 @@ instanceKlassHandle SystemDictionary::load_instance_class(symbolHandle class_nam KlassHandle spec_klass (THREAD, SystemDictionary::classloader_klass()); - // UnsyncloadClass option means don't synchronize loadClass() calls. - // loadClassInternal() is synchronized and public loadClass(String) is not. - // This flag is for diagnostic purposes only. It is risky to call + // Call public unsynchronized loadClass(String) directly for all class loaders + // for parallelCapable class loaders. JDK >=7, loadClass(String, boolean) will + // acquire a class-name based lock rather than the class loader object lock. + // JDK < 7 already acquire the class loader lock in loadClass(String, boolean), + // so the call to loadClassInternal() was not required. + // + // UnsyncloadClass flag means both call loadClass(String) and do + // not acquire the class loader lock even for class loaders that are + // not parallelCapable. This was a risky transitional + // flag for diagnostic purposes only. It is risky to call // custom class loaders without synchronization. // WARNING If a custom class loader does NOT synchronizer findClass, or callers of - // findClass, this flag risks unexpected timing bugs in the field. + // findClass, the UnsyncloadClass flag risks unexpected timing bugs in the field. // Do NOT assume this will be supported in future releases. - if (!UnsyncloadClass && has_loadClassInternal()) { + // + // Added MustCallLoadClassInternal in case we discover in the field + // a customer that counts on this call + if (MustCallLoadClassInternal && has_loadClassInternal()) { JavaCalls::call_special(&result, class_loader, spec_klass, @@ -1365,14 +1392,17 @@ void SystemDictionary::define_instance_class(instanceKlassHandle k, TRAPS) { Handle class_loader_h(THREAD, k->class_loader()); - // for bootstrap classloader don't acquire lock - if (!class_loader_h.is_null()) { + // for bootstrap and other parallel classloaders don't acquire lock, + // use placeholder token + // If a parallelCapable class loader calls define_instance_class instead of + // find_or_define_instance_class to get here, we have a timing + // hole with systemDictionary updates and check_constraints + if (!class_loader_h.is_null() && !is_parallelCapable(class_loader_h)) { assert(ObjectSynchronizer::current_thread_holds_lock((JavaThread*)THREAD, compute_loader_lock_object(class_loader_h, THREAD)), "define called without lock"); } - // Check class-loading constraints. Throw exception if violation is detected. // Grabs and releases SystemDictionary_lock // The check_constraints/find_class call and update_dictionary sequence @@ -1427,14 +1457,15 @@ void SystemDictionary::define_instance_class(instanceKlassHandle k, TRAPS) { // Support parallel classloading // Initial implementation for bootstrap classloader -// For future: // For custom class loaders that support parallel classloading, -// in case they do not synchronize around -// FindLoadedClass/DefineClass calls, we check for parallel +// With AllowParallelDefine flag==true, in case they do not synchronize around +// FindLoadedClass/DefineClass, calls, we check for parallel // loading for them, wait if a defineClass is in progress // and return the initial requestor's results +// With AllowParallelDefine flag==false, call through to define_instance_class +// which will throw LinkageError: duplicate class definition. // For better performance, the class loaders should synchronize -// findClass(), i.e. FindLoadedClass/DefineClass or they +// findClass(), i.e. FindLoadedClass/DefineClassIfAbsent or they // potentially waste time reading and parsing the bytestream. // Note: VM callers should ensure consistency of k/class_name,class_loader instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle class_name, Handle class_loader, instanceKlassHandle k, TRAPS) { @@ -1460,26 +1491,28 @@ instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle // Acquire define token for this class/classloader symbolHandle nullsymbolHandle; probe = placeholders()->find_and_add(p_index, p_hash, class_name, class_loader, PlaceholderTable::DEFINE_CLASS, nullsymbolHandle, THREAD); - // Check if another thread defining in parallel - if (probe->definer() == NULL) { - // Thread will define the class - probe->set_definer(THREAD); - } else { - // Wait for defining thread to finish and return results - while (probe->definer() != NULL) { - SystemDictionary_lock->wait(); - } - if (probe->instanceKlass() != NULL) { + // Wait if another thread defining in parallel + // All threads wait - even those that will throw duplicate class: otherwise + // caller is surprised by LinkageError: duplicate, but findLoadedClass fails + // if other thread has not finished updating dictionary + while (probe->definer() != NULL) { + SystemDictionary_lock->wait(); + } + // Only special cases allow parallel defines and can use other thread's results + // Other cases fall through, and may run into duplicate defines + // caught by finding an entry in the SystemDictionary + if ((UnsyncloadClass || AllowParallelDefineClass) && (probe->instanceKlass() != NULL)) { probe->remove_seen_thread(THREAD, PlaceholderTable::DEFINE_CLASS); - return(instanceKlassHandle(THREAD, probe->instanceKlass())); - } else { - // If definer had an error, try again as any new thread would - probe->set_definer(THREAD); + placeholders()->find_and_remove(p_index, p_hash, class_name, class_loader, THREAD); + SystemDictionary_lock->notify_all(); #ifdef ASSERT klassOop check = find_class(d_index, d_hash, class_name, class_loader); - assert(check == NULL, "definer missed recording success"); + assert(check != NULL, "definer missed recording success"); #endif - } + return(instanceKlassHandle(THREAD, probe->instanceKlass())); + } else { + // This thread will define the class (even if earlier thread tried and had an error) + probe->set_definer(THREAD); } } @@ -1501,6 +1534,7 @@ instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle } probe->set_definer(NULL); probe->remove_seen_thread(THREAD, PlaceholderTable::DEFINE_CLASS); + placeholders()->find_and_remove(p_index, p_hash, class_name, class_loader, THREAD); SystemDictionary_lock->notify_all(); } } @@ -1512,7 +1546,6 @@ instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle return k; } - Handle SystemDictionary::compute_loader_lock_object(Handle class_loader, TRAPS) { // If class_loader is NULL we synchronize on _system_loader_lock_obj if (class_loader.is_null()) { @@ -1902,11 +1935,11 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) { warning("Cannot find sun/jkernel/DownloadManager"); } #endif // KERNEL + { // Compute whether we should use loadClass or loadClassInternal when loading classes. methodOop method = instanceKlass::cast(classloader_klass())->find_method(vmSymbols::loadClassInternal_name(), vmSymbols::string_class_signature()); _has_loadClassInternal = (method != NULL); } - { // Compute whether we should use checkPackageAccess or NOT methodOop method = instanceKlass::cast(classloader_klass())->find_method(vmSymbols::checkPackageAccess_name(), vmSymbols::class_protectiondomain_signature()); _has_checkPackageAccess = (method != NULL); diff --git a/hotspot/src/share/vm/classfile/systemDictionary.hpp b/hotspot/src/share/vm/classfile/systemDictionary.hpp index beade180fcd..38abf2d3c0a 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.hpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.hpp @@ -526,6 +526,7 @@ private: static instanceKlassHandle load_instance_class(symbolHandle class_name, Handle class_loader, TRAPS); static Handle compute_loader_lock_object(Handle class_loader, TRAPS); static void check_loader_lock_contention(Handle loader_lock, TRAPS); + static bool is_parallelCapable(Handle class_loader); static klassOop find_shared_class(symbolHandle class_name); diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp index 6a5a796d010..8379af9c414 100644 --- a/hotspot/src/share/vm/classfile/vmSymbols.hpp +++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp @@ -362,6 +362,7 @@ template(class_signature, "Ljava/lang/Class;") \ template(string_signature, "Ljava/lang/String;") \ template(reference_signature, "Ljava/lang/ref/Reference;") \ + template(concurrenthashmap_signature, "Ljava/util/concurrent/ConcurrentHashMap;") \ /* signature symbols needed by intrinsics */ \ VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE) \ \ @@ -374,6 +375,9 @@ /* used by ClassFormatError when class name is not known yet */ \ template(unknown_class_name, "") \ \ + /* used to identify class loaders handling parallel class loading */ \ + template(parallelCapable_name, "parallelLockMap;") \ + \ /* JVM monitoring and management support */ \ template(java_lang_StackTraceElement_array, "[Ljava/lang/StackTraceElement;") \ template(java_lang_management_ThreadState, "java/lang/management/ThreadState") \ diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 7d9e1a614ae..a029ec5f7e2 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -835,8 +835,21 @@ class CommandLineFlags { "Prints the system dictionary at exit") \ \ diagnostic(bool, UnsyncloadClass, false, \ - "Unstable: VM calls loadClass unsynchronized. Custom classloader "\ - "must call VM synchronized for findClass & defineClass") \ + "Unstable: VM calls loadClass unsynchronized. Custom " \ + "class loader must call VM synchronized for findClass " \ + "and defineClass.") \ + \ + product(bool, AlwaysLockClassLoader, false, \ + "Require the VM to acquire the class loader lock before calling " \ + "loadClass() even for class loaders registering " \ + "as parallel capable. Default false. ") \ + \ + product(bool, AllowParallelDefineClass, false, \ + "Allow parallel defineClass requests for class loaders " \ + "registering as parallel capable. Default false") \ + \ + product(bool, MustCallLoadClassInternal, false, \ + "Call loadClassInternal() rather than loadClass().Default false") \ \ product_pd(bool, DontYieldALot, \ "Throw away obvious excess yield calls (for SOLARIS only)") \ From 34746231069d5a11d9380d0cc81fbf8f435d792b Mon Sep 17 00:00:00 2001 From: Jon Masamitsu Date: Tue, 6 Jan 2009 07:05:05 -0800 Subject: [PATCH 042/199] 6689653: JMapPerm fails with UseConcMarkSweepIncGC and compressed oops off Added safe_object_iterate() for use by JMapPerm. Reviewed-by: tonyp --- .../compactibleFreeListSpace.cpp | 24 +++++++++++++++++++ .../compactibleFreeListSpace.hpp | 9 +++++++ .../concurrentMarkSweepGeneration.cpp | 11 ++++++++- .../concurrentMarkSweepGeneration.hpp | 1 + .../gc_implementation/g1/g1CollectedHeap.hpp | 1 + .../parallelScavenge/parallelScavengeHeap.hpp | 1 + .../share/vm/gc_interface/collectedHeap.hpp | 4 ++++ .../src/share/vm/memory/genCollectedHeap.cpp | 7 ++++++ .../src/share/vm/memory/genCollectedHeap.hpp | 1 + hotspot/src/share/vm/memory/generation.cpp | 15 ++++++++++++ hotspot/src/share/vm/memory/generation.hpp | 5 ++++ .../src/share/vm/memory/heapInspection.cpp | 6 +++++ hotspot/src/share/vm/memory/space.cpp | 6 +++++ hotspot/src/share/vm/memory/space.hpp | 6 +++++ hotspot/src/share/vm/prims/jvmtiTagMap.cpp | 3 +++ hotspot/src/share/vm/services/heapDumper.cpp | 2 +- 16 files changed, 100 insertions(+), 2 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp index 4b1fecd7cb3..d8b81244cfd 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -706,6 +706,30 @@ void CompactibleFreeListSpace::object_iterate(ObjectClosure* blk) { } } +// Apply the given closure to each live object in the space +// The usage of CompactibleFreeListSpace +// by the ConcurrentMarkSweepGeneration for concurrent GC's allows +// objects in the space with references to objects that are no longer +// valid. For example, an object may reference another object +// that has already been sweep up (collected). This method uses +// obj_is_alive() to determine whether it is safe to apply the closure to +// an object. See obj_is_alive() for details on how liveness of an +// object is decided. + +void CompactibleFreeListSpace::safe_object_iterate(ObjectClosure* blk) { + assert_lock_strong(freelistLock()); + NOT_PRODUCT(verify_objects_initialized()); + HeapWord *cur, *limit; + size_t curSize; + for (cur = bottom(), limit = end(); cur < limit; + cur += curSize) { + curSize = block_size(cur); + if (block_is_obj(cur) && obj_is_alive(cur)) { + blk->do_object(oop(cur)); + } + } +} + void CompactibleFreeListSpace::object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl) { assert_locked(); diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp index 5306a8f3085..e0c48a1b79a 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp @@ -481,6 +481,15 @@ class CompactibleFreeListSpace: public CompactibleSpace { void oop_iterate(OopClosure* cl); void object_iterate(ObjectClosure* blk); + // Apply the closure to each object in the space whose references + // point to objects in the heap. The usage of CompactibleFreeListSpace + // by the ConcurrentMarkSweepGeneration for concurrent GC's allows + // objects in the space with references to objects that are no longer + // valid. For example, an object may reference another object + // that has already been sweep up (collected). This method uses + // obj_is_alive() to determine whether it is safe to iterate of + // an object. + void safe_object_iterate(ObjectClosure* blk); void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl); // Requires that "mr" be entirely within the space. diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index e8344107659..83de6e6d410 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -3017,6 +3017,16 @@ ConcurrentMarkSweepGeneration::object_iterate(ObjectClosure* cl) { } } +void +ConcurrentMarkSweepGeneration::safe_object_iterate(ObjectClosure* cl) { + if (freelistLock()->owned_by_self()) { + Generation::safe_object_iterate(cl); + } else { + MutexLockerEx x(freelistLock(), Mutex::_no_safepoint_check_flag); + Generation::safe_object_iterate(cl); + } +} + void ConcurrentMarkSweepGeneration::pre_adjust_pointers() { } @@ -7001,7 +7011,6 @@ void MarkFromRootsClosure::scanOopsInOop(HeapWord* ptr) { _mut->clear_range(mr); } DEBUG_ONLY(}) - // Note: the finger doesn't advance while we drain // the stack below. PushOrMarkClosure pushOrMarkClosure(_collector, diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp index 44ef14e8db3..dacf5873a7f 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @@ -1212,6 +1212,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration { // More iteration support virtual void oop_iterate(MemRegion mr, OopClosure* cl); virtual void oop_iterate(OopClosure* cl); + virtual void safe_object_iterate(ObjectClosure* cl); virtual void object_iterate(ObjectClosure* cl); // Need to declare the full complement of closures, whether we'll diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp index 557456e4024..63688de38ef 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp @@ -850,6 +850,7 @@ public: // Iterate over all objects, calling "cl.do_object" on each. virtual void object_iterate(ObjectClosure* cl); + virtual void safe_object_iterate(ObjectClosure* cl) { object_iterate(cl); } // Iterate over all objects allocated since the last collection, calling // "cl.do_object" on each. The heap must have been initialized properly diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp index 087cdf93c01..c268b6a2f86 100644 --- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp +++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp @@ -200,6 +200,7 @@ class ParallelScavengeHeap : public CollectedHeap { void oop_iterate(OopClosure* cl); void object_iterate(ObjectClosure* cl); + void safe_object_iterate(ObjectClosure* cl) { object_iterate(cl); } void permanent_oop_iterate(OopClosure* cl); void permanent_object_iterate(ObjectClosure* cl); diff --git a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp index 13d30c70b6d..41d80a3a905 100644 --- a/hotspot/src/share/vm/gc_interface/collectedHeap.hpp +++ b/hotspot/src/share/vm/gc_interface/collectedHeap.hpp @@ -466,6 +466,10 @@ class CollectedHeap : public CHeapObj { // This includes objects in permanent memory. virtual void object_iterate(ObjectClosure* cl) = 0; + // Similar to object_iterate() except iterates only + // over live objects. + virtual void safe_object_iterate(ObjectClosure* cl) = 0; + // Behaves the same as oop_iterate, except only traverses // interior pointers contained in permanent memory. If there // is no permanent memory, does nothing. diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.cpp b/hotspot/src/share/vm/memory/genCollectedHeap.cpp index 832a3331e19..41dfac1b5c8 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp @@ -910,6 +910,13 @@ void GenCollectedHeap::object_iterate(ObjectClosure* cl) { perm_gen()->object_iterate(cl); } +void GenCollectedHeap::safe_object_iterate(ObjectClosure* cl) { + for (int i = 0; i < _n_gens; i++) { + _gens[i]->safe_object_iterate(cl); + } + perm_gen()->safe_object_iterate(cl); +} + void GenCollectedHeap::object_iterate_since_last_GC(ObjectClosure* cl) { for (int i = 0; i < _n_gens; i++) { _gens[i]->object_iterate_since_last_GC(cl); diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.hpp b/hotspot/src/share/vm/memory/genCollectedHeap.hpp index f9a4d508753..3ab20cfd19f 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.hpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.hpp @@ -215,6 +215,7 @@ public: void oop_iterate(OopClosure* cl); void oop_iterate(MemRegion mr, OopClosure* cl); void object_iterate(ObjectClosure* cl); + void safe_object_iterate(ObjectClosure* cl); void object_iterate_since_last_GC(ObjectClosure* cl); Space* space_containing(const void* addr) const; diff --git a/hotspot/src/share/vm/memory/generation.cpp b/hotspot/src/share/vm/memory/generation.cpp index 5167db243b6..d7b1d9f871d 100644 --- a/hotspot/src/share/vm/memory/generation.cpp +++ b/hotspot/src/share/vm/memory/generation.cpp @@ -319,6 +319,21 @@ void Generation::object_iterate(ObjectClosure* cl) { space_iterate(&blk); } +class GenerationSafeObjIterateClosure : public SpaceClosure { + private: + ObjectClosure* _cl; + public: + virtual void do_space(Space* s) { + s->safe_object_iterate(_cl); + } + GenerationSafeObjIterateClosure(ObjectClosure* cl) : _cl(cl) {} +}; + +void Generation::safe_object_iterate(ObjectClosure* cl) { + GenerationSafeObjIterateClosure blk(cl); + space_iterate(&blk); +} + void Generation::prepare_for_compaction(CompactPoint* cp) { // Generic implementation, can be specialized CompactibleSpace* space = first_compaction_space(); diff --git a/hotspot/src/share/vm/memory/generation.hpp b/hotspot/src/share/vm/memory/generation.hpp index 0f0e74e4794..206949901e4 100644 --- a/hotspot/src/share/vm/memory/generation.hpp +++ b/hotspot/src/share/vm/memory/generation.hpp @@ -518,6 +518,11 @@ class Generation: public CHeapObj { // each. virtual void object_iterate(ObjectClosure* cl); + // Iterate over all safe objects in the generation, calling "cl.do_object" on + // each. An object is safe if its references point to other objects in + // the heap. This defaults to object_iterate() unless overridden. + virtual void safe_object_iterate(ObjectClosure* cl); + // Iterate over all objects allocated in the generation since the last // collection, calling "cl.do_object" on each. The generation must have // been initialized properly to support this function, or else this call diff --git a/hotspot/src/share/vm/memory/heapInspection.cpp b/hotspot/src/share/vm/memory/heapInspection.cpp index e3d6fbd7b5a..3bc17bea600 100644 --- a/hotspot/src/share/vm/memory/heapInspection.cpp +++ b/hotspot/src/share/vm/memory/heapInspection.cpp @@ -263,6 +263,9 @@ void HeapInspection::heap_inspection(outputStream* st) { if (!cit.allocation_failed()) { // Iterate over objects in the heap RecordInstanceClosure ric(&cit); + // If this operation encounters a bad object when using CMS, + // consider using safe_object_iterate() which avoids perm gen + // objects that may contain bad references. Universe::heap()->object_iterate(&ric); // Report if certain classes are not counted because of @@ -317,5 +320,8 @@ void HeapInspection::find_instances_at_safepoint(klassOop k, GrowableArray* // Iterate over objects in the heap FindInstanceClosure fic(k, result); + // If this operation encounters a bad object when using CMS, + // consider using safe_object_iterate() which avoids perm gen + // objects that may contain bad references. Universe::heap()->object_iterate(&fic); } diff --git a/hotspot/src/share/vm/memory/space.cpp b/hotspot/src/share/vm/memory/space.cpp index 652d585bb8f..cad7f682832 100644 --- a/hotspot/src/share/vm/memory/space.cpp +++ b/hotspot/src/share/vm/memory/space.cpp @@ -705,6 +705,12 @@ void ContiguousSpace::object_iterate(ObjectClosure* blk) { object_iterate_from(bm, blk); } +// For a continguous space object_iterate() and safe_object_iterate() +// are the same. +void ContiguousSpace::safe_object_iterate(ObjectClosure* blk) { + object_iterate(blk); +} + void ContiguousSpace::object_iterate_from(WaterMark mark, ObjectClosure* blk) { assert(mark.space() == this, "Mark does not match space"); HeapWord* p = mark.point(); diff --git a/hotspot/src/share/vm/memory/space.hpp b/hotspot/src/share/vm/memory/space.hpp index a102c5f220c..f055638e8dd 100644 --- a/hotspot/src/share/vm/memory/space.hpp +++ b/hotspot/src/share/vm/memory/space.hpp @@ -193,6 +193,9 @@ class Space: public CHeapObj { // each. Objects allocated by applications of the closure are not // included in the iteration. virtual void object_iterate(ObjectClosure* blk) = 0; + // Similar to object_iterate() except only iterates over + // objects whose internal references point to objects in the space. + virtual void safe_object_iterate(ObjectClosure* blk) = 0; // Iterate over all objects that intersect with mr, calling "cl->do_object" // on each. There is an exception to this: if this closure has already @@ -843,6 +846,9 @@ class ContiguousSpace: public CompactibleSpace { void oop_iterate(OopClosure* cl); void oop_iterate(MemRegion mr, OopClosure* cl); void object_iterate(ObjectClosure* blk); + // For contiguous spaces this method will iterate safely over objects + // in the space (i.e., between bottom and top) when at a safepoint. + void safe_object_iterate(ObjectClosure* blk); void object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl); // iterates on objects up to the safe limit HeapWord* object_iterate_careful(ObjectClosureCareful* cl); diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp index 152789815af..dcf83bb22d4 100644 --- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp +++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp @@ -1320,6 +1320,9 @@ class VM_HeapIterateOperation: public VM_Operation { } // do the iteration + // If this operation encounters a bad object when using CMS, + // consider using safe_object_iterate() which avoids perm gen + // objects that may contain bad references. Universe::heap()->object_iterate(_blk); // when sharing is enabled we must iterate over the shared spaces diff --git a/hotspot/src/share/vm/services/heapDumper.cpp b/hotspot/src/share/vm/services/heapDumper.cpp index bf7aaf1a914..18bd9f477d7 100644 --- a/hotspot/src/share/vm/services/heapDumper.cpp +++ b/hotspot/src/share/vm/services/heapDumper.cpp @@ -1700,7 +1700,7 @@ void VM_HeapDumper::doit() { // The HPROF_GC_CLASS_DUMP and HPROF_GC_INSTANCE_DUMP are the vast bulk // of the heap dump. HeapObjectDumper obj_dumper(this, writer()); - Universe::heap()->object_iterate(&obj_dumper); + Universe::heap()->safe_object_iterate(&obj_dumper); // HPROF_GC_ROOT_THREAD_OBJ + frames + jni locals do_threads(); From 49ee6acaa20058f51413aab028e65081231578e0 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Wed, 7 Jan 2009 11:04:45 -0800 Subject: [PATCH 043/199] 6782232: assert("CreateEx must be first instruction in block" ) Add the missing check for CreateEx. Add new notproduct flag VerifyRegisterAllocator. Reviewed-by: never --- hotspot/src/share/vm/opto/c2_globals.hpp | 3 ++ hotspot/src/share/vm/opto/chaitin.cpp | 10 ++-- hotspot/src/share/vm/opto/live.cpp | 67 ++++++++++++++++++------ hotspot/src/share/vm/opto/reg_split.cpp | 4 +- 4 files changed, 62 insertions(+), 22 deletions(-) diff --git a/hotspot/src/share/vm/opto/c2_globals.hpp b/hotspot/src/share/vm/opto/c2_globals.hpp index 844d637e519..3a516ab98bd 100644 --- a/hotspot/src/share/vm/opto/c2_globals.hpp +++ b/hotspot/src/share/vm/opto/c2_globals.hpp @@ -191,6 +191,9 @@ notproduct(bool, VerifyHashTableKeys, true, \ "Verify the immutability of keys in the VN hash tables") \ \ + notproduct(bool, VerifyRegisterAllocator , false, \ + "Verify Register Allocator") \ + \ develop_pd(intx, FLOATPRESSURE, \ "Number of float LRG's that constitute high register pressure") \ \ diff --git a/hotspot/src/share/vm/opto/chaitin.cpp b/hotspot/src/share/vm/opto/chaitin.cpp index 0456db5dc11..3d98f65d654 100644 --- a/hotspot/src/share/vm/opto/chaitin.cpp +++ b/hotspot/src/share/vm/opto/chaitin.cpp @@ -307,7 +307,7 @@ void PhaseChaitin::Register_Allocate() { if (C->failing()) return; #ifdef ASSERT - if( VerifyOpto ) { + if( VerifyOpto || VerifyRegisterAllocator ) { _cfg.verify(); verify_base_ptrs(&live_arena); } @@ -340,7 +340,7 @@ void PhaseChaitin::Register_Allocate() { compress_uf_map_for_nodes(); #ifdef ASSERT - if( VerifyOpto ) _ifg->verify(this); + if( VerifyOpto || VerifyRegisterAllocator ) _ifg->verify(this); #endif } else { ifg.SquareUp(); @@ -377,7 +377,7 @@ void PhaseChaitin::Register_Allocate() { C->check_node_count(2*NodeLimitFudgeFactor, "out of nodes after split"); if (C->failing()) return; #ifdef ASSERT - if( VerifyOpto ) { + if( VerifyOpto || VerifyRegisterAllocator ) { _cfg.verify(); verify_base_ptrs(&live_arena); } @@ -412,7 +412,7 @@ void PhaseChaitin::Register_Allocate() { } compress_uf_map_for_nodes(); #ifdef ASSERT - if( VerifyOpto ) _ifg->verify(this); + if( VerifyOpto || VerifyRegisterAllocator ) _ifg->verify(this); #endif cache_lrg_info(); // Count degree of LRGs @@ -956,7 +956,7 @@ void PhaseChaitin::Simplify( ) { while ((neighbor = elements.next()) != 0) { LRG *n = &lrgs(neighbor); #ifdef ASSERT - if( VerifyOpto ) { + if( VerifyOpto || VerifyRegisterAllocator ) { assert( _ifg->effective_degree(neighbor) == n->degree(), "" ); } #endif diff --git a/hotspot/src/share/vm/opto/live.cpp b/hotspot/src/share/vm/opto/live.cpp index 4127f67e1dd..48717fc666a 100644 --- a/hotspot/src/share/vm/opto/live.cpp +++ b/hotspot/src/share/vm/opto/live.cpp @@ -271,9 +271,9 @@ void PhaseLive::dump( const Block *b ) const { //------------------------------verify_base_ptrs------------------------------- // Verify that base pointers and derived pointers are still sane. -// Basically, if a derived pointer is live at a safepoint, then its -// base pointer must be live also. void PhaseChaitin::verify_base_ptrs( ResourceArea *a ) const { +#ifdef ASSERT + Unique_Node_List worklist(a); for( uint i = 0; i < _cfg._num_blocks; i++ ) { Block *b = _cfg._blocks[i]; for( uint j = b->end_idx() + 1; j > 1; j-- ) { @@ -287,28 +287,63 @@ void PhaseChaitin::verify_base_ptrs( ResourceArea *a ) const { // Now scan for a live derived pointer if (jvms->oopoff() < sfpt->req()) { // Check each derived/base pair - for (uint idx = jvms->oopoff(); idx < sfpt->req(); idx += 2) { + for (uint idx = jvms->oopoff(); idx < sfpt->req(); idx++) { Node *check = sfpt->in(idx); - uint j = 0; + bool is_derived = ((idx - jvms->oopoff()) & 1) == 0; // search upwards through spills and spill phis for AddP - while(true) { - if( !check ) break; - int idx = check->is_Copy(); - if( idx ) { - check = check->in(idx); - } else if( check->is_Phi() && check->_idx >= _oldphi ) { - check = check->in(1); - } else - break; - j++; - assert(j < 100000,"Derived pointer checking in infinite loop"); + worklist.clear(); + worklist.push(check); + uint k = 0; + while( k < worklist.size() ) { + check = worklist.at(k); + assert(check,"Bad base or derived pointer"); + // See PhaseChaitin::find_base_for_derived() for all cases. + int isc = check->is_Copy(); + if( isc ) { + worklist.push(check->in(isc)); + } else if( check->is_Phi() ) { + for (uint m = 1; m < check->req(); m++) + worklist.push(check->in(m)); + } else if( check->is_Con() ) { + if (is_derived) { + // Derived is NULL+offset + assert(!is_derived || check->bottom_type()->is_ptr()->ptr() == TypePtr::Null,"Bad derived pointer"); + } else { + assert(check->bottom_type()->is_ptr()->_offset == 0,"Bad base pointer"); + // Base either ConP(NULL) or loadConP + if (check->is_Mach()) { + assert(check->as_Mach()->ideal_Opcode() == Op_ConP,"Bad base pointer"); + } else { + assert(check->Opcode() == Op_ConP && + check->bottom_type()->is_ptr()->ptr() == TypePtr::Null,"Bad base pointer"); + } + } + } else if( check->bottom_type()->is_ptr()->_offset == 0 ) { + if(check->is_Proj() || check->is_Mach() && + (check->as_Mach()->ideal_Opcode() == Op_CreateEx || + check->as_Mach()->ideal_Opcode() == Op_ThreadLocal || + check->as_Mach()->ideal_Opcode() == Op_CMoveP || + check->as_Mach()->ideal_Opcode() == Op_CheckCastPP || +#ifdef _LP64 + UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP || + UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN || +#endif + check->as_Mach()->ideal_Opcode() == Op_LoadP || + check->as_Mach()->ideal_Opcode() == Op_LoadKlass)) + assert(false,"Bad base or derived pointer"); + } else { + assert(is_derived,"Bad base pointer"); + assert(check->is_Mach() && check->as_Mach()->ideal_Opcode() == Op_AddP,"Bad derived pointer"); + } + k++; + assert(k < 100000,"Derived pointer checking in infinite loop"); } // End while - assert(check->is_Mach() && check->as_Mach()->ideal_Opcode() == Op_AddP,"Bad derived pointer") } } // End of check for derived pointers } // End of Kcheck for debug info } // End of if found a safepoint } // End of forall instructions in block } // End of forall blocks +#endif } #endif diff --git a/hotspot/src/share/vm/opto/reg_split.cpp b/hotspot/src/share/vm/opto/reg_split.cpp index 003df4c48b7..709db17d998 100644 --- a/hotspot/src/share/vm/opto/reg_split.cpp +++ b/hotspot/src/share/vm/opto/reg_split.cpp @@ -96,7 +96,9 @@ void PhaseChaitin::insert_proj( Block *b, uint i, Node *spill, uint maxlrg ) { // its definer. while( i < b->_nodes.size() && (b->_nodes[i]->is_Proj() || - b->_nodes[i]->is_Phi() ) ) + b->_nodes[i]->is_Phi() || + (b->_nodes[i]->is_Mach() && + b->_nodes[i]->as_Mach()->ideal_Opcode() == Op_CreateEx)) ) i++; // Do not insert between a call and his Catch From 1ff1bdc3e68c36825553be16153e46a8e6637f95 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Wed, 7 Jan 2009 11:23:28 -0800 Subject: [PATCH 044/199] 6790182: matcher.cpp:1375: assert(false,"bad AD file") Add a match rule for regD_low in regD definition. Reviewed-by: never --- hotspot/src/cpu/sparc/vm/sparc.ad | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hotspot/src/cpu/sparc/vm/sparc.ad b/hotspot/src/cpu/sparc/vm/sparc.ad index 06af021d1fd..af2262821e3 100644 --- a/hotspot/src/cpu/sparc/vm/sparc.ad +++ b/hotspot/src/cpu/sparc/vm/sparc.ad @@ -3869,6 +3869,8 @@ operand regD() %{ constraint(ALLOC_IN_RC(dflt_reg)); match(RegD); + match(regD_low); + format %{ %} interface(REG_INTER); %} @@ -3883,7 +3885,7 @@ operand regF() %{ operand regD_low() %{ constraint(ALLOC_IN_RC(dflt_low_reg)); - match(RegD); + match(regD); format %{ %} interface(REG_INTER); From 9bf454584337eee0e9b6e6d83afb662daf16f67e Mon Sep 17 00:00:00 2001 From: Karen Kinnear Date: Thu, 8 Jan 2009 16:27:28 -0500 Subject: [PATCH 045/199] 6791656: nsk defclass0 asserts handles.hpp Reviewed-by: phh, xlu --- .../src/share/vm/classfile/systemDictionary.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp index 40096a26988..a5d797f248c 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp @@ -1471,26 +1471,27 @@ void SystemDictionary::define_instance_class(instanceKlassHandle k, TRAPS) { instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle class_name, Handle class_loader, instanceKlassHandle k, TRAPS) { instanceKlassHandle nh = instanceKlassHandle(); // null Handle + symbolHandle name_h(THREAD, k->name()); // passed in class_name may be null - unsigned int d_hash = dictionary()->compute_hash(class_name, class_loader); + unsigned int d_hash = dictionary()->compute_hash(name_h, class_loader); int d_index = dictionary()->hash_to_index(d_hash); // Hold SD lock around find_class and placeholder creation for DEFINE_CLASS - unsigned int p_hash = placeholders()->compute_hash(class_name, class_loader); + unsigned int p_hash = placeholders()->compute_hash(name_h, class_loader); int p_index = placeholders()->hash_to_index(p_hash); PlaceholderEntry* probe; { MutexLocker mu(SystemDictionary_lock, THREAD); // First check if class already defined - klassOop check = find_class(d_index, d_hash, class_name, class_loader); + klassOop check = find_class(d_index, d_hash, name_h, class_loader); if (check != NULL) { return(instanceKlassHandle(THREAD, check)); } // Acquire define token for this class/classloader symbolHandle nullsymbolHandle; - probe = placeholders()->find_and_add(p_index, p_hash, class_name, class_loader, PlaceholderTable::DEFINE_CLASS, nullsymbolHandle, THREAD); + probe = placeholders()->find_and_add(p_index, p_hash, name_h, class_loader, PlaceholderTable::DEFINE_CLASS, nullsymbolHandle, THREAD); // Wait if another thread defining in parallel // All threads wait - even those that will throw duplicate class: otherwise // caller is surprised by LinkageError: duplicate, but findLoadedClass fails @@ -1503,10 +1504,10 @@ instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle // caught by finding an entry in the SystemDictionary if ((UnsyncloadClass || AllowParallelDefineClass) && (probe->instanceKlass() != NULL)) { probe->remove_seen_thread(THREAD, PlaceholderTable::DEFINE_CLASS); - placeholders()->find_and_remove(p_index, p_hash, class_name, class_loader, THREAD); + placeholders()->find_and_remove(p_index, p_hash, name_h, class_loader, THREAD); SystemDictionary_lock->notify_all(); #ifdef ASSERT - klassOop check = find_class(d_index, d_hash, class_name, class_loader); + klassOop check = find_class(d_index, d_hash, name_h, class_loader); assert(check != NULL, "definer missed recording success"); #endif return(instanceKlassHandle(THREAD, probe->instanceKlass())); @@ -1523,7 +1524,7 @@ instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle // definer must notify any waiting threads { MutexLocker mu(SystemDictionary_lock, THREAD); - PlaceholderEntry* probe = placeholders()->get_entry(p_index, p_hash, class_name, class_loader); + PlaceholderEntry* probe = placeholders()->get_entry(p_index, p_hash, name_h, class_loader); assert(probe != NULL, "DEFINE_CLASS placeholder lost?"); if (probe != NULL) { if (HAS_PENDING_EXCEPTION) { @@ -1534,7 +1535,7 @@ instanceKlassHandle SystemDictionary::find_or_define_instance_class(symbolHandle } probe->set_definer(NULL); probe->remove_seen_thread(THREAD, PlaceholderTable::DEFINE_CLASS); - placeholders()->find_and_remove(p_index, p_hash, class_name, class_loader, THREAD); + placeholders()->find_and_remove(p_index, p_hash, name_h, class_loader, THREAD); SystemDictionary_lock->notify_all(); } } From c2ff9781c78ccc36317268f1b8c274c190018b23 Mon Sep 17 00:00:00 2001 From: Jon Masamitsu Date: Sun, 11 Jan 2009 16:58:24 -0800 Subject: [PATCH 046/199] 6692899: CMS: many vm.parallel_class_loading tests fail with assert "missing Printezis mark" The CMS concurrent precleaning and concurrent marking phases should work around classes that are undergoing redefinition. Reviewed-by: ysr, dcubed --- .../share/vm/classfile/classFileParser.cpp | 7 ++++-- .../compactibleFreeListSpace.cpp | 4 ++- .../concurrentMarkSweepGeneration.cpp | 19 ++++++++++++-- hotspot/src/share/vm/memory/oopFactory.cpp | 15 ++++++++--- hotspot/src/share/vm/memory/oopFactory.hpp | 19 +++++++++++--- hotspot/src/share/vm/memory/space.cpp | 10 +++++++- .../src/share/vm/oops/constMethodKlass.cpp | 7 ++++++ .../src/share/vm/oops/constMethodKlass.hpp | 6 ++++- hotspot/src/share/vm/oops/constMethodOop.hpp | 3 +++ .../src/share/vm/oops/constantPoolKlass.cpp | 10 +++++++- .../src/share/vm/oops/constantPoolKlass.hpp | 4 ++- hotspot/src/share/vm/oops/constantPoolOop.hpp | 5 ++++ hotspot/src/share/vm/oops/klass.hpp | 11 ++++++++ hotspot/src/share/vm/oops/methodOop.cpp | 25 ++++++++++++++++++- hotspot/src/share/vm/oops/methodOop.hpp | 4 +++ hotspot/src/share/vm/oops/oop.hpp | 7 ++++++ hotspot/src/share/vm/oops/oop.inline.hpp | 4 +++ .../share/vm/prims/jvmtiRedefineClasses.cpp | 20 +++++++++++++-- 18 files changed, 161 insertions(+), 19 deletions(-) diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp index 703217f9255..4f8ec88f866 100644 --- a/hotspot/src/share/vm/classfile/classFileParser.cpp +++ b/hotspot/src/share/vm/classfile/classFileParser.cpp @@ -232,7 +232,9 @@ constantPoolHandle ClassFileParser::parse_constant_pool(TRAPS) { length >= 1, "Illegal constant pool size %u in class file %s", length, CHECK_(nullHandle)); constantPoolOop constant_pool = - oopFactory::new_constantPool(length, CHECK_(nullHandle)); + oopFactory::new_constantPool(length, + methodOopDesc::IsSafeConc, + CHECK_(nullHandle)); constantPoolHandle cp (THREAD, constant_pool); cp->set_partially_loaded(); // Enables heap verify to work on partial constantPoolOops @@ -1675,7 +1677,8 @@ methodHandle ClassFileParser::parse_method(constantPoolHandle cp, bool is_interf // All sizing information for a methodOop is finally available, now create it methodOop m_oop = oopFactory::new_method( code_length, access_flags, linenumber_table_length, - total_lvt_length, checked_exceptions_length, CHECK_(nullHandle)); + total_lvt_length, checked_exceptions_length, + methodOopDesc::IsSafeConc, CHECK_(nullHandle)); methodHandle m (THREAD, m_oop); ClassLoadingService::add_class_method_size(m_oop->size()*HeapWordSize); diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp index d8b81244cfd..6c6272a2f84 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @@ -885,7 +885,9 @@ const { } else { // must read from what 'p' points to in each loop. klassOop k = ((volatile oopDesc*)p)->klass_or_null(); - if (k != NULL && ((oopDesc*)p)->is_parsable()) { + if (k != NULL && + ((oopDesc*)p)->is_parsable() && + ((oopDesc*)p)->is_conc_safe()) { assert(k->is_oop(), "Should really be klass oop."); oop o = (oop)p; assert(o->is_oop(), "Should be an oop"); diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index 83de6e6d410..fb10d1c153b 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -6633,7 +6633,11 @@ size_t ScanMarkedObjectsAgainCarefullyClosure::do_object_careful_m( if (_bitMap->isMarked(addr)) { // it's marked; is it potentially uninitialized? if (p->klass_or_null() != NULL) { - if (CMSPermGenPrecleaningEnabled && !p->is_parsable()) { + // If is_conc_safe is false, the object may be undergoing + // change by the VM outside a safepoint. Don't try to + // scan it, but rather leave it for the remark phase. + if (CMSPermGenPrecleaningEnabled && + (!p->is_conc_safe() || !p->is_parsable())) { // Signal precleaning to redirty the card since // the klass pointer is already installed. assert(size == 0, "Initial value"); @@ -8071,9 +8075,13 @@ size_t SweepClosure::doLiveChunk(FreeChunk* fc) { #ifdef DEBUG if (oop(addr)->klass_or_null() != NULL && ( !_collector->should_unload_classes() - || oop(addr)->is_parsable())) { + || (oop(addr)->is_parsable()) && + oop(addr)->is_conc_safe())) { // Ignore mark word because we are running concurrent with mutators assert(oop(addr)->is_oop(true), "live block should be an oop"); + // is_conc_safe is checked before performing this assertion + // because an object that is not is_conc_safe may yet have + // the return from size() correct. assert(size == CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size()), "P-mark and computed size do not agree"); @@ -8086,6 +8094,13 @@ size_t SweepClosure::doLiveChunk(FreeChunk* fc) { (!_collector->should_unload_classes() || oop(addr)->is_parsable()), "Should be an initialized object"); + // Note that there are objects used during class redefinition + // (e.g., merge_cp in VM_RedefineClasses::merge_cp_and_rewrite() + // which are discarded with their is_conc_safe state still + // false. These object may be floating garbage so may be + // seen here. If they are floating garbage their size + // should be attainable from their klass. Do not that + // is_conc_safe() is true for oop(addr). // Ignore mark word because we are running concurrent with mutators assert(oop(addr)->is_oop(true), "live block should be an oop"); // Verify that the bit map has no bits marked between diff --git a/hotspot/src/share/vm/memory/oopFactory.cpp b/hotspot/src/share/vm/memory/oopFactory.cpp index e9ea08d3b23..24c67634e83 100644 --- a/hotspot/src/share/vm/memory/oopFactory.cpp +++ b/hotspot/src/share/vm/memory/oopFactory.cpp @@ -82,9 +82,11 @@ objArrayOop oopFactory::new_system_objArray(int length, TRAPS) { } -constantPoolOop oopFactory::new_constantPool(int length, TRAPS) { +constantPoolOop oopFactory::new_constantPool(int length, + bool is_conc_safe, + TRAPS) { constantPoolKlass* ck = constantPoolKlass::cast(Universe::constantPoolKlassObj()); - return ck->allocate(length, CHECK_NULL); + return ck->allocate(length, is_conc_safe, CHECK_NULL); } @@ -105,11 +107,13 @@ constMethodOop oopFactory::new_constMethod(int byte_code_size, int compressed_line_number_size, int localvariable_table_length, int checked_exceptions_length, + bool is_conc_safe, TRAPS) { klassOop cmkObj = Universe::constMethodKlassObj(); constMethodKlass* cmk = constMethodKlass::cast(cmkObj); return cmk->allocate(byte_code_size, compressed_line_number_size, localvariable_table_length, checked_exceptions_length, + is_conc_safe, CHECK_NULL); } @@ -117,14 +121,17 @@ constMethodOop oopFactory::new_constMethod(int byte_code_size, methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags, int compressed_line_number_size, int localvariable_table_length, - int checked_exceptions_length, TRAPS) { + int checked_exceptions_length, + bool is_conc_safe, + TRAPS) { methodKlass* mk = methodKlass::cast(Universe::methodKlassObj()); assert(!access_flags.is_native() || byte_code_size == 0, "native methods should not contain byte codes"); constMethodOop cm = new_constMethod(byte_code_size, compressed_line_number_size, localvariable_table_length, - checked_exceptions_length, CHECK_NULL); + checked_exceptions_length, + is_conc_safe, CHECK_NULL); constMethodHandle rw(THREAD, cm); return mk->allocate(rw, access_flags, CHECK_NULL); } diff --git a/hotspot/src/share/vm/memory/oopFactory.hpp b/hotspot/src/share/vm/memory/oopFactory.hpp index 855e0fcf43e..e5a80073baf 100644 --- a/hotspot/src/share/vm/memory/oopFactory.hpp +++ b/hotspot/src/share/vm/memory/oopFactory.hpp @@ -81,7 +81,9 @@ class oopFactory: AllStatic { static symbolHandle new_symbol_handle(const char* name, TRAPS) { return new_symbol_handle(name, (int)strlen(name), CHECK_(symbolHandle())); } // Constant pools - static constantPoolOop new_constantPool (int length, TRAPS); + static constantPoolOop new_constantPool (int length, + bool is_conc_safe, + TRAPS); static constantPoolCacheOop new_constantPoolCache(int length, TRAPS); // Instance classes @@ -93,9 +95,20 @@ private: static constMethodOop new_constMethod(int byte_code_size, int compressed_line_number_size, int localvariable_table_length, - int checked_exceptions_length, TRAPS); + int checked_exceptions_length, + bool is_conc_safe, + TRAPS); public: - static methodOop new_method(int byte_code_size, AccessFlags access_flags, int compressed_line_number_size, int localvariable_table_length, int checked_exceptions_length, TRAPS); + // Set is_conc_safe for methods which cannot safely be + // processed by concurrent GC even after the return of + // the method. + static methodOop new_method(int byte_code_size, + AccessFlags access_flags, + int compressed_line_number_size, + int localvariable_table_length, + int checked_exceptions_length, + bool is_conc_safe, + TRAPS); // Method Data containers static methodDataOop new_methodData(methodHandle method, TRAPS); diff --git a/hotspot/src/share/vm/memory/space.cpp b/hotspot/src/share/vm/memory/space.cpp index cad7f682832..00f97001384 100644 --- a/hotspot/src/share/vm/memory/space.cpp +++ b/hotspot/src/share/vm/memory/space.cpp @@ -569,7 +569,15 @@ void Space::object_iterate_mem(MemRegion mr, UpwardsObjectClosure* cl) { if (prev > mr.start()) { region_start_addr = prev; blk_start_addr = prev; - assert(blk_start_addr == block_start(region_start_addr), "invariant"); + // The previous invocation may have pushed "prev" beyond the + // last allocated block yet there may be still be blocks + // in this region due to a particular coalescing policy. + // Relax the assertion so that the case where the unallocated + // block is maintained and "prev" is beyond the unallocated + // block does not cause the assertion to fire. + assert((BlockOffsetArrayUseUnallocatedBlock && + (!is_in(prev))) || + (blk_start_addr == block_start(region_start_addr)), "invariant"); } else { region_start_addr = mr.start(); blk_start_addr = block_start(region_start_addr); diff --git a/hotspot/src/share/vm/oops/constMethodKlass.cpp b/hotspot/src/share/vm/oops/constMethodKlass.cpp index 802c4430afa..f2fe1706a16 100644 --- a/hotspot/src/share/vm/oops/constMethodKlass.cpp +++ b/hotspot/src/share/vm/oops/constMethodKlass.cpp @@ -49,10 +49,16 @@ bool constMethodKlass::oop_is_parsable(oop obj) const { return constMethodOop(obj)->object_is_parsable(); } +bool constMethodKlass::oop_is_conc_safe(oop obj) const { + assert(obj->is_constMethod(), "must be constMethod oop"); + return constMethodOop(obj)->is_conc_safe(); +} + constMethodOop constMethodKlass::allocate(int byte_code_size, int compressed_line_number_size, int localvariable_table_length, int checked_exceptions_length, + bool is_conc_safe, TRAPS) { int size = constMethodOopDesc::object_size(byte_code_size, @@ -75,6 +81,7 @@ constMethodOop constMethodKlass::allocate(int byte_code_size, compressed_line_number_size, localvariable_table_length); assert(cm->size() == size, "wrong size for object"); + cm->set_is_conc_safe(is_conc_safe); cm->set_partially_loaded(); assert(cm->is_parsable(), "Is safely parsable by gc"); return cm; diff --git a/hotspot/src/share/vm/oops/constMethodKlass.hpp b/hotspot/src/share/vm/oops/constMethodKlass.hpp index 87fc9c3156d..a3f7d9710f7 100644 --- a/hotspot/src/share/vm/oops/constMethodKlass.hpp +++ b/hotspot/src/share/vm/oops/constMethodKlass.hpp @@ -32,12 +32,16 @@ public: // Testing bool oop_is_constMethod() const { return true; } virtual bool oop_is_parsable(oop obj) const; + virtual bool oop_is_conc_safe(oop obj) const; + // Allocation DEFINE_ALLOCATE_PERMANENT(constMethodKlass); constMethodOop allocate(int byte_code_size, int compressed_line_number_size, int localvariable_table_length, - int checked_exceptions_length, TRAPS); + int checked_exceptions_length, + bool is_conc_safe, + TRAPS); static klassOop create_klass(TRAPS); // Sizing diff --git a/hotspot/src/share/vm/oops/constMethodOop.hpp b/hotspot/src/share/vm/oops/constMethodOop.hpp index e9ffa4b66bc..4669e6a852f 100644 --- a/hotspot/src/share/vm/oops/constMethodOop.hpp +++ b/hotspot/src/share/vm/oops/constMethodOop.hpp @@ -104,6 +104,7 @@ private: // loads and stores. This value may updated and read without a lock by // multiple threads, so is volatile. volatile uint64_t _fingerprint; + volatile bool _is_conc_safe; // if true, safe for concurrent GC processing public: oop* oop_block_beg() const { return adr_method(); } @@ -273,6 +274,8 @@ public: oop* adr_method() const { return (oop*)&_method; } oop* adr_stackmap_data() const { return (oop*)&_stackmap_data; } oop* adr_exception_table() const { return (oop*)&_exception_table; } + bool is_conc_safe() { return _is_conc_safe; } + void set_is_conc_safe(bool v) { _is_conc_safe = v; } // Unique id for the method static const u2 MAX_IDNUM; diff --git a/hotspot/src/share/vm/oops/constantPoolKlass.cpp b/hotspot/src/share/vm/oops/constantPoolKlass.cpp index 593b74668ff..2a17c00e1ce 100644 --- a/hotspot/src/share/vm/oops/constantPoolKlass.cpp +++ b/hotspot/src/share/vm/oops/constantPoolKlass.cpp @@ -25,7 +25,7 @@ # include "incls/_precompiled.incl" # include "incls/_constantPoolKlass.cpp.incl" -constantPoolOop constantPoolKlass::allocate(int length, TRAPS) { +constantPoolOop constantPoolKlass::allocate(int length, bool is_conc_safe, TRAPS) { int size = constantPoolOopDesc::object_size(length); KlassHandle klass (THREAD, as_klassOop()); constantPoolOop c = @@ -38,6 +38,9 @@ constantPoolOop constantPoolKlass::allocate(int length, TRAPS) { c->set_flags(0); // only set to non-zero if constant pool is merged by RedefineClasses c->set_orig_length(0); + // if constant pool may change during RedefineClasses, it is created + // unsafe for GC concurrent processing. + c->set_is_conc_safe(is_conc_safe); // all fields are initialized; needed for GC // initialize tag array @@ -207,6 +210,11 @@ int constantPoolKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) return size; } +bool constantPoolKlass::oop_is_conc_safe(oop obj) const { + assert(obj->is_constantPool(), "must be constantPool"); + return constantPoolOop(obj)->is_conc_safe(); +} + #ifndef SERIALGC int constantPoolKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { assert (obj->is_constantPool(), "obj must be constant pool"); diff --git a/hotspot/src/share/vm/oops/constantPoolKlass.hpp b/hotspot/src/share/vm/oops/constantPoolKlass.hpp index 324efbec023..2f9efc285ef 100644 --- a/hotspot/src/share/vm/oops/constantPoolKlass.hpp +++ b/hotspot/src/share/vm/oops/constantPoolKlass.hpp @@ -34,7 +34,7 @@ class constantPoolKlass : public Klass { // Allocation DEFINE_ALLOCATE_PERMANENT(constantPoolKlass); - constantPoolOop allocate(int length, TRAPS); + constantPoolOop allocate(int length, bool is_conc_safe, TRAPS); static klassOop create_klass(TRAPS); // Casting from klassOop @@ -48,6 +48,8 @@ class constantPoolKlass : public Klass { int object_size() const { return align_object_size(header_size()); } // Garbage collection + // Returns true is the object is safe for GC concurrent processing. + virtual bool oop_is_conc_safe(oop obj) const; void oop_follow_contents(oop obj); int oop_adjust_pointers(oop obj); diff --git a/hotspot/src/share/vm/oops/constantPoolOop.hpp b/hotspot/src/share/vm/oops/constantPoolOop.hpp index 5627059091f..fd2264c1eab 100644 --- a/hotspot/src/share/vm/oops/constantPoolOop.hpp +++ b/hotspot/src/share/vm/oops/constantPoolOop.hpp @@ -43,6 +43,8 @@ class constantPoolOopDesc : public oopDesc { klassOop _pool_holder; // the corresponding class int _flags; // a few header bits to describe contents for GC int _length; // number of elements in the array + volatile bool _is_conc_safe; // if true, safe for concurrent + // GC processing // only set to non-zero if constant pool is merged by RedefineClasses int _orig_length; @@ -379,6 +381,9 @@ class constantPoolOopDesc : public oopDesc { static int object_size(int length) { return align_object_size(header_size() + length); } int object_size() { return object_size(length()); } + bool is_conc_safe() { return _is_conc_safe; } + void set_is_conc_safe(bool v) { _is_conc_safe = v; } + friend class constantPoolKlass; friend class ClassFileParser; friend class SystemDictionary; diff --git a/hotspot/src/share/vm/oops/klass.hpp b/hotspot/src/share/vm/oops/klass.hpp index 46852c02ee1..881da970d03 100644 --- a/hotspot/src/share/vm/oops/klass.hpp +++ b/hotspot/src/share/vm/oops/klass.hpp @@ -606,8 +606,19 @@ class Klass : public Klass_vtbl { #undef assert_same_query // Unless overridden, oop is parsable if it has a klass pointer. + // Parsability of an object is object specific. virtual bool oop_is_parsable(oop obj) const { return true; } + // Unless overridden, oop is safe for concurrent GC processing + // after its allocation is complete. The exception to + // this is the case where objects are changed after allocation. + // Class redefinition is one of the known exceptions. During + // class redefinition, an allocated class can changed in order + // order to create a merged class (the combiniation of the + // old class definition that has to be perserved and the new class + // definition which is being created. + virtual bool oop_is_conc_safe(oop obj) const { return true; } + // Access flags AccessFlags access_flags() const { return _access_flags; } void set_access_flags(AccessFlags flags) { _access_flags = flags; } diff --git a/hotspot/src/share/vm/oops/methodOop.cpp b/hotspot/src/share/vm/oops/methodOop.cpp index 8a5507cbac8..c239ccf1a2c 100644 --- a/hotspot/src/share/vm/oops/methodOop.cpp +++ b/hotspot/src/share/vm/oops/methodOop.cpp @@ -792,15 +792,34 @@ methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_cod AccessFlags flags = m->access_flags(); int checked_exceptions_len = m->checked_exceptions_length(); int localvariable_len = m->localvariable_table_length(); - methodOop newm_oop = oopFactory::new_method(new_code_length, flags, new_compressed_linenumber_size, localvariable_len, checked_exceptions_len, CHECK_(methodHandle())); + // Allocate newm_oop with the is_conc_safe parameter set + // to IsUnsafeConc to indicate that newm_oop is not yet + // safe for concurrent processing by a GC. + methodOop newm_oop = oopFactory::new_method(new_code_length, + flags, + new_compressed_linenumber_size, + localvariable_len, + checked_exceptions_len, + IsUnsafeConc, + CHECK_(methodHandle())); methodHandle newm (THREAD, newm_oop); int new_method_size = newm->method_size(); // Create a shallow copy of methodOopDesc part, but be careful to preserve the new constMethodOop constMethodOop newcm = newm->constMethod(); int new_const_method_size = newm->constMethod()->object_size(); + memcpy(newm(), m(), sizeof(methodOopDesc)); // Create shallow copy of constMethodOopDesc, but be careful to preserve the methodOop + // is_conc_safe is set to false because that is the value of + // is_conc_safe initialzied into newcm and the copy should + // not overwrite that value. During the window during which it is + // tagged as unsafe, some extra work could be needed during precleaning + // or concurrent marking but those phases will be correct. Setting and + // resetting is done in preference to a careful copying into newcm to + // avoid having to know the precise layout of a constMethodOop. + m->constMethod()->set_is_conc_safe(false); memcpy(newcm, m->constMethod(), sizeof(constMethodOopDesc)); + m->constMethod()->set_is_conc_safe(true); // Reset correct method/const method, method size, and parameter info newcm->set_method(newm()); newm->set_constMethod(newcm); @@ -831,6 +850,10 @@ methodHandle methodOopDesc:: clone_with_new_data(methodHandle m, u_char* new_cod m->localvariable_table_start(), localvariable_len * sizeof(LocalVariableTableElement)); } + + // Only set is_conc_safe to true when changes to newcm are + // complete. + newcm->set_is_conc_safe(true); return newm; } diff --git a/hotspot/src/share/vm/oops/methodOop.hpp b/hotspot/src/share/vm/oops/methodOop.hpp index 965181c664d..8b03a68380a 100644 --- a/hotspot/src/share/vm/oops/methodOop.hpp +++ b/hotspot/src/share/vm/oops/methodOop.hpp @@ -129,6 +129,10 @@ class methodOopDesc : public oopDesc { volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry public: + + static const bool IsUnsafeConc = false; + static const bool IsSafeConc = true; + // accessors for instance variables constMethodOop constMethod() const { return _constMethod; } void set_constMethod(constMethodOop xconst) { oop_store_without_check((oop*)&_constMethod, (oop)xconst); } diff --git a/hotspot/src/share/vm/oops/oop.hpp b/hotspot/src/share/vm/oops/oop.hpp index 07c2ba5ac52..ba13ca63c44 100644 --- a/hotspot/src/share/vm/oops/oop.hpp +++ b/hotspot/src/share/vm/oops/oop.hpp @@ -108,6 +108,13 @@ class oopDesc { // installation of their klass pointer. bool is_parsable(); + // Some perm gen objects that have been allocated and initialized + // can be changed by the VM when not at a safe point (class rededfinition + // is an example). Such objects should not be examined by the + // concurrent processing of a garbage collector if is_conc_safe() + // returns false. + bool is_conc_safe(); + // type test operations (inlined in oop.inline.h) bool is_instance() const; bool is_instanceRef() const; diff --git a/hotspot/src/share/vm/oops/oop.inline.hpp b/hotspot/src/share/vm/oops/oop.inline.hpp index 0c7a3967f48..9161310de60 100644 --- a/hotspot/src/share/vm/oops/oop.inline.hpp +++ b/hotspot/src/share/vm/oops/oop.inline.hpp @@ -435,6 +435,10 @@ inline bool oopDesc::is_parsable() { return blueprint()->oop_is_parsable(this); } +inline bool oopDesc::is_conc_safe() { + return blueprint()->oop_is_conc_safe(this); +} + inline void update_barrier_set(void* p, oop v) { assert(oopDesc::bs() != NULL, "Uninitialized bs in oop!"); oopDesc::bs()->write_ref_field(p, v); diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp index bd8fe2b356b..4cc6b577b47 100644 --- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp +++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp @@ -1230,8 +1230,14 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite( // Constant pools are not easily reused so we allocate a new one // each time. + // merge_cp is created unsafe for concurrent GC processing. It + // should be marked safe before discarding it because, even if + // garbage. If it crosses a card boundary, it may be scanned + // in order to find the start of the first complete object on the card. constantPoolHandle merge_cp(THREAD, - oopFactory::new_constantPool(merge_cp_length, THREAD)); + oopFactory::new_constantPool(merge_cp_length, + methodOopDesc::IsUnsafeConc, + THREAD)); int orig_length = old_cp->orig_length(); if (orig_length == 0) { // This old_cp is an actual original constant pool. We save @@ -1274,6 +1280,7 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite( // rewriting so we can't use the old constant pool with the new // class. + merge_cp()->set_is_conc_safe(true); merge_cp = constantPoolHandle(); // toss the merged constant pool } else if (old_cp->length() < scratch_cp->length()) { // The old constant pool has fewer entries than the new constant @@ -1283,6 +1290,7 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite( // rewriting so we can't use the new constant pool with the old // class. + merge_cp()->set_is_conc_safe(true); merge_cp = constantPoolHandle(); // toss the merged constant pool } else { // The old constant pool has more entries than the new constant @@ -1296,6 +1304,7 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite( set_new_constant_pool(scratch_class, merge_cp, merge_cp_length, true, THREAD); // drop local ref to the merged constant pool + merge_cp()->set_is_conc_safe(true); merge_cp = constantPoolHandle(); } } else { @@ -1325,7 +1334,10 @@ jvmtiError VM_RedefineClasses::merge_cp_and_rewrite( // GCed. set_new_constant_pool(scratch_class, merge_cp, merge_cp_length, true, THREAD); + merge_cp()->set_is_conc_safe(true); } + assert(old_cp()->is_conc_safe(), "Just checking"); + assert(scratch_cp()->is_conc_safe(), "Just checking"); return JVMTI_ERROR_NONE; } // end merge_cp_and_rewrite() @@ -2314,13 +2326,16 @@ void VM_RedefineClasses::set_new_constant_pool( // worst case merge situation. We want to associate the minimum // sized constant pool with the klass to save space. constantPoolHandle smaller_cp(THREAD, - oopFactory::new_constantPool(scratch_cp_length, THREAD)); + oopFactory::new_constantPool(scratch_cp_length, + methodOopDesc::IsUnsafeConc, + THREAD)); // preserve orig_length() value in the smaller copy int orig_length = scratch_cp->orig_length(); assert(orig_length != 0, "sanity check"); smaller_cp->set_orig_length(orig_length); scratch_cp->copy_cp_to(1, scratch_cp_length - 1, smaller_cp, 1, THREAD); scratch_cp = smaller_cp; + smaller_cp()->set_is_conc_safe(true); } // attach new constant pool to klass @@ -2516,6 +2531,7 @@ void VM_RedefineClasses::set_new_constant_pool( rewrite_cp_refs_in_stack_map_table(method, THREAD); } // end for each method + assert(scratch_cp()->is_conc_safe(), "Just checking"); } // end set_new_constant_pool() From 4a82a1723e93972a99effd3f3c514f09c0817e20 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Tue, 13 Jan 2009 09:21:54 -0800 Subject: [PATCH 047/199] 6332094: "jar t" and "jar x" should use ZipFile, not ZipInputStream To use ZipFile for jar "t" and "x" to boost performance Reviewed-by: martin, alanb --- jdk/src/share/classes/sun/tools/jar/Main.java | 156 +++++++++++++----- 1 file changed, 115 insertions(+), 41 deletions(-) diff --git a/jdk/src/share/classes/sun/tools/jar/Main.java b/jdk/src/share/classes/sun/tools/jar/Main.java index 693866e1866..6d2a67810fe 100644 --- a/jdk/src/share/classes/sun/tools/jar/Main.java +++ b/jdk/src/share/classes/sun/tools/jar/Main.java @@ -74,7 +74,6 @@ class Main { static final String MANIFEST = JarFile.MANIFEST_NAME; static final String MANIFEST_DIR = "META-INF/"; static final String VERSION = "1.0"; - static final char SEPARATOR = File.separatorChar; static final String INDEX = JarIndex.INDEX_NAME; private static ResourceBundle rsrc; @@ -227,19 +226,32 @@ class Main { } tmpFile.delete(); } - } else if (xflag || tflag) { - InputStream in; + } else if (tflag) { + replaceFSC(files); if (fname != null) { - in = new FileInputStream(fname); + list(fname, files); } else { - in = new FileInputStream(FileDescriptor.in); + InputStream in = new FileInputStream(FileDescriptor.in); + try{ + list(new BufferedInputStream(in), files); + } finally { + in.close(); + } } - if (xflag) { - extract(new BufferedInputStream(in), files); + } else if (xflag) { + replaceFSC(files); + if (fname != null && files != null) { + extract(fname, files); } else { - list(new BufferedInputStream(in), files); + InputStream in = (fname == null) + ? new FileInputStream(FileDescriptor.in) + : new FileInputStream(fname); + try { + extract(new BufferedInputStream(in), files); + } finally { + in.close(); + } } - in.close(); } else if (iflag) { genIndex(rootjar, files); } @@ -760,6 +772,31 @@ class Main { e.setCrc(crc32.getValue()); } + void replaceFSC(String files[]) { + if (files != null) { + for (String file : files) { + file = file.replace(File.separatorChar, '/'); + } + } + } + + Set newDirSet() { + return new HashSet() { + public boolean add(ZipEntry e) { + return ((e == null || useExtractionTime) ? false : super.add(e)); + }}; + } + + void updateLastModifiedTime(Set zes) throws IOException { + for (ZipEntry ze : zes) { + long lastModified = ze.getTime(); + if (lastModified != -1) { + File f = new File(ze.getName().replace('/', File.separatorChar)); + f.setLastModified(lastModified); + } + } + } + /* * Extracts specified entries from JAR file. */ @@ -768,19 +805,13 @@ class Main { ZipEntry e; // Set of all directory entries specified in archive. Disallows // null entries. Disallows all entries if using pre-6.0 behavior. - Set dirs = new HashSet() { - public boolean add(ZipEntry e) { - return ((e == null || useExtractionTime) ? false : super.add(e)); - }}; - + Set dirs = newDirSet(); while ((e = zis.getNextEntry()) != null) { if (files == null) { dirs.add(extractFile(zis, e)); - } else { String name = e.getName(); - for (int i = 0; i < files.length; i++) { - String file = files[i].replace(File.separatorChar, '/'); + for (String file : files) { if (name.startsWith(file)) { dirs.add(extractFile(zis, e)); break; @@ -793,13 +824,33 @@ class Main { // timestamps as given in the archive. We do this after extraction, // instead of during, because creating a file in a directory changes // that directory's timestamp. - for (ZipEntry dirEntry : dirs) { - long lastModified = dirEntry.getTime(); - if (lastModified != -1) { - File dir = new File(dirEntry.getName().replace('/', File.separatorChar)); - dir.setLastModified(lastModified); + updateLastModifiedTime(dirs); + } + + /* + * Extracts specified entries from JAR file, via ZipFile. + */ + void extract(String fname, String files[]) throws IOException { + ZipFile zf = new ZipFile(fname); + Set dirs = newDirSet(); + Enumeration zes = zf.entries(); + while (zes.hasMoreElements()) { + ZipEntry e = zes.nextElement(); + InputStream is; + if (files == null) { + dirs.add(extractFile(zf.getInputStream(e), e)); + } else { + String name = e.getName(); + for (String file : files) { + if (name.startsWith(file)) { + dirs.add(extractFile(zf.getInputStream(e), e)); + break; + } + } } } + zf.close(); + updateLastModifiedTime(dirs); } /* @@ -807,7 +858,7 @@ class Main { * the entry is for a directory which doesn't exist prior to this * invocation, returns that entry, otherwise returns null. */ - ZipEntry extractFile(ZipInputStream zis, ZipEntry e) throws IOException { + ZipEntry extractFile(InputStream is, ZipEntry e) throws IOException { ZipEntry rc = null; String name = e.getName(); File f = new File(e.getName().replace('/', File.separatorChar)); @@ -838,13 +889,19 @@ class Main { } } OutputStream os = new FileOutputStream(f); - byte[] b = new byte[512]; + byte[] b = new byte[8192]; int len; - while ((len = zis.read(b, 0, b.length)) != -1) { - os.write(b, 0, len); + try { + while ((len = is.read(b, 0, b.length)) != -1) { + os.write(b, 0, len); + } + } finally { + if (is instanceof ZipInputStream) + ((ZipInputStream)is).closeEntry(); + else + is.close(); + os.close(); } - zis.closeEntry(); - os.close(); if (vflag) { if (e.getMethod() == ZipEntry.DEFLATED) { output(formatMsg("out.inflated", name)); @@ -869,7 +926,6 @@ class Main { ZipInputStream zis = new ZipInputStream(in); ZipEntry e; while ((e = zis.getNextEntry()) != null) { - String name = e.getName(); /* * In the case of a compressed (deflated) entry, the entry size * is stored immediately following the entry data and cannot be @@ -877,20 +933,22 @@ class Main { * the entry first before printing out its attributes. */ zis.closeEntry(); - if (files == null) { - printEntry(e); - } else { - for (int i = 0; i < files.length; i++) { - String file = files[i].replace(File.separatorChar, '/'); - if (name.startsWith(file)) { - printEntry(e); - break; - } - } - } + printEntry(e, files); } } + /* + * Lists contents of JAR file, via ZipFile. + */ + void list(String fname, String files[]) throws IOException { + ZipFile zf = new ZipFile(fname); + Enumeration zes = zf.entries(); + while (zes.hasMoreElements()) { + printEntry(zes.nextElement(), files); + } + zf.close(); + } + /** * Output the class index table to the INDEX.LIST file of the * root jar file. @@ -974,13 +1032,29 @@ class Main { dumpIndex(rootjar, index); } + /* + * Prints entry information, if requested. + */ + void printEntry(ZipEntry e, String[] files) throws IOException { + if (files == null) { + printEntry(e); + } else { + String name = e.getName(); + for (String file : files) { + if (name.startsWith(file)) { + printEntry(e); + return; + } + } + } + } /* * Prints entry information. */ void printEntry(ZipEntry e) throws IOException { if (vflag) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); String s = Long.toString(e.getSize()); for (int i = 6 - s.length(); i > 0; --i) { sb.append(' '); From c0731761a3e236408587568745ad9e4a3ecc0165 Mon Sep 17 00:00:00 2001 From: Roman Kennke Date: Tue, 13 Jan 2009 20:04:05 +0100 Subject: [PATCH 048/199] 6792515: Specify awt peer's API Document AWT peer API. Reviewed-by: art, dav --- .../classes/java/awt/peer/ButtonPeer.java | 13 + .../classes/java/awt/peer/CanvasPeer.java | 4 + .../java/awt/peer/CheckboxMenuItemPeer.java | 13 + .../classes/java/awt/peer/CheckboxPeer.java | 31 ++ .../classes/java/awt/peer/ChoicePeer.java | 36 ++ .../classes/java/awt/peer/ComponentPeer.java | 510 ++++++++++++++++-- .../classes/java/awt/peer/ContainerPeer.java | 45 +- .../classes/java/awt/peer/DesktopPeer.java | 19 +- .../classes/java/awt/peer/DialogPeer.java | 29 + .../classes/java/awt/peer/FileDialogPeer.java | 28 + .../share/classes/java/awt/peer/FontPeer.java | 3 + .../classes/java/awt/peer/FramePeer.java | 86 ++- .../awt/peer/KeyboardFocusManagerPeer.java | 34 ++ .../classes/java/awt/peer/LabelPeer.java | 23 + .../share/classes/java/awt/peer/ListPeer.java | 92 +++- .../classes/java/awt/peer/MenuBarPeer.java | 27 + .../java/awt/peer/MenuComponentPeer.java | 18 + .../classes/java/awt/peer/MenuItemPeer.java | 19 +- .../share/classes/java/awt/peer/MenuPeer.java | 25 + .../classes/java/awt/peer/MouseInfoPeer.java | 3 + .../classes/java/awt/peer/PanelPeer.java | 4 + .../classes/java/awt/peer/PopupMenuPeer.java | 12 + .../classes/java/awt/peer/RobotPeer.java | 95 +++- .../classes/java/awt/peer/ScrollPanePeer.java | 54 ++ .../classes/java/awt/peer/ScrollbarPeer.java | 31 ++ .../classes/java/awt/peer/SystemTrayPeer.java | 13 + .../classes/java/awt/peer/TextAreaPeer.java | 46 ++ .../java/awt/peer/TextComponentPeer.java | 75 +++ .../classes/java/awt/peer/TextFieldPeer.java | 33 ++ .../classes/java/awt/peer/TrayIconPeer.java | 46 ++ .../classes/java/awt/peer/WindowPeer.java | 50 ++ 31 files changed, 1448 insertions(+), 69 deletions(-) diff --git a/jdk/src/share/classes/java/awt/peer/ButtonPeer.java b/jdk/src/share/classes/java/awt/peer/ButtonPeer.java index 5b6f43b1d33..8b2190060a5 100644 --- a/jdk/src/share/classes/java/awt/peer/ButtonPeer.java +++ b/jdk/src/share/classes/java/awt/peer/ButtonPeer.java @@ -25,7 +25,11 @@ package java.awt.peer; +import java.awt.Button; + /** + * The peer interface for {@link Button}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -33,5 +37,14 @@ package java.awt.peer; * instances. */ public interface ButtonPeer extends ComponentPeer { + + /** + * Sets the label that is displayed on the button. Can be {@code null} + * when the button should not display a label. + * + * @param label the label string to set + * + * @see Button#setLabel + */ void setLabel(String label); } diff --git a/jdk/src/share/classes/java/awt/peer/CanvasPeer.java b/jdk/src/share/classes/java/awt/peer/CanvasPeer.java index 020a931a77e..bbf6a111086 100644 --- a/jdk/src/share/classes/java/awt/peer/CanvasPeer.java +++ b/jdk/src/share/classes/java/awt/peer/CanvasPeer.java @@ -24,7 +24,11 @@ */ package java.awt.peer; +import java.awt.Canvas; + /** + * The peer interface for {@link Canvas}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers diff --git a/jdk/src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java b/jdk/src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java index d7e5a60de3f..34b9f85c321 100644 --- a/jdk/src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java +++ b/jdk/src/share/classes/java/awt/peer/CheckboxMenuItemPeer.java @@ -24,7 +24,11 @@ */ package java.awt.peer; +import java.awt.CheckboxMenuItem; + /** + * The peer interface for {@link CheckboxMenuItem}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -32,5 +36,14 @@ package java.awt.peer; * instances. */ public interface CheckboxMenuItemPeer extends MenuItemPeer { + + /** + * Sets the state of the checkbox to be checked ({@code true}) or + * unchecked ({@code false}). + * + * @param t the state to set on the checkbox + * + * @see CheckboxMenuItemPeer#setState(boolean) + */ void setState(boolean t); } diff --git a/jdk/src/share/classes/java/awt/peer/CheckboxPeer.java b/jdk/src/share/classes/java/awt/peer/CheckboxPeer.java index 64ecf3a91af..f2126e20f31 100644 --- a/jdk/src/share/classes/java/awt/peer/CheckboxPeer.java +++ b/jdk/src/share/classes/java/awt/peer/CheckboxPeer.java @@ -27,6 +27,8 @@ package java.awt.peer; import java.awt.*; /** + * The peer interface for {@link Checkbox}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,7 +36,36 @@ import java.awt.*; * instances. */ public interface CheckboxPeer extends ComponentPeer { + + /** + * Sets the state of the checkbox to be checked ({@code true}) or + * unchecked ({@code false}). + * + * @param t the state to set on the checkbox + * + * @see Checkbox#setState(boolean) + */ void setState(boolean state); + + /** + * Sets the checkbox group for this checkbox. Checkboxes in one checkbox + * group can only be selected exclusively (like radio buttons). A value + * of {@code null} removes this checkbox from any checkbox group. + * + * @param g the checkbox group to set, or {@code null} when this + * checkbox should not be placed in any group + * + * @see Checkbox#setCheckboxGroup(CheckboxGroup) + */ void setCheckboxGroup(CheckboxGroup g); + + /** + * Sets the label that should be displayed on the ckeckbox. A value of + * {@code null} means that no label should be displayed. + * + * @param label the label to be displayed on the checkbox, or + * {@code null} when no label should be displayed. + */ void setLabel(String label); + } diff --git a/jdk/src/share/classes/java/awt/peer/ChoicePeer.java b/jdk/src/share/classes/java/awt/peer/ChoicePeer.java index 7343ff3db91..7efebdae3fd 100644 --- a/jdk/src/share/classes/java/awt/peer/ChoicePeer.java +++ b/jdk/src/share/classes/java/awt/peer/ChoicePeer.java @@ -24,7 +24,11 @@ */ package java.awt.peer; +import java.awt.Choice; + /** + * The peer interface for {@link Choice}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -32,9 +36,41 @@ package java.awt.peer; * instances. */ public interface ChoicePeer extends ComponentPeer { + + /** + * Adds an item with the string {@code item} to the combo box list + * at index {@code index}. + * + * @param item the label to be added to the list + * @param index the index where to add the item + * + * @see Choice#add(String) + */ void add(String item, int index); + + /** + * Removes the item at index {@code index} from the combo box list. + * + * @param index the index where to remove the item + * + * @see Choice#remove(int) + */ void remove(int index); + + /** + * Removes all items from the combo box list. + * + * @see Choice#removeAll() + */ void removeAll(); + + /** + * Selects the item at index {@code index}. + * + * @param index the index which should be selected + * + * @see Choice#select(int) + */ void select(int index); } diff --git a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java index 79f4eb8a964..e71ab27f7ac 100644 --- a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java +++ b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java @@ -37,6 +37,12 @@ import sun.java2d.pipe.Region; /** + * The peer interface for {@link Component}. This is the top level peer + * interface for widgets and defines the bulk of methods for AWT component + * peers. Most component peers have to implement this interface (via one + * of the subinterfaces), except menu components, which implement + * {@link MenuComponentPeer}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -44,62 +50,474 @@ import sun.java2d.pipe.Region; * instances. */ public interface ComponentPeer { - public static final int SET_LOCATION = 1, - SET_SIZE = 2, - SET_BOUNDS = 3, - SET_CLIENT_SIZE = 4, - RESET_OPERATION = 5, - NO_EMBEDDED_CHECK = (1 << 14), - DEFAULT_OPERATION = SET_BOUNDS; - boolean isObscured(); - boolean canDetermineObscurity(); - void setVisible(boolean b); - void setEnabled(boolean b); - void paint(Graphics g); - void print(Graphics g); - void setBounds(int x, int y, int width, int height, int op); - void handleEvent(AWTEvent e); - void coalescePaintEvent(PaintEvent e); - Point getLocationOnScreen(); - Dimension getPreferredSize(); - Dimension getMinimumSize(); - ColorModel getColorModel(); - Toolkit getToolkit(); - Graphics getGraphics(); - FontMetrics getFontMetrics(Font font); - void dispose(); - void setForeground(Color c); - void setBackground(Color c); - void setFont(Font f); - void updateCursorImmediately(); - boolean requestFocus(Component lightweightChild, - boolean temporary, - boolean focusedWindowChangeAllowed, - long time, CausedFocusEvent.Cause cause); - boolean isFocusable(); - Image createImage(ImageProducer producer); - Image createImage(int width, int height); - VolatileImage createVolatileImage(int width, int height); - boolean prepareImage(Image img, int w, int h, ImageObserver o); - int checkImage(Image img, int w, int h, ImageObserver o); + /** + * Operation for {@link #setBounds(int, int, int, int, int)}, indicating + * a change in the component location only. + * + * @see #setBounds(int, int, int, int, int) + */ + public static final int SET_LOCATION = 1; + + /** + * Operation for {@link #setBounds(int, int, int, int, int)}, indicating + * a change in the component size only. + * + * @see #setBounds(int, int, int, int, int) + */ + public static final int SET_SIZE = 2; + + /** + * Operation for {@link #setBounds(int, int, int, int, int)}, indicating + * a change in the component size and location. + * + * @see #setBounds(int, int, int, int, int) + */ + public static final int SET_BOUNDS = 3; + + /** + * Operation for {@link #setBounds(int, int, int, int, int)}, indicating + * a change in the component client size. This is used for setting + * the 'inside' size of windows, without the border insets. + * + * @see #setBounds(int, int, int, int, int) + */ + public static final int SET_CLIENT_SIZE = 4; + + /** + * Resets the setBounds() operation to DEFAULT_OPERATION. This is not + * passed into {@link #setBounds(int, int, int, int, int)}. + * + * TODO: This is only used internally and should probably be moved outside + * the peer interface. + * + * @see Component#setBoundsOp + */ + public static final int RESET_OPERATION = 5; + + /** + * A flag that is used to suppress checks for embedded frames. + * + * TODO: This is only used internally and should probably be moved outside + * the peer interface. + */ + public static final int NO_EMBEDDED_CHECK = (1 << 14); + + /** + * The default operation, which is to set size and location. + * + * TODO: This is only used internally and should probably be moved outside + * the peer interface. + * + * @see Component#setBoundsOp + */ + public static final int DEFAULT_OPERATION = SET_BOUNDS; + + /** + * Determines if a component has been obscured, i.e. by an overlapping + * window or similar. This is used by JViewport for optimizing performance. + * This doesn't have to be implemented, when + * {@link #canDetermineObscurity()} returns {@code false}. + * + * @return {@code true} when the component has been obscured, + * {@code false} otherwise + * + * @see #canDetermineObscurity() + * @see javax.swing.JViewport#needsRepaintAfterBlit + */ + boolean isObscured(); + + /** + * Returns {@code true} when the peer can determine if a component + * has been obscured, {@code false} false otherwise. + * + * @return {@code true} when the peer can determine if a component + * has been obscured, {@code false} false otherwise + * + * @see #isObscured() + * @see javax.swing.JViewport#needsRepaintAfterBlit + */ + boolean canDetermineObscurity(); + + /** + * Makes a component visible or invisible. + * + * @param v {@code true} to make a component visible, + * {@code false} to make it invisible + * + * @see Component#setVisible(boolean) + */ + void setVisible(boolean v); + + /** + * Enables or disables a component. Disabled components are usually grayed + * out and cannot be activated. + * + * @param e {@code true} to enable the component, {@code false} + * to disable it + * + * @see Component#setEnabled(boolean) + */ + void setEnabled(boolean e); + + /** + * Paints the component to the specified graphics context. This is called + * by {@link Component#paintAll(Graphics)} to paint the component. + * + * @param g the graphics context to paint to + * + * @see Component#paintAll(Graphics) + */ + void paint(Graphics g); + + /** + * Prints the component to the specified graphics context. This is called + * by {@link Component#printAll(Graphics)} to print the component. + * + * @param g the graphics context to print to + * + * @see Component#printAll(Graphics) + */ + void print(Graphics g); + + /** + * Sets the location or size or both of the component. The location is + * specified relative to the component's parent. The {@code op} + * parameter specifies which properties change. If it is + * {@link #SET_LOCATION}, then only the location changes (and the size + * parameters can be ignored). If {@code op} is {@link #SET_SIZE}, + * then only the size changes (and the location can be ignored). If + * {@code op} is {@link #SET_BOUNDS}, then both change. There is a + * special value {@link #SET_CLIENT_SIZE}, which is used only for + * window-like components to set the size of the client (i.e. the 'inner' + * size, without the insets of the window borders). + * + * @param x the X location of the component + * @param y the Y location of the component + * @param width the width of the component + * @param height the height of the component + * @param op the operation flag + * + * @see #SET_BOUNDS + * @see #SET_LOCATION + * @see #SET_SIZE + * @see #SET_CLIENT_SIZE + */ + void setBounds(int x, int y, int width, int height, int op); + + /** + * Called to let the component peer handle events. + * + * @param e the AWT event to handle + * + * @see Component#dispatchEvent(AWTEvent) + */ + void handleEvent(AWTEvent e); + + /** + * Called to coalesce paint events. + * + * @param e the paint event to consider to coalesce + * + * @see EventQueue#coalescePaintEvent + */ + void coalescePaintEvent(PaintEvent e); + + /** + * Determines the location of the component on the screen. + * + * @return the location of the component on the screen + * + * @see Component#getLocationOnScreen() + */ + Point getLocationOnScreen(); + + /** + * Determines the preferred size of the component. + * + * @return the preferred size of the component + * + * @see Component#getPreferredSize() + */ + Dimension getPreferredSize(); + + /** + * Determines the minimum size of the component. + * + * @return the minimum size of the component + * + * @see Component#getMinimumSize() + */ + Dimension getMinimumSize(); + + /** + * Returns the color model used by the component. + * + * @return the color model used by the component + * + * @see Component#getColorModel() + */ + ColorModel getColorModel(); + + /** + * Returns the toolkit that is responsible for the component. + * + * @return the toolkit that is responsible for the component + * + * @see Component#getToolkit() + */ + Toolkit getToolkit(); + + /** + * Returns a graphics object to paint on the component. + * + * @return a graphics object to paint on the component + * + * @see Component#getGraphics() + */ + // TODO: Maybe change this to force Graphics2D, since many things will + // break with plain Graphics nowadays. + Graphics getGraphics(); + + /** + * Returns a font metrics object to determine the metrics properties of + * the specified font. + * + * @param font the font to determine the metrics for + * + * @return a font metrics object to determine the metrics properties of + * the specified font + * + * @see Component#getFontMetrics(Font) + */ + FontMetrics getFontMetrics(Font font); + + /** + * Disposes all resources held by the component peer. This is called + * when the component has been disconnected from the component hierarchy + * and is about to be garbage collected. + * + * @see Component#removeNotify() + */ + void dispose(); + + /** + * Sets the foreground color of this component. + * + * @param c the foreground color to set + * + * @see Component#setForeground(Color) + */ + void setForeground(Color c); + + /** + * Sets the background color of this component. + * + * @param c the background color to set + * + * @see Component#setBackground(Color) + */ + void setBackground(Color c); + + /** + * Sets the font of this component. + * + * @param f the font of this component + * + * @see Component#setFont(Font) + */ + void setFont(Font f); + + /** + * Updates the cursor of the component. + * + * @see Component#updateCursorImmediately + */ + void updateCursorImmediately(); + + /** + * Requests focus on this component. + * + * @param lightweightChild the actual lightweight child that requests the + * focus + * @param temporary {@code true} if the focus change is temporary, + * {@code false} otherwise + * @param focusedWindowChangeAllowed {@code true} if changing the + * focus of the containing window is allowed or not + * @param time the time of the focus change request + * @param cause the cause of the focus change request + * + * @return {@code true} if the focus change is guaranteed to be + * granted, {@code false} otherwise + */ + boolean requestFocus(Component lightweightChild, boolean temporary, + boolean focusedWindowChangeAllowed, long time, + CausedFocusEvent.Cause cause); + + /** + * Returns {@code true} when the component takes part in the focus + * traversal, {@code false} otherwise. + * + * @return {@code true} when the component takes part in the focus + * traversal, {@code false} otherwise + */ + boolean isFocusable(); + + /** + * Creates an image using the specified image producer. + * + * @param producer the image producer from which the image pixels will be + * produced + * + * @return the created image + * + * @see Component#createImage(ImageProducer) + */ + Image createImage(ImageProducer producer); + + /** + * Creates an empty image with the specified width and height. This is + * generally used as a non-accelerated backbuffer for drawing onto the + * component (e.g. by Swing). + * + * @param width the width of the image + * @param height the height of the image + * + * @return the created image + * + * @see Component#createImage(int, int) + */ + // TODO: Maybe make that return a BufferedImage, because some stuff will + // break if a different kind of image is returned. + Image createImage(int width, int height); + + /** + * Creates an empty volatile image with the specified width and height. + * This is generally used as an accelerated backbuffer for drawing onto + * the component (e.g. by Swing). + * + * @param width the width of the image + * @param height the height of the image + * + * @return the created volatile image + * + * @see Component#createVolatileImage(int, int) + */ + // TODO: Include capabilities here and fix Component#createVolatileImage + VolatileImage createVolatileImage(int width, int height); + + /** + * Prepare the specified image for rendering on this component. This should + * start loading the image (if not already loaded) and create an + * appropriate screen representation. + * + * @param img the image to prepare + * @param w the width of the screen representation + * @param h the height of the screen representation + * @param o an image observer to observe the progress + * + * @return {@code true} if the image is already fully prepared, + * {@code false} otherwise + * + * @see Component#prepareImage(Image, int, int, ImageObserver) + */ + boolean prepareImage(Image img, int w, int h, ImageObserver o); + + /** + * Determines the status of the construction of the screen representaion + * of the specified image. + * + * @param img the image to check + * @param w the target width + * @param h the target height + * @param o the image observer to notify + * + * @return the status as bitwise ORed ImageObserver flags + * + * @see Component#checkImage(Image, int, int, ImageObserver) + */ + int checkImage(Image img, int w, int h, ImageObserver o); + + /** + * Returns the graphics configuration that corresponds to this component. + * + * @return the graphics configuration that corresponds to this component + * + * @see Component#getGraphicsConfiguration() + */ GraphicsConfiguration getGraphicsConfiguration(); - boolean handlesWheelScrolling(); - void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException; + + /** + * Determines if the component handles wheel scrolling itself. Otherwise + * it is delegated to the component's parent. + * + * @return {@code true} if the component handles wheel scrolling, + * {@code false} otherwise + * + * @see Component#dispatchEventImpl(AWTEvent) + */ + boolean handlesWheelScrolling(); + + /** + * Create {@code numBuffers} flipping buffers with the specified + * buffer capabilities. + * + * @param numBuffers the number of buffers to create + * @param caps the buffer capabilities + * + * @throws AWTException if flip buffering is not supported + * + * @see Component.FlipBufferStrategy#createBuffers + */ + void createBuffers(int numBuffers, BufferCapabilities caps) + throws AWTException; + + /** + * Returns the back buffer as image. + * + * @return the back buffer as image + * + * @see Component.FlipBufferStrategy#getBackBuffer + */ Image getBackBuffer(); + + /** + * Move the back buffer to the front buffer. + * + * @param x1 the area to be flipped, upper left X coordinate + * @param y1 the area to be flipped, upper left Y coordinate + * @param x2 the area to be flipped, lower right X coordinate + * @param y2 the area to be flipped, lower right Y coordinate + * @param flipAction the flip action to perform + * + * @see Component.FlipBufferStrategy#flip + */ void flip(int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction); + + /** + * Destroys all created buffers. + * + * @see Component.FlipBufferStrategy#destroyBuffers + */ void destroyBuffers(); /** - * Reparents this peer to the new parent referenced by newContainer peer - * Implementation depends on toolkit and container. + * Reparents this peer to the new parent referenced by + * {@code newContainer} peer. Implementation depends on toolkit and + * container. + * * @param newContainer peer of the new parent container + * * @since 1.5 */ void reparent(ContainerPeer newContainer); + /** - * Returns whether this peer supports reparenting to another parent withour destroying the peer + * Returns whether this peer supports reparenting to another parent without + * destroying the peer. + * * @return true if appropriate reparent is supported, false otherwise + * * @since 1.5 */ boolean isReparentSupported(); @@ -108,12 +526,16 @@ public interface ComponentPeer { * Used by lightweight implementations to tell a ComponentPeer to layout * its sub-elements. For instance, a lightweight Checkbox needs to layout * the box, as well as the text label. + * + * @see Component#validate() */ - void layout(); + void layout(); /** * Applies the shape to the native component window. * @since 1.7 + * + * @see Component#applyCompoundShape */ void applyShape(Region shape); diff --git a/jdk/src/share/classes/java/awt/peer/ContainerPeer.java b/jdk/src/share/classes/java/awt/peer/ContainerPeer.java index cda790a6048..092a54f2a24 100644 --- a/jdk/src/share/classes/java/awt/peer/ContainerPeer.java +++ b/jdk/src/share/classes/java/awt/peer/ContainerPeer.java @@ -27,6 +27,9 @@ package java.awt.peer; import java.awt.*; /** + * The peer interface for {@link Container}. This is the parent interface + * for all container like widgets. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,21 +37,59 @@ import java.awt.*; * instances. */ public interface ContainerPeer extends ComponentPeer { + + /** + * Returns the insets of this container. Insets usually is the space that + * is occupied by things like borders. + * + * @return the insets of this container + */ Insets getInsets(); + + /** + * Notifies the peer that validation of the component tree is about to + * begin. + * + * @see Container#validate() + */ void beginValidate(); + + /** + * Notifies the peer that validation of the component tree is finished. + * + * @see Container#validate() + */ void endValidate(); + + /** + * Notifies the peer that layout is about to begin. This is called + * before the container itself and its children are laid out. + * + * @see Container#validateTree() + */ void beginLayout(); + + /** + * Notifies the peer that layout is finished. This is called after the + * container and its children have been laid out. + * + * @see Container#validateTree() + */ void endLayout(); /** - * Restacks native windows - children of this native window - according to Java container order + * Restacks native windows - children of this native window - according to + * Java container order. + * * @since 1.5 */ void restack(); /** - * Indicates availabiltity of restacking operation in this container. + * Indicates availability of restacking operation in this container. + * * @return Returns true if restack is supported, false otherwise + * * @since 1.5 */ boolean isRestackSupported(); diff --git a/jdk/src/share/classes/java/awt/peer/DesktopPeer.java b/jdk/src/share/classes/java/awt/peer/DesktopPeer.java index e0e5ad2ad62..1b2d1bdb87b 100644 --- a/jdk/src/share/classes/java/awt/peer/DesktopPeer.java +++ b/jdk/src/share/classes/java/awt/peer/DesktopPeer.java @@ -32,7 +32,7 @@ import java.net.URI; import java.awt.Desktop.Action; /** - * The DesktopPeer interface provides methods for the operation + * The {@code DesktopPeer} interface provides methods for the operation * of open, edit, print, browse and mail with the given URL or file, by * launching the associated application. *

@@ -40,14 +40,15 @@ import java.awt.Desktop.Action; * */ public interface DesktopPeer { + /** * Returns whether the given action is supported on the current platform. * @param action the action type to be tested if it's supported on the * current platform. - * @return true if the given action is supported on - * the current platform; false otherwise. + * @return {@code true} if the given action is supported on + * the current platform; {@code false} otherwise. */ - public boolean isSupported(Action action); + boolean isSupported(Action action); /** * Launches the associated application to open the given file. The @@ -58,7 +59,7 @@ public interface DesktopPeer { * @throws IOException If the given file has no associated application, * or the associated application fails to be launched. */ - public void open(File file) throws IOException; + void open(File file) throws IOException; /** * Launches the associated editor and opens the given file for editing. The @@ -69,7 +70,7 @@ public interface DesktopPeer { * @throws IOException If the given file has no associated editor, or * the associated application fails to be launched. */ - public void edit(File file) throws IOException; + void edit(File file) throws IOException; /** * Prints the given file with the native desktop printing facility, using @@ -79,7 +80,7 @@ public interface DesktopPeer { * @throws IOException If the given file has no associated application * that can be used to print it. */ - public void print(File file) throws IOException; + void print(File file) throws IOException; /** * Launches the mail composing window of the user default mail client, @@ -93,7 +94,7 @@ public interface DesktopPeer { * @throws IOException If the user default mail client is not found, * or it fails to be launched. */ - public void mail(URI mailtoURL) throws IOException; + void mail(URI mailtoURL) throws IOException; /** * Launches the user default browser to display the given URI. @@ -102,5 +103,5 @@ public interface DesktopPeer { * @throws IOException If the user default browser is not found, * or it fails to be launched. */ - public void browse(URI url) throws IOException; + void browse(URI url) throws IOException; } diff --git a/jdk/src/share/classes/java/awt/peer/DialogPeer.java b/jdk/src/share/classes/java/awt/peer/DialogPeer.java index 7c08206d4f4..27ac26ffff0 100644 --- a/jdk/src/share/classes/java/awt/peer/DialogPeer.java +++ b/jdk/src/share/classes/java/awt/peer/DialogPeer.java @@ -28,6 +28,9 @@ package java.awt.peer; import java.awt.*; /** + * The peer interface for {@link Dialog}. This adds a couple of dialog specific + * features to the {@link WindowPeer} interface. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -35,7 +38,33 @@ import java.awt.*; * instances. */ public interface DialogPeer extends WindowPeer { + + /** + * Sets the title on the dialog window. + * + * @param title the title to set + * + * @see Dialog#setTitle(String) + */ void setTitle(String title); + + /** + * Sets if the dialog should be resizable or not. + * + * @param resizeable {@code true} when the dialog should be resizable, + * {@code false} if not + * + * @see Dialog#setResizable(boolean) + */ void setResizable(boolean resizeable); + + /** + * Block the specified windows. This is used for modal dialogs. + * + * @param windows the windows to block + * + * @see Dialog#modalShow() + * @see Dialog#blockWindows() + */ void blockWindows(java.util.List windows); } diff --git a/jdk/src/share/classes/java/awt/peer/FileDialogPeer.java b/jdk/src/share/classes/java/awt/peer/FileDialogPeer.java index d4a326a4e54..29fc4fdb5af 100644 --- a/jdk/src/share/classes/java/awt/peer/FileDialogPeer.java +++ b/jdk/src/share/classes/java/awt/peer/FileDialogPeer.java @@ -25,9 +25,12 @@ package java.awt.peer; +import java.awt.FileDialog; import java.io.FilenameFilter; /** + * The peer interface for {@link FileDialog}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -35,7 +38,32 @@ import java.io.FilenameFilter; * instances. */ public interface FileDialogPeer extends DialogPeer { + + /** + * Sets the selected file for this file dialog. + * + * @param file the file to set as selected file, or {@code null} for + * no selected file + * + * @see FileDialog#setFile(String) + */ void setFile(String file); + + /** + * Sets the current directory for this file dialog. + * + * @param dir the directory to set + * + * @see FileDialog#setDirectory(String) + */ void setDirectory(String dir); + + /** + * Sets the filename filter for filtering the displayed files. + * + * @param filter the filter to set + * + * @see FileDialog#setFilenameFilter(FilenameFilter) + */ void setFilenameFilter(FilenameFilter filter); } diff --git a/jdk/src/share/classes/java/awt/peer/FontPeer.java b/jdk/src/share/classes/java/awt/peer/FontPeer.java index 471c3fd1fce..63a592692e1 100644 --- a/jdk/src/share/classes/java/awt/peer/FontPeer.java +++ b/jdk/src/share/classes/java/awt/peer/FontPeer.java @@ -26,6 +26,9 @@ package java.awt.peer; /** + * The peer interface for fonts. This is only a marker interface and not + * used by AWT itself. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers diff --git a/jdk/src/share/classes/java/awt/peer/FramePeer.java b/jdk/src/share/classes/java/awt/peer/FramePeer.java index 76f0080f7f9..942b92cc852 100644 --- a/jdk/src/share/classes/java/awt/peer/FramePeer.java +++ b/jdk/src/share/classes/java/awt/peer/FramePeer.java @@ -27,7 +27,12 @@ package java.awt.peer; import java.awt.*; +import sun.awt.EmbeddedFrame; + /** + * The peer interface for {@link Frame}. This adds a couple of frame specific + * methods to the {@link WindowPeer} interface. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -35,12 +40,89 @@ import java.awt.*; * instances. */ public interface FramePeer extends WindowPeer { + + /** + * Sets the title on the frame. + * + * @param title the title to set + * + * @see Frame#setTitle(String) + */ void setTitle(String title); + + /** + * Sets the menu bar for the frame. + * + * @param mb the menu bar to set + * + * @see Frame#setMenuBar(MenuBar) + */ void setMenuBar(MenuBar mb); + + /** + * Sets if the frame should be resizable or not. + * + * @param resizeable {@code true} when the frame should be resizable, + * {@code false} if not + * + * @see Frame#setResizable(boolean) + */ void setResizable(boolean resizeable); + + /** + * Changes the state of the frame. + * + * @param state the new state + * + * @see Frame#setExtendedState(int) + */ void setState(int state); - int getState(); - void setMaximizedBounds(Rectangle bounds); // XXX + + /** + * Returns the current state of the frame. + * + * @return the current state of the frame + * + * @see Frame#getExtendedState() + */ + int getState(); + + /** + * Sets the bounds of the frame when it becomes maximized. + * + * @param bounds the maximized bounds of the frame + * + * @see Frame#setMaximizedBounds(Rectangle) + */ + void setMaximizedBounds(Rectangle bounds); + + /** + * Sets the size and location for embedded frames. (On embedded frames, + * setLocation() and setBounds() always set the frame to (0,0) for + * backwards compatibility. + * + * @param x the X location + * @param y the Y location + * @param width the width of the frame + * @param height the height of the frame + * + * @see EmbeddedFrame#setBoundsPrivate(int, int, int, int) + */ + // TODO: This is only used in EmbeddedFrame, and should probably be moved + // into an EmbeddedFramePeer which would extend FramePeer void setBoundsPrivate(int x, int y, int width, int height); + + /** + * Returns the size and location for embedded frames. (On embedded frames, + * setLocation() and setBounds() always set the frame to (0,0) for + * backwards compatibility. + * + * @return the bounds of an embedded frame + * + * @see EmbeddedFrame#getBoundsPrivate() + */ + // TODO: This is only used in EmbeddedFrame, and should probably be moved + // into an EmbeddedFramePeer which would extend FramePeer Rectangle getBoundsPrivate(); + } diff --git a/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java b/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java index f00db93415e..e465de83e2c 100644 --- a/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java +++ b/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java @@ -28,11 +28,45 @@ package java.awt.peer; import java.awt.Component; import java.awt.Window; +/** + * The native peer interface for {@link KeyboardFocusManager}. + */ public interface KeyboardFocusManagerPeer { + + /** + * Returns the currently focused window. + * + * @return the currently focused window + * + * @see KeyboardFocusManager#getNativeFocusedWindow() + */ Window getCurrentFocusedWindow(); + /** + * Sets the component that should become the focus owner. + * + * @param comp the component to become the focus owner + * + * @see KeyboardFocusManager#setNativeFocusOwner(Component) + */ void setCurrentFocusOwner(Component comp); + + /** + * Returns the component that currently owns the input focus. + * + * @return the component that currently owns the input focus + * + * @see KeyboardFocusManager#getNativeFocusOwner() + */ Component getCurrentFocusOwner(); + /** + * Clears the current global focus owner. + * + * @param activeWindow + * + * @see KeyboardFocusManager#clearGlobalFocusOwner() + */ void clearGlobalFocusOwner(Window activeWindow); + } diff --git a/jdk/src/share/classes/java/awt/peer/LabelPeer.java b/jdk/src/share/classes/java/awt/peer/LabelPeer.java index 3952605581d..5421d56e46e 100644 --- a/jdk/src/share/classes/java/awt/peer/LabelPeer.java +++ b/jdk/src/share/classes/java/awt/peer/LabelPeer.java @@ -24,7 +24,11 @@ */ package java.awt.peer; +import java.awt.Label; + /** + * The peer interface for {@link Label}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -32,6 +36,25 @@ package java.awt.peer; * instances. */ public interface LabelPeer extends ComponentPeer { + + /** + * Sets the text to be displayed on the label. + * + * @param label the text to be displayed on the label + * + * @see Label#setText + */ void setText(String label); + + /** + * Sets the alignment of the label text. + * + * @param alignment the alignment of the label text + * + * @see Label#setAlignment(int) + * @see Label#CENTER + * @see Label#RIGHT + * @see Label#LEFT + */ void setAlignment(int alignment); } diff --git a/jdk/src/share/classes/java/awt/peer/ListPeer.java b/jdk/src/share/classes/java/awt/peer/ListPeer.java index 16548df6a19..87ce55b1cc4 100644 --- a/jdk/src/share/classes/java/awt/peer/ListPeer.java +++ b/jdk/src/share/classes/java/awt/peer/ListPeer.java @@ -25,8 +25,11 @@ package java.awt.peer; import java.awt.Dimension; +import java.awt.List; /** + * The peer interface for {@link List}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,15 +37,102 @@ import java.awt.Dimension; * instances. */ public interface ListPeer extends ComponentPeer { + + /** + * Returns the indices of the list items that are currently selected. + * The returned array is not required to be a copy, the callers of this + * method already make sure it is not modified. + * + * @return the indices of the list items that are currently selected + * + * @see List#getSelectedIndexes() + */ int[] getSelectedIndexes(); + + /** + * Adds an item to the list at the specified index. + * + * @param item the item to add to the list + * @param index the index where to add the item into the list + * + * @see List#add(String, int) + */ void add(String item, int index); + + /** + * Deletes items from the list. All items from start to end should are + * deleted, including the item at the start and end indices. + * + * @param start the first item to be deleted + * @param end the last item to be deleted + */ void delItems(int start, int end); + + /** + * Removes all items from the list. + * + * @see List#removeAll() + */ void removeAll(); + + /** + * Selects the item at the specified {@code index}. + * + * @param index the index of the item to select + * + * @see List#select(int) + */ void select(int index); + + /** + * De-selects the item at the specified {@code index}. + * + * @param index the index of the item to de-select + * + * @see List#deselect(int) + */ void deselect(int index); + + /** + * Makes sure that the item at the specified {@code index} is visible, + * by scrolling the list or similar. + * + * @param index the index of the item to make visible + * + * @see List#makeVisible(int) + */ void makeVisible(int index); - void setMultipleMode(boolean b); + + /** + * Toggles multiple selection mode on or off. + * + * @param m {@code true} for multiple selection mode, + * {@code false} for single selection mode + * + * @see List#setMultipleMode(boolean) + */ + void setMultipleMode(boolean m); + + /** + * Returns the preferred size for a list with the specified number of rows. + * + * @param rows the number of rows + * + * @return the preferred size of the list + * + * @see List#getPreferredSize(int) + */ Dimension getPreferredSize(int rows); + + /** + * Returns the minimum size for a list with the specified number of rows. + * + * @param rows the number of rows + * + * @return the minimum size of the list + * + * @see List#getMinimumSize(int) + */ Dimension getMinimumSize(int rows); } diff --git a/jdk/src/share/classes/java/awt/peer/MenuBarPeer.java b/jdk/src/share/classes/java/awt/peer/MenuBarPeer.java index 41b6e30b6f1..fd3a73fd5ad 100644 --- a/jdk/src/share/classes/java/awt/peer/MenuBarPeer.java +++ b/jdk/src/share/classes/java/awt/peer/MenuBarPeer.java @@ -25,8 +25,11 @@ package java.awt.peer; import java.awt.Menu; +import java.awt.MenuBar; /** + * The peer interface for {@link MenuBar}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,7 +37,31 @@ import java.awt.Menu; * instances. */ public interface MenuBarPeer extends MenuComponentPeer { + + /** + * Adds a menu to the menu bar. + * + * @param m the menu to add + * + * @see MenuBar#add(Menu) + */ void addMenu(Menu m); + + /** + * Deletes a menu from the menu bar. + * + * @param index the index of the menu to remove + * + * @see MenuBar#remove(int) + */ void delMenu(int index); + + /** + * Adds a help menu to the menu bar. + * + * @param m the help menu to add + * + * @see MenuBar#setHelpMenu(Menu) + */ void addHelpMenu(Menu m); } diff --git a/jdk/src/share/classes/java/awt/peer/MenuComponentPeer.java b/jdk/src/share/classes/java/awt/peer/MenuComponentPeer.java index 83e43e7715c..fa20a4d494f 100644 --- a/jdk/src/share/classes/java/awt/peer/MenuComponentPeer.java +++ b/jdk/src/share/classes/java/awt/peer/MenuComponentPeer.java @@ -25,8 +25,12 @@ package java.awt.peer; import java.awt.Font; +import java.awt.MenuComponent; /** + * The base interface for all kinds of menu components. This is used by + * {@link MenuComponent}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,6 +38,20 @@ import java.awt.Font; * instances. */ public interface MenuComponentPeer { + + /** + * Disposes the menu component. + * + * @see MenuComponent#removeNotify() + */ void dispose(); + + /** + * Sets the font for the menu component. + * + * @param f the font to use for the menu component + * + * @see MenuComponent#setFont(Font) + */ void setFont(Font f); } diff --git a/jdk/src/share/classes/java/awt/peer/MenuItemPeer.java b/jdk/src/share/classes/java/awt/peer/MenuItemPeer.java index 51a52d993c3..7551bd55203 100644 --- a/jdk/src/share/classes/java/awt/peer/MenuItemPeer.java +++ b/jdk/src/share/classes/java/awt/peer/MenuItemPeer.java @@ -24,7 +24,11 @@ */ package java.awt.peer; +import java.awt.MenuItem; + /** + * The peer interface for menu items. This is used by {@link MenuItem}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -32,7 +36,20 @@ package java.awt.peer; * instances. */ public interface MenuItemPeer extends MenuComponentPeer { + + /** + * Sets the label to be displayed in this menu item. + * + * @param label the label to be displayed + */ void setLabel(String label); - void setEnabled(boolean b); + + /** + * Enables or disables the menu item. + * + * @param e {@code true} to enable the menu item, {@code false} + * to disable it + */ + void setEnabled(boolean e); } diff --git a/jdk/src/share/classes/java/awt/peer/MenuPeer.java b/jdk/src/share/classes/java/awt/peer/MenuPeer.java index 9e941aabeaa..2b399ef6a57 100644 --- a/jdk/src/share/classes/java/awt/peer/MenuPeer.java +++ b/jdk/src/share/classes/java/awt/peer/MenuPeer.java @@ -24,9 +24,12 @@ */ package java.awt.peer; +import java.awt.Menu; import java.awt.MenuItem; /** + * The peer interface for menus. This is used by {@link Menu}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,7 +37,29 @@ import java.awt.MenuItem; * instances. */ public interface MenuPeer extends MenuItemPeer { + + /** + * Adds a separator (e.g. a horizontal line or similar) to the menu. + * + * @see Menu#addSeparator() + */ void addSeparator(); + + /** + * Adds the specified menu item to the menu. + * + * @param item the menu item to add + * + * @see Menu#add(MenuItem) + */ void addItem(MenuItem item); + + /** + * Removes the menu item at the specified index. + * + * @param index the index of the item to remove + * + * @see Menu#remove(int) + */ void delItem(int index); } diff --git a/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java b/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java index 3e1cd536022..c3297943eef 100644 --- a/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java +++ b/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java @@ -29,6 +29,9 @@ import java.awt.Window; import java.awt.Point; /** + * Peer interface for {@link MouseInfo}. This is used to get some additional + * information about the mouse. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers diff --git a/jdk/src/share/classes/java/awt/peer/PanelPeer.java b/jdk/src/share/classes/java/awt/peer/PanelPeer.java index bb123adc98c..1b443bcb786 100644 --- a/jdk/src/share/classes/java/awt/peer/PanelPeer.java +++ b/jdk/src/share/classes/java/awt/peer/PanelPeer.java @@ -25,6 +25,10 @@ package java.awt.peer; /** + * The peer interface for {@link Panel}. This is a subinterface of + * ContainerPeer and does not declare any additional methods because a Panel + * is just that, a concrete Container. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers diff --git a/jdk/src/share/classes/java/awt/peer/PopupMenuPeer.java b/jdk/src/share/classes/java/awt/peer/PopupMenuPeer.java index 1bad6bc0988..16eeb1fb2fe 100644 --- a/jdk/src/share/classes/java/awt/peer/PopupMenuPeer.java +++ b/jdk/src/share/classes/java/awt/peer/PopupMenuPeer.java @@ -25,8 +25,11 @@ package java.awt.peer; import java.awt.Event; +import java.awt.PopupMenu; /** + * The peer interface for {@link PopupMenu}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,5 +37,14 @@ import java.awt.Event; * instances. */ public interface PopupMenuPeer extends MenuPeer { + + /** + * Shows the popup menu. + * + * @param e a synthetic event describing the origin and location of the + * popup menu + * + * @see PopupMenu#show(java.awt.Component, int, int) + */ void show(Event e); } diff --git a/jdk/src/share/classes/java/awt/peer/RobotPeer.java b/jdk/src/share/classes/java/awt/peer/RobotPeer.java index 78474b09dec..ce50ed58795 100644 --- a/jdk/src/share/classes/java/awt/peer/RobotPeer.java +++ b/jdk/src/share/classes/java/awt/peer/RobotPeer.java @@ -39,18 +39,93 @@ import java.awt.*; */ public interface RobotPeer { - public void mouseMove(int x, int y); - public void mousePress(int buttons); - public void mouseRelease(int buttons); + /** + * Moves the mouse pointer to the specified screen location. + * + * @param x the X location on screen + * @param y the Y location on screen + * + * @see Robot#mouseMove(int, int) + */ + void mouseMove(int x, int y); - public void mouseWheel(int wheelAmt); + /** + * Simulates a mouse press with the specified button(s). + * + * @param buttons the button mask + * + * @see Robot#mousePress(int) + */ + void mousePress(int buttons); - public void keyPress(int keycode); - public void keyRelease(int keycode); + /** + * Simulates a mouse release with the specified button(s). + * + * @param buttons the button mask + * + * @see Robot#mouseRelease(int) + */ + void mouseRelease(int buttons); - public int getRGBPixel(int x, int y); - public int [] getRGBPixels(Rectangle bounds); + /** + * Simulates mouse wheel action. + * + * @param wheelAmt number of notches to move the mouse wheel + * + * @see Robot#mouseWheel(int) + */ + void mouseWheel(int wheelAmt); - public void dispose(); - public int getNumberOfButtons(); + /** + * Simulates a key press of the specified key. + * + * @param keycode the key code to press + * + * @see Robot#keyPress(int) + */ + void keyPress(int keycode); + + /** + * Simulates a key release of the specified key. + * + * @param keycode the key code to release + * + * @see Robot#keyRelease(int) + */ + void keyRelease(int keycode); + + /** + * Gets the RGB value of the specified pixel on screen. + * + * @param x the X screen coordinate + * @param y the Y screen coordinate + * + * @return the RGB value of the specified pixel on screen + * + * @see Robot#getPixelColor(int, int) + */ + int getRGBPixel(int x, int y); + + /** + * Gets the RGB values of the specified screen area as an array. + * + * @param bounds the screen area to capture the RGB values from + * + * @return the RGB values of the specified screen area + * + * @see Robot#createScreenCapture(Rectangle) + */ + int[] getRGBPixels(Rectangle bounds); + + /** + * Disposes the robot peer when it is not needed anymore. + */ + void dispose(); + + /** + * Returns the number of buttons that the robot simulates. + * + * @return the number of buttons that the robot simulates + */ + int getNumberOfButtons(); } diff --git a/jdk/src/share/classes/java/awt/peer/ScrollPanePeer.java b/jdk/src/share/classes/java/awt/peer/ScrollPanePeer.java index 0097bdeb3e8..b6529afe6dc 100644 --- a/jdk/src/share/classes/java/awt/peer/ScrollPanePeer.java +++ b/jdk/src/share/classes/java/awt/peer/ScrollPanePeer.java @@ -25,8 +25,12 @@ package java.awt.peer; import java.awt.Adjustable; +import java.awt.ScrollPane; +import java.awt.ScrollPaneAdjustable; /** + * The peer interface for {@link ScrollPane}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,10 +38,60 @@ import java.awt.Adjustable; * instances. */ public interface ScrollPanePeer extends ContainerPeer { + + /** + * Returns the height of the horizontal scroll bar. + * + * @return the height of the horizontal scroll bar + * + * @see ScrollPane#getHScrollbarHeight() + */ int getHScrollbarHeight(); + + /** + * Returns the width of the vertical scroll bar. + * + * @return the width of the vertical scroll bar + * + * @see ScrollPane#getVScrollbarWidth() + */ int getVScrollbarWidth(); + + /** + * Sets the scroll position of the child. + * + * @param x the X coordinate of the scroll position + * @param y the Y coordinate of the scroll position + * + * @see ScrollPane#setScrollPosition(int, int) + */ void setScrollPosition(int x, int y); + + /** + * Called when the child component changes its size. + * + * @param w the new width of the child component + * @param h the new height of the child component + * + * @see ScrollPane#layout() + */ void childResized(int w, int h); + + /** + * Sets the unit increment of one of the scroll pane's adjustables. + * + * @param adj the scroll pane adjustable object + * @param u the unit increment + * + * @see ScrollPaneAdjustable#setUnitIncrement(int) + */ void setUnitIncrement(Adjustable adj, int u); + + /** + * Sets the value for one of the scroll pane's adjustables. + * + * @param adj the scroll pane adjustable object + * @param v the value to set + */ void setValue(Adjustable adj, int v); } diff --git a/jdk/src/share/classes/java/awt/peer/ScrollbarPeer.java b/jdk/src/share/classes/java/awt/peer/ScrollbarPeer.java index e3b11139ed8..c9e1b49dd45 100644 --- a/jdk/src/share/classes/java/awt/peer/ScrollbarPeer.java +++ b/jdk/src/share/classes/java/awt/peer/ScrollbarPeer.java @@ -24,7 +24,11 @@ */ package java.awt.peer; +import java.awt.Scrollbar; + /** + * The peer interface for {@link Scrollbar}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -32,7 +36,34 @@ package java.awt.peer; * instances. */ public interface ScrollbarPeer extends ComponentPeer { + + /** + * Sets the parameters for the scrollbar. + * + * @param value the current value + * @param visible how much of the whole scale is visible + * @param minimum the minimum value + * @param maximum the maximum value + * + * @see Scrollbar#setValues(int, int, int, int) + */ void setValues(int value, int visible, int minimum, int maximum); + + /** + * Sets the line increment of the scrollbar. + * + * @param l the line increment + * + * @see Scrollbar#setLineIncrement(int) + */ void setLineIncrement(int l); + + /** + * Sets the page increment of the scrollbar. + * + * @param l the page increment + * + * @see Scrollbar#setPageIncrement(int) + */ void setPageIncrement(int l); } diff --git a/jdk/src/share/classes/java/awt/peer/SystemTrayPeer.java b/jdk/src/share/classes/java/awt/peer/SystemTrayPeer.java index 883e2459061..30ce90ac42e 100644 --- a/jdk/src/share/classes/java/awt/peer/SystemTrayPeer.java +++ b/jdk/src/share/classes/java/awt/peer/SystemTrayPeer.java @@ -26,7 +26,20 @@ package java.awt.peer; import java.awt.Dimension; +import java.awt.SystemTray; +/** + * The peer interface for {@link SystemTray}. This doesn't need to be + * implemented if {@link SystemTray#isSupported()} returns false. + */ public interface SystemTrayPeer { + + /** + * Returns the size of the system tray icon. + * + * @return the size of the system tray icon + * + * @see SystemTray#getTrayIconSize() + */ Dimension getTrayIconSize(); } diff --git a/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java b/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java index a73068c04af..0dcafb5899f 100644 --- a/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java +++ b/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java @@ -25,8 +25,11 @@ package java.awt.peer; import java.awt.Dimension; +import java.awt.TextArea; /** + * The peer interface for {@link TexTArea}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,9 +37,52 @@ import java.awt.Dimension; * instances. */ public interface TextAreaPeer extends TextComponentPeer { + + /** + * Inserts the specified text at the specified position in the document. + * + * @param text the text to insert + * @param pos the position to insert + * + * @see TextArea#insert(String, int) + */ void insert(String text, int pos); + + /** + * Replaces a range of text by the specified string + * + * @param text the replacement string + * @param start the begin of the range to replace + * @param end the end of the range to replace + * + * @see TextArea#replaceRange(String, int, int) + */ void replaceRange(String text, int start, int end); + + /** + * Returns the preferred size of a textarea with the specified number of + * columns and rows. + * + * @param rows the number of rows + * @param columns the number of columns + * + * @return the preferred size of a textarea + * + * @see TextArea#getPreferredSize(int, int) + */ Dimension getPreferredSize(int rows, int columns); + + /** + * Returns the minimum size of a textarea with the specified number of + * columns and rows. + * + * @param rows the number of rows + * @param columns the number of columns + * + * @return the minimum size of a textarea + * + * @see TextArea#getMinimumSize(int, int) + */ Dimension getMinimumSize(int rows, int columns); } diff --git a/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java b/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java index cd318092b7d..35228e5753d 100644 --- a/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java +++ b/jdk/src/share/classes/java/awt/peer/TextComponentPeer.java @@ -24,9 +24,12 @@ */ package java.awt.peer; +import java.awt.TextComponent; import java.awt.im.InputMethodRequests; /** + * The peer interface for {@link TextComponent}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,13 +37,85 @@ import java.awt.im.InputMethodRequests; * instances. */ public interface TextComponentPeer extends ComponentPeer { + + /** + * Sets if the text component should be editable or not. + * + * @param editable {@code true} for editable text components, + * {@code false} for non-editable text components + * + * @see TextComponent#setEditable(boolean) + */ void setEditable(boolean editable); + + /** + * Returns the current content of the text component. + * + * @return the current content of the text component + * + * @see TextComponent#getText() + */ String getText(); + + /** + * Sets the content for the text component. + * + * @param l the content to set + * + * @see TextComponent#setText(String) + */ void setText(String l); + + /** + * Returns the start index of the current selection. + * + * @return the start index of the current selection + * + * @see TextComponent#getSelectionStart() + */ int getSelectionStart(); + + /** + * Returns the end index of the current selection. + * + * @return the end index of the current selection + * + * @see TextComponent#getSelectionEnd() + */ int getSelectionEnd(); + + /** + * Selects an area of the text component. + * + * @param selStart the start index of the new selection + * @param selEnd the end index of the new selection + * + * @see TextComponent#select(int, int) + */ void select(int selStart, int selEnd); + + /** + * Sets the caret position of the text component. + * + * @param pos the caret position to set + * + * @see TextComponent#setCaretPosition(int) + */ void setCaretPosition(int pos); + + /** + * Returns the current caret position. + * + * @return the current caret position + * + * @see TextComponent#getCaretPosition() + */ int getCaretPosition(); + + /** + * Returns the input method requests. + * + * @return the input method requests + */ InputMethodRequests getInputMethodRequests(); } diff --git a/jdk/src/share/classes/java/awt/peer/TextFieldPeer.java b/jdk/src/share/classes/java/awt/peer/TextFieldPeer.java index 4fec4e8ef2d..4c6c6cea33a 100644 --- a/jdk/src/share/classes/java/awt/peer/TextFieldPeer.java +++ b/jdk/src/share/classes/java/awt/peer/TextFieldPeer.java @@ -25,8 +25,11 @@ package java.awt.peer; import java.awt.Dimension; +import java.awt.TextField; /** + * The peer interface for {@link TextField}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -34,8 +37,38 @@ import java.awt.Dimension; * instances. */ public interface TextFieldPeer extends TextComponentPeer { + + /** + * Sets the echo character. + * + * @param echoChar the echo character to set + * + * @see TextField#getEchoChar() + */ void setEchoChar(char echoChar); + + /** + * Returns the preferred size of the text field with the specified number + * of columns. + * + * @param columns the number of columns + * + * @return the preferred size of the text field + * + * @see TextField#getPreferredSize(int) + */ Dimension getPreferredSize(int columns); + + /** + * Returns the minimum size of the text field with the specified number + * of columns. + * + * @param columns the number of columns + * + * @return the minimum size of the text field + * + * @see TextField#getMinimumSize(int) + */ Dimension getMinimumSize(int columns); } diff --git a/jdk/src/share/classes/java/awt/peer/TrayIconPeer.java b/jdk/src/share/classes/java/awt/peer/TrayIconPeer.java index 6e7c23fad3e..6b1a583b48a 100644 --- a/jdk/src/share/classes/java/awt/peer/TrayIconPeer.java +++ b/jdk/src/share/classes/java/awt/peer/TrayIconPeer.java @@ -25,10 +25,56 @@ package java.awt.peer; +import java.awt.SystemTray; +import java.awt.TrayIcon; + +/** + * The peer interface for the {@link TrayIcon}. This doesn't need to be + * implemented if {@link SystemTray#isSupported()} returns false. + */ public interface TrayIconPeer { + + /** + * Disposes the tray icon and releases and resources held by it. + * + * @see TrayIcon#removeNotify() + */ void dispose(); + + /** + * Sets the tool tip for the tray icon. + * + * @param tooltip the tooltip to set + * + * @see TrayIcon#setToolTip(String) + */ void setToolTip(String tooltip); + + /** + * Updates the icon image. This is supposed to display the current icon + * from the TrayIcon component in the actual tray icon. + * + * @see TrayIcon#setImage(java.awt.Image) + * @see TrayIcon#setImageAutoSize(boolean) + */ void updateImage(); + + /** + * Displays a message at the tray icon. + * + * @param caption the message caption + * @param text the actual message text + * @param messageType the message type + * + * @see TrayIcon#displayMessage(String, String, java.awt.TrayIcon.MessageType) + */ void displayMessage(String caption, String text, String messageType); + + /** + * Shows the popup menu of this tray icon at the specified position. + * + * @param x the X location for the popup menu + * @param y the Y location for the popup menu + */ void showPopupMenu(int x, int y); } diff --git a/jdk/src/share/classes/java/awt/peer/WindowPeer.java b/jdk/src/share/classes/java/awt/peer/WindowPeer.java index e2016e4dd1b..7b5da857f40 100644 --- a/jdk/src/share/classes/java/awt/peer/WindowPeer.java +++ b/jdk/src/share/classes/java/awt/peer/WindowPeer.java @@ -28,6 +28,8 @@ package java.awt.peer; import java.awt.*; /** + * The peer interface for {@link Window}. + * * The peer interfaces are intended only for use in porting * the AWT. They are not intended for use by application * developers, and developers should not implement peers @@ -35,11 +37,59 @@ import java.awt.*; * instances. */ public interface WindowPeer extends ContainerPeer { + + /** + * Makes this window the topmost window on the desktop. + * + * @see Window#toFront() + */ void toFront(); + + /** + * Makes this window the bottommost window on the desktop. + * + * @see Window#toBack() + */ void toBack(); + + /** + * Sets if the window should always stay on top of all other windows or + * not. + * + * @param alwaysOnTop if the window should always stay on top of all other + * windows or not + * + * @see Window#setAlwaysOnTop(boolean) + */ void setAlwaysOnTop(boolean alwaysOnTop); + + /** + * Updates the window's focusable state. + * + * @see Window#setFocusableWindowState(boolean) + */ void updateFocusableWindowState(); + + /** + * Sets if this window is blocked by a modal dialog or not. + * + * @param blocker the blocking modal dialog + * @param blocked {@code true} to block the window, {@code false} + * to unblock it + */ void setModalBlocked(Dialog blocker, boolean blocked); + + /** + * Updates the minimum size on the peer. + * + * @see Window#setMinimumSize(Dimension) + */ void updateMinimumSize(); + + /** + * Updates the icons for the window. + * + * @see Window#setIconImages(java.util.List) + */ void updateIconImages(); } From 78f5dc395e2c5b22a72cf9ad5c49adabb0dc6ee1 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Tue, 13 Jan 2009 11:10:00 -0800 Subject: [PATCH 049/199] 6784930: server jvm fails with assert(!n->is_SpillCopy(),"") Set minimum block frequency MIN_BLOCK_FREQUENCY 1.e-35f. Reviewed-by: never, rasbold --- hotspot/src/share/vm/opto/gcm.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/opto/gcm.cpp b/hotspot/src/share/vm/opto/gcm.cpp index c3d9db916bc..b56fb157119 100644 --- a/hotspot/src/share/vm/opto/gcm.cpp +++ b/hotspot/src/share/vm/opto/gcm.cpp @@ -29,6 +29,9 @@ #include "incls/_precompiled.incl" #include "incls/_gcm.cpp.incl" +// To avoid float value underflow +#define MIN_BLOCK_FREQUENCY 1.e-35f + //----------------------------schedule_node_into_block------------------------- // Insert node n into block b. Look for projections of n and make sure they // are in b also. @@ -1380,6 +1383,13 @@ void PhaseCFG::Estimate_Block_Frequency() { } } +#ifdef ASSERT + for (uint i = 0; i < _num_blocks; i++ ) { + Block *b = _blocks[i]; + assert(b->_freq >= MIN_BLOCK_FREQUENCY, "Register Allocator requiers meaningful block frequency"); + } +#endif + #ifndef PRODUCT if (PrintCFGBlockFreq) { tty->print_cr("CFG Block Frequencies"); @@ -1877,7 +1887,9 @@ void CFGLoop::scale_freq() { float loop_freq = _freq * trip_count(); for (int i = 0; i < _members.length(); i++) { CFGElement* s = _members.at(i); - s->_freq *= loop_freq; + float block_freq = s->_freq * loop_freq; + if (block_freq < MIN_BLOCK_FREQUENCY) block_freq = MIN_BLOCK_FREQUENCY; + s->_freq = block_freq; } CFGLoop* ch = _child; while (ch != NULL) { From a1442ea7fff4ccb7716a14a6b0bd1541319c2a29 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Tue, 13 Jan 2009 14:41:44 -0500 Subject: [PATCH 050/199] 6791168: Fix invalid code in bytecodeInterpreter that can cause gcc ICE Fix compilation errors from latest gcc in CC_INTERP including offending missing void* cast. Reviewed-by: xlu --- hotspot/src/cpu/x86/vm/assembler_x86.cpp | 45 ++++++++++--------- .../x86/vm/bytecodeInterpreter_x86.inline.hpp | 4 +- hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp | 14 +++--- hotspot/src/cpu/x86/vm/frame_x86.inline.hpp | 2 +- hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp | 2 +- .../src/cpu/x86/vm/sharedRuntime_x86_64.cpp | 6 +++ .../vm/interpreter/bytecodeInterpreter.cpp | 8 ++-- .../vm/interpreter/bytecodeInterpreter.hpp | 1 - 8 files changed, 45 insertions(+), 37 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp index 0802f7fb305..d6433f0e176 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp @@ -6943,29 +6943,32 @@ void MacroAssembler::trigfunc(char trig, int num_fpu_regs_in_use) { Label slow_case, done; - // x ?<= pi/4 - fld_d(ExternalAddress((address)&pi_4)); - fld_s(1); // Stack: X PI/4 X - fabs(); // Stack: |X| PI/4 X - fcmp(tmp); - jcc(Assembler::above, slow_case); + ExternalAddress pi4_adr = (address)&pi_4; + if (reachable(pi4_adr)) { + // x ?<= pi/4 + fld_d(pi4_adr); + fld_s(1); // Stack: X PI/4 X + fabs(); // Stack: |X| PI/4 X + fcmp(tmp); + jcc(Assembler::above, slow_case); - // fastest case: -pi/4 <= x <= pi/4 - switch(trig) { - case 's': - fsin(); - break; - case 'c': - fcos(); - break; - case 't': - ftan(); - break; - default: - assert(false, "bad intrinsic"); - break; + // fastest case: -pi/4 <= x <= pi/4 + switch(trig) { + case 's': + fsin(); + break; + case 'c': + fcos(); + break; + case 't': + ftan(); + break; + default: + assert(false, "bad intrinsic"); + break; + } + jmp(done); } - jmp(done); // slow case: runtime call bind(slow_case); diff --git a/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp b/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp index 0e41dbc4a21..f66bfd4d309 100644 --- a/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp +++ b/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp @@ -213,7 +213,7 @@ inline jint BytecodeInterpreter::VMintAnd(jint op1, jint op2) { inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) { /* it's possible we could catch this special case implicitly */ - if (op1 == 0x80000000 && op2 == -1) return op1; + if ((juint)op1 == 0x80000000 && op2 == -1) return op1; else return op1 / op2; } @@ -231,7 +231,7 @@ inline jint BytecodeInterpreter::VMintOr(jint op1, jint op2) { inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) { /* it's possible we could catch this special case implicitly */ - if (op1 == 0x80000000 && op2 == -1) return 0; + if ((juint)op1 == 0x80000000 && op2 == -1) return 0; else return op1 % op2; } diff --git a/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp b/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp index ecaa3ec21af..a3621ad886c 100644 --- a/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp +++ b/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp @@ -594,7 +594,7 @@ void InterpreterGenerator::generate_counter_overflow(Label* do_continue) { __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rax); // for c++ interpreter can rsi really be munged? - __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); // restore state + __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); // restore state __ movptr(rbx, Address(state, byte_offset_of(BytecodeInterpreter, _method))); // restore method __ movptr(rdi, Address(state, byte_offset_of(BytecodeInterpreter, _locals))); // get locals pointer @@ -658,7 +658,7 @@ void InterpreterGenerator::generate_stack_overflow_check(void) { const Address size_of_stack (rbx, methodOopDesc::max_stack_offset()); // Always give one monitor to allow us to start interp if sync method. // Any additional monitors need a check when moving the expression stack - const one_monitor = frame::interpreter_frame_monitor_size() * wordSize; + const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize; __ load_unsigned_word(rax, size_of_stack); // get size of expression stack in words __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), one_monitor)); __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size)); @@ -1829,7 +1829,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) { Label unwind_and_forward; // restore state pointer. - __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); + __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); __ movptr(rbx, STATE(_method)); // get method #ifdef _LP64 @@ -1877,14 +1877,14 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) { // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases if (UseSSE < 2) { - __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); + __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); __ movptr(rbx, STATE(_result._to_call._callee)); // get method just executed __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset())); __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT)); // Result stub address array index __ jcc(Assembler::equal, do_float); __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE)); // Result stub address array index __ jcc(Assembler::equal, do_double); -#ifdef COMPILER2 +#if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2) __ empty_FPU_stack(); #endif // COMPILER2 __ jmp(done_conv); @@ -1928,7 +1928,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) { // Restore rsi/r13 as compiled code may not preserve it - __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter))); + __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter))); // restore stack to what we had when we left (in case i2c extended it) @@ -1942,7 +1942,7 @@ address InterpreterGenerator::generate_normal_entry(bool synchronized) { #else __ movptr(rcx, STATE(_thread)); // get thread __ cmpptr(Address(rcx, Thread::pending_exception_offset()), (int32_t)NULL_WORD); -#endif / __LP64 +#endif // _LP64 __ jcc(Assembler::notZero, return_with_exception); // get method just executed diff --git a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp index f06b40de350..82c37fd41da 100644 --- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp +++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp @@ -139,7 +139,7 @@ inline address* frame::native_param_addr(int idx) const { return (address*) addr #ifdef CC_INTERP inline interpreterState frame::get_interpreterState() const { - return ((interpreterState)addr_at( -sizeof(BytecodeInterpreter)/wordSize )); + return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize )); } inline intptr_t* frame::sender_sp() const { diff --git a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp index 9809649d37e..ebcac0fddf9 100644 --- a/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp @@ -30,7 +30,7 @@ #ifdef CC_INTERP void InterpreterMacroAssembler::get_method(Register reg) { - movptr(reg, Address(rbp, -(sizeof(BytecodeInterpreter) + 2 * wordSize))); + movptr(reg, Address(rbp, -((int)sizeof(BytecodeInterpreter) + 2 * wordSize))); movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method))); } #endif // CC_INTERP diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index 26e7e148968..d5d9511dc99 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -2954,10 +2954,16 @@ void SharedRuntime::generate_uncommon_trap_blob() { __ pushptr(Address(rcx, 0)); // Save return address __ enter(); // Save old & set new rbp __ subptr(rsp, rbx); // Prolog +#ifdef CC_INTERP + __ movptr(Address(rbp, + -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))), + sender_sp); // Make it walkable +#else // CC_INTERP __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize), sender_sp); // Make it walkable // This value is corrected by layout_activation_impl __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD ); +#endif // CC_INTERP __ mov(sender_sp, rsp); // Pass sender_sp to next frame __ addptr(rsi, wordSize); // Bump array pointer (sizes) __ addptr(rcx, wordSize); // Bump array pointer (pcs) diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp index b4204414a94..351d29cc9cc 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp @@ -163,7 +163,7 @@ #ifdef USELABELS // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an // initialization (which is is the initialization of the table pointer...) -#define DISPATCH(opcode) goto *dispatch_table[opcode] +#define DISPATCH(opcode) goto *(void*)dispatch_table[opcode] #define CONTINUE { \ opcode = *pc; \ DO_UPDATE_INSTRUCTION_COUNT(opcode); \ @@ -341,7 +341,7 @@ */ #undef CHECK_NULL #define CHECK_NULL(obj_) \ - if ((obj_) == 0) { \ + if ((obj_) == NULL) { \ VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), ""); \ } @@ -1362,7 +1362,7 @@ run: #define NULL_COMPARISON_NOT_OP(name) \ CASE(_if##name): { \ - int skip = (!(STACK_OBJECT(-1) == 0)) \ + int skip = (!(STACK_OBJECT(-1) == NULL)) \ ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ address branch_pc = pc; \ UPDATE_PC_AND_TOS(skip, -1); \ @@ -1372,7 +1372,7 @@ run: #define NULL_COMPARISON_OP(name) \ CASE(_if##name): { \ - int skip = ((STACK_OBJECT(-1) == 0)) \ + int skip = ((STACK_OBJECT(-1) == NULL)) \ ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \ address branch_pc = pc; \ UPDATE_PC_AND_TOS(skip, -1); \ diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp index 715acf671a2..a1504851a38 100644 --- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp @@ -66,7 +66,6 @@ friend class CppInterpreterGenerator; friend class InterpreterGenerator; friend class InterpreterMacroAssembler; friend class frame; -friend class SharedRuntime; friend class VMStructs; public: From a3d528cc30213c30e3dd30e68e7548a3d15242d9 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Tue, 13 Jan 2009 11:43:20 -0800 Subject: [PATCH 051/199] 6791132: bad control in autobox split code Reviewed-by: kvn --- hotspot/src/share/vm/opto/memnode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp index 4cfc0d233f3..896b11b6d0b 100644 --- a/hotspot/src/share/vm/opto/memnode.cpp +++ b/hotspot/src/share/vm/opto/memnode.cpp @@ -1076,13 +1076,14 @@ Node* LoadNode::eliminate_autobox(PhaseGVN* phase) { // of the original value. Node* mem_phi = in(Memory); Node* offset = in(Address)->in(AddPNode::Offset); + Node* region = base->in(0); Node* in1 = clone(); Node* in1_addr = in1->in(Address)->clone(); in1_addr->set_req(AddPNode::Base, base->in(allocation_index)); in1_addr->set_req(AddPNode::Address, base->in(allocation_index)); in1_addr->set_req(AddPNode::Offset, offset); - in1->set_req(0, base->in(allocation_index)); + in1->set_req(0, region->in(allocation_index)); in1->set_req(Address, in1_addr); in1->set_req(Memory, mem_phi->in(allocation_index)); @@ -1091,7 +1092,7 @@ Node* LoadNode::eliminate_autobox(PhaseGVN* phase) { in2_addr->set_req(AddPNode::Base, base->in(load_index)); in2_addr->set_req(AddPNode::Address, base->in(load_index)); in2_addr->set_req(AddPNode::Offset, offset); - in2->set_req(0, base->in(load_index)); + in2->set_req(0, region->in(load_index)); in2->set_req(Address, in2_addr); in2->set_req(Memory, mem_phi->in(load_index)); @@ -1100,7 +1101,7 @@ Node* LoadNode::eliminate_autobox(PhaseGVN* phase) { in2_addr = phase->transform(in2_addr); in2 = phase->transform(in2); - PhiNode* result = PhiNode::make_blank(base->in(0), this); + PhiNode* result = PhiNode::make_blank(region, this); result->set_req(allocation_index, in1); result->set_req(load_index, in2); return result; From aae30d753f73e6427c7d6700d9e8db48283033a4 Mon Sep 17 00:00:00 2001 From: Xiaobin Lu Date: Tue, 13 Jan 2009 12:08:43 -0800 Subject: [PATCH 052/199] 6791815: Fix for 6471657 can cause deadlock on non-Solaris platforms when initializing direct buffer support Place the state transition inside the loop so that the VMThread could proceed for safepoint Reviewed-by: dholmes, never, acorn --- hotspot/src/share/vm/prims/jni.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp index b4a82b9e547..e3f715dd23e 100644 --- a/hotspot/src/share/vm/prims/jni.cpp +++ b/hotspot/src/share/vm/prims/jni.cpp @@ -2691,8 +2691,13 @@ static bool initializeDirectBufferSupport(JNIEnv* env, JavaThread* thread) { directBufferSupportInitializeEnded = 1; } else { - ThreadInVMfromNative tivn(thread); // set state as yield_all can call os:sleep while (!directBufferSupportInitializeEnded && !directBufferSupportInitializeFailed) { + // Set state as yield_all can call os:sleep. On Solaris, yield_all calls + // os::sleep which requires the VM state transition. On other platforms, it + // is not necessary. The following call to change the VM state is purposely + // put inside the loop to avoid potential deadlock when multiple threads + // try to call this method. See 6791815 for more details. + ThreadInVMfromNative tivn(thread); os::yield_all(); } } From 74a472983b86188d4874792bdf1fd59d0a56229c Mon Sep 17 00:00:00 2001 From: Xiaobin Lu Date: Tue, 13 Jan 2009 17:39:03 -0800 Subject: [PATCH 053/199] 6792301: StackAlignmentInBytes not honored for compiled native methods Fixed the stack misalignment when generate_native_wrapper is called. Reviewed-by: never, kamg, kvn, phh --- hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp | 4 +++- hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp index 2b3d58c4367..3cf22d7fa05 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp @@ -39,6 +39,8 @@ RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob; RuntimeStub* SharedRuntime::_resolve_virtual_call_blob; RuntimeStub* SharedRuntime::_resolve_static_call_blob; +const int StackAlignmentInSlots = StackAlignmentInBytes / VMRegImpl::stack_slot_size; + class RegisterSaver { enum { FPU_regs_live = 8 /*for the FPU stack*/+8/*eight more for XMM registers*/ }; // Capture info about frame layout @@ -1299,7 +1301,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, // Now compute actual number of stack words we need rounding to make // stack properly aligned. - stack_slots = round_to(stack_slots, 2 * VMRegImpl::slots_per_word); + stack_slots = round_to(stack_slots, StackAlignmentInSlots); int stack_size = stack_slots * VMRegImpl::stack_slot_size; diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp index d5d9511dc99..7fc2b6685e4 100644 --- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp +++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp @@ -39,6 +39,8 @@ RuntimeStub* SharedRuntime::_resolve_opt_virtual_call_blob; RuntimeStub* SharedRuntime::_resolve_virtual_call_blob; RuntimeStub* SharedRuntime::_resolve_static_call_blob; +const int StackAlignmentInSlots = StackAlignmentInBytes / VMRegImpl::stack_slot_size; + #define __ masm-> class SimpleRuntimeFrame { @@ -1286,7 +1288,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, // Now compute actual number of stack words we need rounding to make // stack properly aligned. - stack_slots = round_to(stack_slots, 4 * VMRegImpl::slots_per_word); + stack_slots = round_to(stack_slots, StackAlignmentInSlots); int stack_size = stack_slots * VMRegImpl::stack_slot_size; From 1606eaa0b99fa575a6af46a7332e8ee6c6f0d817 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Wed, 14 Jan 2009 17:17:34 +0000 Subject: [PATCH 054/199] 6755782: It is not clear how DatagramSocket deals with broadcast enabling/disabling Reviewed-by: jccollet --- .../classes/java/net/DatagramSocket.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/jdk/src/share/classes/java/net/DatagramSocket.java b/jdk/src/share/classes/java/net/DatagramSocket.java index 4558632c214..40c95ef5aee 100644 --- a/jdk/src/share/classes/java/net/DatagramSocket.java +++ b/jdk/src/share/classes/java/net/DatagramSocket.java @@ -41,10 +41,11 @@ import java.security.PrivilegedExceptionAction; * one machine to another may be routed differently, and may arrive in * any order. * - *

UDP broadcasts sends are always enabled on a DatagramSocket. - * In order to receive broadcast packets a DatagramSocket - * should be bound to the wildcard address. In some - * implementations, broadcast packets may also be received when + *

Where possible, a newly constructed {@code DatagramSocket} has the + * {@link SocketOptions#SO_BROADCAST SO_BROADCAST} socket option enabled so as + * to allow the transmission of broadcast datagrams. In order to receive + * broadcast packets a DatagramSocket should be bound to the wildcard address. + * In some implementations, broadcast packets may also be received when * a DatagramSocket is bound to a more specific address. *

* Example: @@ -1017,9 +1018,18 @@ class DatagramSocket implements java.io.Closeable { /** * Enable/disable SO_BROADCAST. - * @param on whether or not to have broadcast turned on. - * @exception SocketException if there is an error - * in the underlying protocol, such as an UDP error. + * + *

Some operating systems may require that the Java virtual machine be + * started with implementation specific privileges to enable this option or + * send broadcast datagrams. + * + * @param on + * whether or not to have broadcast turned on. + * + * @throws SocketException + * if there is an error in the underlying protocol, such as an UDP + * error. + * * @since 1.4 * @see #getBroadcast() */ From 532cc3cef85dcf1d66d1fe491fcc95581c440550 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Wed, 14 Jan 2009 14:12:00 -0800 Subject: [PATCH 055/199] 6788347: C2Compiler crash 6u7 Reviewed-by: kvn --- hotspot/src/share/vm/opto/cfgnode.cpp | 17 +++++++++++++++++ hotspot/src/share/vm/opto/type.cpp | 10 ++++++++++ hotspot/src/share/vm/opto/type.hpp | 2 ++ 3 files changed, 29 insertions(+) diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp index fdee151f1e9..e29cc0d58e3 100644 --- a/hotspot/src/share/vm/opto/cfgnode.cpp +++ b/hotspot/src/share/vm/opto/cfgnode.cpp @@ -858,12 +858,18 @@ const Type *PhiNode::Value( PhaseTransform *phase ) const { // convert the one to the other. const TypePtr* ttp = _type->make_ptr(); const TypeInstPtr* ttip = (ttp != NULL) ? ttp->isa_instptr() : NULL; + const TypeKlassPtr* ttkp = (ttp != NULL) ? ttp->isa_klassptr() : NULL; bool is_intf = false; if (ttip != NULL) { ciKlass* k = ttip->klass(); if (k->is_loaded() && k->is_interface()) is_intf = true; } + if (ttkp != NULL) { + ciKlass* k = ttkp->klass(); + if (k->is_loaded() && k->is_interface()) + is_intf = true; + } // Default case: merge all inputs const Type *t = Type::TOP; // Merged type starting value @@ -921,6 +927,8 @@ const Type *PhiNode::Value( PhaseTransform *phase ) const { // uplift the type. if( !t->empty() && ttip && ttip->is_loaded() && ttip->klass()->is_interface() ) { assert(ft == _type, ""); } // Uplift to interface + else if( !t->empty() && ttkp && ttkp->is_loaded() && ttkp->klass()->is_interface() ) + { assert(ft == _type, ""); } // Uplift to interface // Otherwise it's something stupid like non-overlapping int ranges // found on dying counted loops. else @@ -936,6 +944,7 @@ const Type *PhiNode::Value( PhaseTransform *phase ) const { // because the type system doesn't interact well with interfaces. const TypePtr *jtp = jt->make_ptr(); const TypeInstPtr *jtip = (jtp != NULL) ? jtp->isa_instptr() : NULL; + const TypeKlassPtr *jtkp = (jtp != NULL) ? jtp->isa_klassptr() : NULL; if( jtip && ttip ) { if( jtip->is_loaded() && jtip->klass()->is_interface() && ttip->is_loaded() && !ttip->klass()->is_interface() ) { @@ -945,6 +954,14 @@ const Type *PhiNode::Value( PhaseTransform *phase ) const { jt = ft; } } + if( jtkp && ttkp ) { + if( jtkp->is_loaded() && jtkp->klass()->is_interface() && + ttkp->is_loaded() && !ttkp->klass()->is_interface() ) { + assert(ft == ttkp->cast_to_ptr_type(jtkp->ptr()) || + ft->isa_narrowoop() && ft->make_ptr() == ttkp->cast_to_ptr_type(jtkp->ptr()), ""); + jt = ft; + } + } if (jt != ft && jt->base() == ft->base()) { if (jt->isa_int() && jt->is_int()->_lo == ft->is_int()->_lo && diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp index f433a125535..37c895b82e5 100644 --- a/hotspot/src/share/vm/opto/type.cpp +++ b/hotspot/src/share/vm/opto/type.cpp @@ -2471,6 +2471,8 @@ const Type *TypeOopPtr::filter( const Type *kills ) const { const Type* ft = join(kills); const TypeInstPtr* ftip = ft->isa_instptr(); const TypeInstPtr* ktip = kills->isa_instptr(); + const TypeKlassPtr* ftkp = ft->isa_klassptr(); + const TypeKlassPtr* ktkp = kills->isa_klassptr(); if (ft->empty()) { // Check for evil case of 'this' being a class and 'kills' expecting an @@ -2484,6 +2486,8 @@ const Type *TypeOopPtr::filter( const Type *kills ) const { // uplift the type. if (!empty() && ktip != NULL && ktip->is_loaded() && ktip->klass()->is_interface()) return kills; // Uplift to interface + if (!empty() && ktkp != NULL && ktkp->klass()->is_loaded() && ktkp->klass()->is_interface()) + return kills; // Uplift to interface return Type::TOP; // Canonical empty value } @@ -2499,6 +2503,12 @@ const Type *TypeOopPtr::filter( const Type *kills ) const { // Happens in a CTW of rt.jar, 320-341, no extra flags return ktip->cast_to_ptr_type(ftip->ptr()); } + if (ftkp != NULL && ktkp != NULL && + ftkp->is_loaded() && ftkp->klass()->is_interface() && + ktkp->is_loaded() && !ktkp->klass()->is_interface()) { + // Happens in a CTW of rt.jar, 320-341, no extra flags + return ktkp->cast_to_ptr_type(ftkp->ptr()); + } return ft; } diff --git a/hotspot/src/share/vm/opto/type.hpp b/hotspot/src/share/vm/opto/type.hpp index 3d3f3ddd883..493b622a28e 100644 --- a/hotspot/src/share/vm/opto/type.hpp +++ b/hotspot/src/share/vm/opto/type.hpp @@ -882,6 +882,8 @@ class TypeKlassPtr : public TypeOopPtr { public: ciSymbol* name() const { return _klass->name(); } + bool is_loaded() const { return _klass->is_loaded(); } + // ptr to klass 'k' static const TypeKlassPtr *make( ciKlass* k ) { return make( TypePtr::Constant, k, 0); } // ptr to klass 'k' with offset From 640ed7d08b6b13f841498a139e81f90e609c8be0 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 14 Jan 2009 16:23:29 -0800 Subject: [PATCH 056/199] 6792545: Typo in java.util.Collection JavaDoc 6655123: Incorrect ref to The Art of Computer Programming in doc for java.util.Random Fix a pair of typos. Reviewed-by: jjg --- jdk/src/share/classes/java/util/Collection.java | 2 +- jdk/src/share/classes/java/util/Random.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/java/util/Collection.java b/jdk/src/share/classes/java/util/Collection.java index 28c923ff2a0..e7cb3c91e0c 100644 --- a/jdk/src/share/classes/java/util/Collection.java +++ b/jdk/src/share/classes/java/util/Collection.java @@ -427,7 +427,7 @@ public interface Collection extends Iterable { * contract for the Object.hashCode method, programmers should * take note that any class that overrides the Object.equals * method must also override the Object.hashCode method in order - * to satisfy the general contract for the Object.hashCodemethod. + * to satisfy the general contract for the Object.hashCode method. * In particular, c1.equals(c2) implies that * c1.hashCode()==c2.hashCode(). * diff --git a/jdk/src/share/classes/java/util/Random.java b/jdk/src/share/classes/java/util/Random.java index 26cc4e234e0..cfa48248166 100644 --- a/jdk/src/share/classes/java/util/Random.java +++ b/jdk/src/share/classes/java/util/Random.java @@ -32,7 +32,7 @@ import sun.misc.Unsafe; * An instance of this class is used to generate a stream of * pseudorandom numbers. The class uses a 48-bit seed, which is * modified using a linear congruential formula. (See Donald Knuth, - * The Art of Computer Programming, Volume 3, Section 3.2.1.) + * The Art of Computer Programming, Volume 2, Section 3.2.1.) *

* If two instances of {@code Random} are created with the same * seed, and the same sequence of method calls is made for each, they From f79090efe7b5aaea8114416218c2e1053a043ec5 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Wed, 14 Jan 2009 20:14:19 -0500 Subject: [PATCH 057/199] 6793825: Missing include dependancies for GCC without predefined headers With predefined headers off for gcc, some .inline.hpp files aren't included to make definition visible for inline functions Reviewed-by: jcoomes, xlu --- .../vm/gc_implementation/includeDB_gc_concurrentMarkSweep | 1 + hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 | 4 +++- hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew | 4 +++- .../share/vm/gc_implementation/includeDB_gc_parallelScavenge | 2 ++ hotspot/src/share/vm/includeDB_compiler2 | 2 ++ hotspot/src/share/vm/includeDB_core | 4 +++- hotspot/src/share/vm/includeDB_features | 2 ++ 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep b/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep index d751d2d1f6a..ac88dc1752b 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep @@ -28,6 +28,7 @@ binaryTreeDictionary.cpp allocationStats.hpp binaryTreeDictionary.cpp binaryTreeDictionary.hpp binaryTreeDictionary.cpp globals.hpp binaryTreeDictionary.cpp ostream.hpp +binaryTreeDictionary.cpp space.inline.hpp binaryTreeDictionary.cpp spaceDecorator.hpp binaryTreeDictionary.hpp freeBlockDictionary.hpp diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 index 536a3704fe6..8aeaf9e5e40 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 @@ -34,6 +34,7 @@ cardTableRS.cpp g1SATBCardTableModRefBS.hpp collectionSetChooser.cpp g1CollectedHeap.hpp collectionSetChooser.cpp g1CollectorPolicy.hpp collectionSetChooser.cpp collectionSetChooser.hpp +collectionSetChooser.cpp space.inline.hpp collectionSetChooser.hpp heapRegion.hpp collectionSetChooser.hpp growableArray.hpp @@ -44,6 +45,7 @@ concurrentG1Refine.cpp concurrentG1RefineThread.hpp concurrentG1Refine.cpp copy.hpp concurrentG1Refine.cpp g1CollectedHeap.hpp concurrentG1Refine.cpp g1RemSet.hpp +concurrentG1Refine.cpp space.inline.hpp concurrentG1Refine.hpp globalDefinitions.hpp @@ -264,7 +266,7 @@ heapRegion.cpp heapRegionSeq.inline.hpp heapRegion.cpp iterator.hpp heapRegion.cpp oop.inline.hpp -heapRegion.hpp space.hpp +heapRegion.hpp space.inline.hpp heapRegion.hpp spaceDecorator.hpp heapRegion.hpp g1BlockOffsetTable.inline.hpp heapRegion.hpp watermark.hpp diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew index e5e5bc17b7c..60b851b7c5c 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew @@ -29,6 +29,8 @@ asParNewGeneration.cpp asParNewGeneration.hpp asParNewGeneration.cpp cmsAdaptiveSizePolicy.hpp asParNewGeneration.cpp cmsGCAdaptivePolicyCounters.hpp asParNewGeneration.cpp defNewGeneration.inline.hpp +asParNewGeneration.cpp markOop.inline.hpp +asParNewGeneration.cpp markSweep.inline.hpp asParNewGeneration.cpp oop.pcgc.inline.hpp asParNewGeneration.cpp parNewGeneration.hpp asParNewGeneration.cpp referencePolicy.hpp @@ -40,7 +42,7 @@ parCardTableModRefBS.cpp cardTableRS.hpp parCardTableModRefBS.cpp java.hpp parCardTableModRefBS.cpp mutexLocker.hpp parCardTableModRefBS.cpp sharedHeap.hpp -parCardTableModRefBS.cpp space.hpp +parCardTableModRefBS.cpp space.inline.hpp parCardTableModRefBS.cpp universe.hpp parCardTableModRefBS.cpp virtualspace.hpp diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge index 13ba87c8391..0e0ae1a1e0e 100644 --- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge +++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge @@ -302,6 +302,8 @@ psOldGen.hpp safepoint.hpp psOldGen.hpp spaceCounters.hpp psPermGen.cpp gcUtil.hpp +psPermGen.cpp markOop.inline.hpp +psPermGen.cpp markSweep.inline.hpp psPermGen.cpp parallelScavengeHeap.hpp psPermGen.cpp psMarkSweepDecorator.hpp psPermGen.cpp psParallelCompact.hpp diff --git a/hotspot/src/share/vm/includeDB_compiler2 b/hotspot/src/share/vm/includeDB_compiler2 index ea3b88cc172..bf84589334c 100644 --- a/hotspot/src/share/vm/includeDB_compiler2 +++ b/hotspot/src/share/vm/includeDB_compiler2 @@ -140,6 +140,7 @@ c2_globals_.hpp globalDefinitions.hpp c2_globals_.hpp macros.hpp c2_init_.cpp compile.hpp +c2_init_.cpp node.hpp c2compiler.cpp ad_.hpp c2compiler.cpp c2compiler.hpp @@ -839,6 +840,7 @@ parseHelper.cpp systemDictionary.hpp phase.cpp compile.hpp phase.cpp compileBroker.hpp phase.cpp nmethod.hpp +phase.cpp node.hpp phase.cpp phase.hpp phase.hpp port.hpp diff --git a/hotspot/src/share/vm/includeDB_core b/hotspot/src/share/vm/includeDB_core index 7ca1fcabef5..8d39f327758 100644 --- a/hotspot/src/share/vm/includeDB_core +++ b/hotspot/src/share/vm/includeDB_core @@ -1311,6 +1311,7 @@ cppInterpreter_.cpp bytecodeHistogram.hpp cppInterpreter_.cpp debug.hpp cppInterpreter_.cpp deoptimization.hpp cppInterpreter_.cpp frame.inline.hpp +cppInterpreter_.cpp interfaceSupport.hpp cppInterpreter_.cpp interpreterRuntime.hpp cppInterpreter_.cpp interpreter.hpp cppInterpreter_.cpp interpreterGenerator.hpp @@ -2014,7 +2015,7 @@ instanceKlass.cpp verifier.hpp instanceKlass.cpp vmSymbols.hpp instanceKlass.hpp accessFlags.hpp -instanceKlass.hpp bitMap.hpp +instanceKlass.hpp bitMap.inline.hpp instanceKlass.hpp constMethodOop.hpp instanceKlass.hpp constantPoolOop.hpp instanceKlass.hpp handles.hpp @@ -3771,6 +3772,7 @@ spaceDecorator.hpp space.hpp spaceDecorator.cpp copy.hpp spaceDecorator.cpp spaceDecorator.hpp +spaceDecorator.cpp space.inline.hpp specialized_oop_closures.cpp ostream.hpp specialized_oop_closures.cpp specialized_oop_closures.hpp diff --git a/hotspot/src/share/vm/includeDB_features b/hotspot/src/share/vm/includeDB_features index d783a04e55b..e136dfe784a 100644 --- a/hotspot/src/share/vm/includeDB_features +++ b/hotspot/src/share/vm/includeDB_features @@ -59,6 +59,8 @@ dump.cpp vm_operations.hpp dump_.cpp assembler_.inline.hpp dump_.cpp compactingPermGenGen.hpp +dump_.cpp generation.inline.hpp +dump_.cpp space.inline.hpp forte.cpp collectedHeap.inline.hpp forte.cpp debugInfoRec.hpp From b15aadf61d6470c58e7af8d69acb6531459bd9c0 Mon Sep 17 00:00:00 2001 From: Swamy Venkataramanappa Date: Wed, 14 Jan 2009 19:45:01 -0800 Subject: [PATCH 058/199] 6786948: SA on core file fails on solaris-amd64 if vm started with -XX:+StartAttachListener Reviewed-by: jjh, dcubed --- hotspot/agent/src/os/linux/ps_core.c | 13 ++++++++----- hotspot/agent/src/os/solaris/proc/saproc.cpp | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/hotspot/agent/src/os/linux/ps_core.c b/hotspot/agent/src/os/linux/ps_core.c index 3562f2d31f6..a6156f0a8d4 100644 --- a/hotspot/agent/src/os/linux/ps_core.c +++ b/hotspot/agent/src/os/linux/ps_core.c @@ -238,8 +238,8 @@ struct FileMapHeader { // Ignore the rest of the FileMapHeader. We don't need those fields here. }; -static bool read_int(struct ps_prochandle* ph, uintptr_t addr, int* pvalue) { - int i; +static bool read_jboolean(struct ps_prochandle* ph, uintptr_t addr, jboolean* pvalue) { + jboolean i; if (ps_pdread(ph, (psaddr_t) addr, &i, sizeof(i)) == PS_OK) { *pvalue = i; return true; @@ -295,7 +295,7 @@ static bool init_classsharing_workaround(struct ps_prochandle* ph) { int fd = -1, m = 0; uintptr_t base = 0, useSharedSpacesAddr = 0; uintptr_t sharedArchivePathAddrAddr = 0, sharedArchivePathAddr = 0; - int useSharedSpaces = 0; + jboolean useSharedSpaces = 0; map_info* mi = 0; memset(classes_jsa, 0, sizeof(classes_jsa)); @@ -306,12 +306,15 @@ static bool init_classsharing_workaround(struct ps_prochandle* ph) { return false; } - if (read_int(ph, useSharedSpacesAddr, &useSharedSpaces) != true) { + // Hotspot vm types are not exported to build this library. So + // using equivalent type jboolean to read the value of + // UseSharedSpaces which is same as hotspot type "bool". + if (read_jboolean(ph, useSharedSpacesAddr, &useSharedSpaces) != true) { print_debug("can't read the value of 'UseSharedSpaces' flag\n"); return false; } - if (useSharedSpaces == 0) { + if ((int)useSharedSpaces == 0) { print_debug("UseSharedSpaces is false, assuming -Xshare:off!\n"); return true; } diff --git a/hotspot/agent/src/os/solaris/proc/saproc.cpp b/hotspot/agent/src/os/solaris/proc/saproc.cpp index 231773c5647..415e28af658 100644 --- a/hotspot/agent/src/os/solaris/proc/saproc.cpp +++ b/hotspot/agent/src/os/solaris/proc/saproc.cpp @@ -502,8 +502,8 @@ struct FileMapHeader { }; static bool -read_int(struct ps_prochandle* ph, psaddr_t addr, int* pvalue) { - int i; +read_jboolean(struct ps_prochandle* ph, psaddr_t addr, jboolean* pvalue) { + jboolean i; if (ps_pread(ph, addr, &i, sizeof(i)) == PS_OK) { *pvalue = i; return true; @@ -575,10 +575,13 @@ init_classsharing_workaround(void *cd, const prmap_t* pmap, const char* obj_name } // read the value of the flag "UseSharedSpaces" - int value = 0; - if (read_int(ph, useSharedSpacesAddr, &value) != true) { + // Since hotspot types are not available to build this library. So + // equivalent type "jboolean" is used to read the value of "UseSharedSpaces" + // which is same as hotspot type "bool". + jboolean value = 0; + if (read_jboolean(ph, useSharedSpacesAddr, &value) != true) { THROW_NEW_DEBUGGER_EXCEPTION_("can't read 'UseSharedSpaces' flag", 1); - } else if (value == 0) { + } else if ((int)value == 0) { print_debug("UseSharedSpaces is false, assuming -Xshare:off!\n"); return 1; } From de73102ff40beb27f2897bcf475bad4b15b40ab9 Mon Sep 17 00:00:00 2001 From: Bhavesh Patel Date: Thu, 15 Jan 2009 17:21:11 -0800 Subject: [PATCH 059/199] 6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute Reviewed-by: jjg --- .../formats/html/ConfigurationImpl.java | 10 ++ .../formats/html/markup/HtmlWriter.java | 2 +- .../internal/toolkit/Configuration.java | 5 + .../toolkit/util/SourceToHTMLConverter.java | 7 +- .../com/sun/tools/javadoc/RootDocImpl.java | 8 ++ .../sun/javadoc/testHtmlTag/TestHtmlTag.java | 93 +++++++++++++++++++ .../com/sun/javadoc/testHtmlTag/pkg1/C1.java | 33 +++++++ .../com/sun/javadoc/testHtmlTag/pkg2/C2.java | 31 +++++++ 8 files changed, 185 insertions(+), 4 deletions(-) create mode 100644 langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java create mode 100644 langtools/test/com/sun/javadoc/testHtmlTag/pkg1/C1.java create mode 100644 langtools/test/com/sun/javadoc/testHtmlTag/pkg2/C2.java diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java index 524bd2472a3..70d487da2ba 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java @@ -493,4 +493,14 @@ public class ConfigurationImpl extends Configuration { public Comparator getMemberComparator() { return null; } + + /** + * {@inheritDoc} + */ + public Locale getLocale() { + if (root instanceof com.sun.tools.javadoc.RootDocImpl) + return ((com.sun.tools.javadoc.RootDocImpl)root).getLocale(); + else + return Locale.getDefault(); + } } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java index 21fb7e642b0..cdafe1be907 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java @@ -85,7 +85,7 @@ public class HtmlWriter extends PrintWriter { * Print <HTML> tag. Add a newline character at the end. */ public void html() { - println(""); + println(""); } /** diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java index 11b37b34498..eb8960f4c65 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java @@ -706,6 +706,11 @@ public abstract class Configuration { new FileInputStream(new File(builderXMLPath)); } + /** + * Return the Locale for this document. + */ + public abstract Locale getLocale(); + /** * Return the comparator that will be used to sort member documentation. * To no do any sorting, return null. diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java index 67a82e8a3b3..8f98dfcfd25 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java @@ -142,7 +142,7 @@ public class SourceToHTMLConverter { reader.close(); } output = addLineNumbers(output.toString()); - output.insert(0, getHeader()); + output.insert(0, getHeader(configuration)); output.append(getFooter()); writeToFile(output.toString(), outputdir, cd.name(), configuration); } catch (Exception e){ @@ -192,10 +192,11 @@ public class SourceToHTMLConverter { /** * Get the header. + * @param configuration the Doclet configuration * @return the header to the output file */ - protected static String getHeader() { - StringBuffer result = new StringBuffer("" + DocletConstants.NL); + protected static String getHeader(Configuration configuration) { + StringBuffer result = new StringBuffer("" + DocletConstants.NL); result.append("" + DocletConstants.NL); result.append("

" + DocletConstants.NL);
         return result.toString();
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java b/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
index 8595151cc32..4c7cd5fa2e8 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/RootDocImpl.java
@@ -36,6 +36,7 @@ import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
 import com.sun.tools.javac.util.Position;
+import java.util.Locale;
 
 /**
  * This class holds the information from one run of javadoc.
@@ -351,4 +352,11 @@ public class RootDocImpl extends DocImpl implements RootDoc {
             null :
             SourcePositionImpl.make(path, Position.NOPOS, null);
     }
+
+    /**
+     * Return the locale provided by the user or the default locale value.
+     */
+    public Locale getLocale() {
+        return env.doclocale.locale;
+    }
 }
diff --git a/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java b/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java
new file mode 100644
index 00000000000..4588d070b7e
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6786682
+ * @summary This test verifies the use of lang attribute by .
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester
+ * @build TestHtmlTag
+ * @run main TestHtmlTag
+ */
+
+import java.util.Locale;
+
+public class TestHtmlTag extends JavadocTester {
+
+    private static final String BUG_ID = "6786682";
+    private static final String[][] TEST1 = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", ""},
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html", ""}};
+    private static final String[][] NEGATED_TEST1 = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", ""}};
+    private static final String[][] TEST2 = {
+        {BUG_ID + FS + "pkg2" + FS + "C2.html", ""},
+        {BUG_ID + FS + "pkg2" + FS + "package-summary.html", ""}};
+    private static final String[][] NEGATED_TEST2 = {
+        {BUG_ID + FS + "pkg2" + FS + "C2.html", ""}};
+    private static final String[][] TEST3 = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", ""},
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html", ""}};
+    private static final String[][] NEGATED_TEST3 = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", ""}};
+
+    private static final String[] ARGS1 =
+        new String[] {
+            "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"};
+    private static final String[] ARGS2 =
+        new String[] {
+            "-locale", "ja", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg2"};
+    private static final String[] ARGS3 =
+        new String[] {
+            "-locale", "en_US", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"};
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestHtmlTag tester = new TestHtmlTag();
+        run(tester, ARGS1, TEST1, NEGATED_TEST1);
+        run(tester, ARGS2, TEST2, NEGATED_TEST2);
+        run(tester, ARGS3, TEST3, NEGATED_TEST3);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlTag/pkg1/C1.java b/langtools/test/com/sun/javadoc/testHtmlTag/pkg1/C1.java
new file mode 100644
index 00000000000..5fb4bc8a30e
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlTag/pkg1/C1.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg1;
+
+public class C1 {
+
+    public void method(int param1, int param2) {
+
+    }
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlTag/pkg2/C2.java b/langtools/test/com/sun/javadoc/testHtmlTag/pkg2/C2.java
new file mode 100644
index 00000000000..2bd9d323be8
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlTag/pkg2/C2.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg2;
+
+/**
+ * Comments: Class 2
+ */
+public class C2 {}

From b4747d31883141ae46230597b0173b82cec13c50 Mon Sep 17 00:00:00 2001
From: Jonathan Gibbons 
Date: Thu, 15 Jan 2009 18:06:36 -0800
Subject: [PATCH 060/199] 6794520: MessageRetriever should be upgraded to use
 varargs Object..

Reviewed-by: bpatel
---
 .../toolkit/util/MessageRetriever.java        | 274 ++----------------
 .../doclets/internal/toolkit/util/Util.java   |   1 -
 2 files changed, 21 insertions(+), 254 deletions(-)

diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
index 4055b914822..9f0b6417d6c 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
@@ -80,47 +80,15 @@ public class MessageRetriever {
         this.resourcelocation = resourcelocation;
     }
 
-    /**
-     * get and format message string from resource
-     *
-     * @param key selects message from resource
-     */
-    public String getText(String key) {
-        return getText(key, (String)null);
-    }
-
     /**
      * Get and format message string from resource
      *
      * @param key selects message from resource
-     * @param a1 Argument, to be repalced in the message.
-     */
-    public String getText(String key, String a1) {
-        return getText(key, a1, null);
-    }
-
-    /**
-     * Get and format message string from resource
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public String getText(String key, String a1, String a2) {
-        return getText(key, a1, a2, null);
-    }
-
-    /**
-     * Get and format message string from resource
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
+     * @param args arguments to be replaced in the message.
      * @throws MissingResourceException when the key does not
      * exist in the properties file.
      */
-    public String getText(String key, String a1, String a2, String a3) throws MissingResourceException {
+    public String getText(String key, Object... args) throws MissingResourceException {
         if (messageRB == null) {
             try {
                 messageRB = ResourceBundle.getBundle(resourcelocation);
@@ -130,7 +98,7 @@ public class MessageRetriever {
             }
         }
         String message = messageRB.getString(key);
-        return MessageFormat.format(message, a1, a2, a3);
+        return MessageFormat.format(message, args);
     }
 
     /**
@@ -195,87 +163,20 @@ public class MessageRetriever {
      *
      * @param pos the position of the source
      * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
      */
-    public void error(SourcePosition pos, String key) {
-        printError(pos, getText(key));
+    public void error(SourcePosition pos, String key, Object... args) {
+        printError(pos, getText(key, args));
     }
 
     /**
      * Print error message, increment error count.
      *
      * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
      */
-    public void error(String key) {
-        printError(getText(key));
-    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     */
-    public void error(SourcePosition pos, String key, String a1) {
-        printError(pos, getText(key, a1));
-    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     */
-    public void error(String key, String a1) {
-        printError(getText(key, a1));
-    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public void error(SourcePosition pos, String key, String a1, String a2) {
-        printError(pos, getText(key, a1, a2));
-    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public void error(String key, String a1, String a2) {
-        printError(getText(key, a1, a2));
-    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
-     */
-    public void error(SourcePosition pos, String key, String a1, String a2, String a3) {
-        printError(pos, getText(key, a1, a2, a3));
-    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
-     */
-    public void error(String key, String a1, String a2, String a3) {
-        printError(getText(key, a1, a2, a3));
+    public void error(String key, Object... args) {
+        printError(getText(key, args));
     }
 
     /**
@@ -283,87 +184,20 @@ public class MessageRetriever {
      *
      * @param pos the position of the source
      * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
      */
-    public void warning(SourcePosition pos, String key) {
-        printWarning(pos, getText(key));
+    public void warning(SourcePosition pos, String key, Object... args) {
+        printWarning(pos, getText(key, args));
     }
 
     /**
      * Print warning message, increment warning count.
      *
      * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
      */
-    public void warning(String key) {
-        printWarning(getText(key));
-    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     */
-    public void warning(SourcePosition pos, String key, String a1) {
-        printWarning(pos, getText(key, a1));
-    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     */
-    public void warning(String key, String a1) {
-        printWarning(getText(key, a1));
-    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public void warning(SourcePosition pos, String key, String a1, String a2) {
-        printWarning(pos, getText(key, a1, a2));
-    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public void warning(String key, String a1, String a2) {
-        printWarning(getText(key, a1, a2));
-    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
-     */
-    public void warning(SourcePosition pos, String key, String a1, String a2, String a3) {
-        printWarning(pos, getText(key, a1, a2, a3));
-    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
-     */
-    public void warning(String key, String a1, String a2, String a3) {
-        printWarning(getText(key, a1, a2, a3));
+    public void warning(String key, Object... args) {
+        printWarning(getText(key, args));
     }
 
     /**
@@ -371,85 +205,19 @@ public class MessageRetriever {
      *
      * @param pos the position of the source
      * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
      */
-    public void notice(SourcePosition pos, String key) {
-        printNotice(pos, getText(key));
+    public void notice(SourcePosition pos, String key, Object... args) {
+        printNotice(pos, getText(key, args));
     }
 
     /**
      * Print a message.
      *
      * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
      */
-    public void notice(String key) {
-        printNotice(getText(key));
-    }
-
-    /**
-     * Print a message.
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     */
-    public void notice(SourcePosition pos, String key, String a1) {
-        printNotice(pos, getText(key, a1));
-    }
-
-    /**
-     * Print a message.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     */
-    public void notice(String key, String a1) {
-        printNotice(getText(key, a1));
-    }
-
-    /**
-     * Print a message.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public void notice(SourcePosition pos, String key, String a1, String a2) {
-        printNotice(pos, getText(key, a1, a2));
-    }
-
-    /**
-     * Print a message.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     */
-    public void notice(String key, String a1, String a2) {
-        printNotice(getText(key, a1, a2));
-    }
-
-    /**
-     * Print a message.
-     *
-     * @param pos the position of the source
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
-     */
-    public void notice(SourcePosition pos, String key, String a1, String a2, String a3) {
-        printNotice(pos, getText(key, a1, a2, a3));
-    }
-
-    /**
-     * Print a message.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument to be replaced in the message.
-     * @param a2 second argument to be replaced in the message.
-     * @param a3 third argument to be replaced in the message.
-     */
-    public void notice(String key, String a1, String a2, String a3) {
-        printNotice(getText(key, a1, a2, a3));
+    public void notice(String key, Object... args) {
+        printNotice(getText(key, args));
     }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
index 9b7b668b6c0..ef6ab80892b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
@@ -599,7 +599,6 @@ public class Util {
         }
         if (docencoding == null) {
             OutputStreamWriter oswriter = new OutputStreamWriter(fos);
-            docencoding = oswriter.getEncoding();
             return oswriter;
         } else {
             return new OutputStreamWriter(fos, docencoding);

From 5d486c3a66fa1224d3b6023ab2684e08b4e9f6c3 Mon Sep 17 00:00:00 2001
From: Antonios Printezis 
Date: Fri, 16 Jan 2009 13:02:20 -0500
Subject: [PATCH 061/199] 6484956: G1: improve evacuation pause efficiency

A bunch of performance optimizations to decrease GC pause times in G1.

Reviewed-by: apetrusenko, jmasa, iveresov
---
 .../gc_implementation/g1/g1CollectedHeap.cpp  | 231 +++++++++++++-----
 .../gc_implementation/g1/g1CollectedHeap.hpp  |  53 ++++
 .../g1/g1CollectedHeap.inline.hpp             |   7 +-
 .../g1/g1CollectorPolicy.cpp                  |   1 +
 .../vm/gc_implementation/g1/g1OopClosures.hpp |  39 ++-
 .../vm/gc_implementation/g1/g1_globals.hpp    |   2 +-
 .../g1/g1_specialized_oop_closures.hpp        |   6 +-
 .../vm/gc_implementation/includeDB_gc_g1      |  18 +-
 .../vm/gc_implementation/includeDB_gc_shared  |   2 +-
 9 files changed, 272 insertions(+), 87 deletions(-)

diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 3aa19ccb85d..ba3244ef7b7 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -1285,7 +1285,9 @@ G1CollectedHeap::G1CollectedHeap(G1CollectorPolicy* policy_) :
   _unclean_regions_coming(false),
   _young_list(new YoungList(this)),
   _gc_time_stamp(0),
-  _surviving_young_words(NULL)
+  _surviving_young_words(NULL),
+  _in_cset_fast_test(NULL),
+  _in_cset_fast_test_base(NULL)
 {
   _g1h = this; // To catch bugs.
   if (_process_strong_tasks == NULL || !_process_strong_tasks->valid()) {
@@ -2485,6 +2487,19 @@ G1CollectedHeap::do_collection_pause_at_safepoint(HeapRegion* popular_region) {
     g1_policy()->record_collection_pause_start(start_time_sec,
                                                start_used_bytes);
 
+    guarantee(_in_cset_fast_test == NULL, "invariant");
+    guarantee(_in_cset_fast_test_base == NULL, "invariant");
+    _in_cset_fast_test_length = n_regions();
+    _in_cset_fast_test_base =
+                             NEW_C_HEAP_ARRAY(bool, _in_cset_fast_test_length);
+    memset(_in_cset_fast_test_base, false,
+                                     _in_cset_fast_test_length * sizeof(bool));
+    // We're biasing _in_cset_fast_test to avoid subtracting the
+    // beginning of the heap every time we want to index; basically
+    // it's the same with what we do with the card table.
+    _in_cset_fast_test = _in_cset_fast_test_base -
+              ((size_t) _g1_reserved.start() >> HeapRegion::LogOfHRGrainBytes);
+
 #if SCAN_ONLY_VERBOSE
     _young_list->print();
 #endif // SCAN_ONLY_VERBOSE
@@ -2553,6 +2568,12 @@ G1CollectedHeap::do_collection_pause_at_safepoint(HeapRegion* popular_region) {
       free_collection_set(g1_policy()->collection_set());
       g1_policy()->clear_collection_set();
 
+      FREE_C_HEAP_ARRAY(bool, _in_cset_fast_test_base);
+      // this is more for peace of mind; we're nulling them here and
+      // we're expecting them to be null at the beginning of the next GC
+      _in_cset_fast_test = NULL;
+      _in_cset_fast_test_base = NULL;
+
       if (popular_region != NULL) {
         // We have to wait until now, because we don't want the region to
         // be rescheduled for pop-evac during RS update.
@@ -3560,6 +3581,9 @@ public:
   size_t undo_waste()                            { return _undo_waste; }
 
   void push_on_queue(oop* ref) {
+    assert(ref != NULL, "invariant");
+    assert(has_partial_array_mask(ref) || _g1h->obj_in_cs(*ref), "invariant");
+
     if (!refs()->push(ref)) {
       overflowed_refs()->push(ref);
       IF_G1_DETAILED_STATS(note_overflow_push());
@@ -3572,6 +3596,10 @@ public:
     if (!refs()->pop_local(ref)) {
       ref = NULL;
     } else {
+      assert(ref != NULL, "invariant");
+      assert(has_partial_array_mask(ref) || _g1h->obj_in_cs(*ref),
+             "invariant");
+
       IF_G1_DETAILED_STATS(note_pop());
     }
   }
@@ -3601,8 +3629,7 @@ public:
 
       obj = alloc_buf->allocate(word_sz);
       assert(obj != NULL, "buffer was definitely big enough...");
-    }
-    else {
+    } else {
       obj = _g1h->par_allocate_during_gc(purpose, word_sz);
     }
     return obj;
@@ -3695,24 +3722,57 @@ public:
     }
   }
 
+private:
+  void deal_with_reference(oop* ref_to_scan) {
+    if (has_partial_array_mask(ref_to_scan)) {
+      _partial_scan_cl->do_oop_nv(ref_to_scan);
+    } else {
+      // Note: we can use "raw" versions of "region_containing" because
+      // "obj_to_scan" is definitely in the heap, and is not in a
+      // humongous region.
+      HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan);
+      _evac_cl->set_region(r);
+      _evac_cl->do_oop_nv(ref_to_scan);
+    }
+  }
+
+public:
   void trim_queue() {
+    // I've replicated the loop twice, first to drain the overflow
+    // queue, second to drain the task queue. This is better than
+    // having a single loop, which checks both conditions and, inside
+    // it, either pops the overflow queue or the task queue, as each
+    // loop is tighter. Also, the decision to drain the overflow queue
+    // first is not arbitrary, as the overflow queue is not visible
+    // to the other workers, whereas the task queue is. So, we want to
+    // drain the "invisible" entries first, while allowing the other
+    // workers to potentially steal the "visible" entries.
+
     while (refs_to_scan() > 0 || overflowed_refs_to_scan() > 0) {
-      oop *ref_to_scan = NULL;
-      if (overflowed_refs_to_scan() == 0) {
-        pop_from_queue(ref_to_scan);
-      } else {
+      while (overflowed_refs_to_scan() > 0) {
+        oop *ref_to_scan = NULL;
         pop_from_overflow_queue(ref_to_scan);
+        assert(ref_to_scan != NULL, "invariant");
+        // We shouldn't have pushed it on the queue if it was not
+        // pointing into the CSet.
+        assert(ref_to_scan != NULL, "sanity");
+        assert(has_partial_array_mask(ref_to_scan) ||
+                                      _g1h->obj_in_cs(*ref_to_scan), "sanity");
+
+        deal_with_reference(ref_to_scan);
       }
-      if (ref_to_scan != NULL) {
-        if ((intptr_t)ref_to_scan & G1_PARTIAL_ARRAY_MASK) {
-          _partial_scan_cl->do_oop_nv(ref_to_scan);
-        } else {
-          // Note: we can use "raw" versions of "region_containing" because
-          // "obj_to_scan" is definitely in the heap, and is not in a
-          // humongous region.
-          HeapRegion* r = _g1h->heap_region_containing_raw(ref_to_scan);
-          _evac_cl->set_region(r);
-          _evac_cl->do_oop_nv(ref_to_scan);
+
+      while (refs_to_scan() > 0) {
+        oop *ref_to_scan = NULL;
+        pop_from_queue(ref_to_scan);
+
+        if (ref_to_scan != NULL) {
+          // We shouldn't have pushed it on the queue if it was not
+          // pointing into the CSet.
+          assert(has_partial_array_mask(ref_to_scan) ||
+                                      _g1h->obj_in_cs(*ref_to_scan), "sanity");
+
+          deal_with_reference(ref_to_scan);
         }
       }
     }
@@ -3728,16 +3788,25 @@ G1ParClosureSuper::G1ParClosureSuper(G1CollectedHeap* g1, G1ParScanThreadState*
 // Should probably be made inline and moved in g1OopClosures.inline.hpp.
 void G1ParScanClosure::do_oop_nv(oop* p) {
   oop obj = *p;
+
   if (obj != NULL) {
-    if (_g1->obj_in_cs(obj)) {
-      if (obj->is_forwarded()) {
-        *p = obj->forwardee();
-      } else {
-        _par_scan_state->push_on_queue(p);
-        return;
-      }
+    if (_g1->in_cset_fast_test(obj)) {
+      // We're not going to even bother checking whether the object is
+      // already forwarded or not, as this usually causes an immediate
+      // stall. We'll try to prefetch the object (for write, given that
+      // we might need to install the forwarding reference) and we'll
+      // get back to it when pop it from the queue
+      Prefetch::write(obj->mark_addr(), 0);
+      Prefetch::read(obj->mark_addr(), (HeapWordSize*2));
+
+      // slightly paranoid test; I'm trying to catch potential
+      // problems before we go into push_on_queue to know where the
+      // problem is coming from
+      assert(obj == *p, "the value of *p should not have changed");
+      _par_scan_state->push_on_queue(p);
+    } else {
+      _g1_rem->par_write_ref(_from, p, _par_scan_state->queue_num());
     }
-    _g1_rem->par_write_ref(_from, p, _par_scan_state->queue_num());
   }
 }
 
@@ -3777,13 +3846,36 @@ oop G1ParCopyHelper::copy_to_survivor_space(oop old) {
     return _g1->handle_evacuation_failure_par(cl, old);
   }
 
+  // We're going to allocate linearly, so might as well prefetch ahead.
+  Prefetch::write(obj_ptr, PrefetchCopyIntervalInBytes);
+
   oop forward_ptr = old->forward_to_atomic(obj);
   if (forward_ptr == NULL) {
     Copy::aligned_disjoint_words((HeapWord*) old, obj_ptr, word_sz);
-    obj->set_mark(m);
     if (g1p->track_object_age(alloc_purpose)) {
-      obj->incr_age();
+      // We could simply do obj->incr_age(). However, this causes a
+      // performance issue. obj->incr_age() will first check whether
+      // the object has a displaced mark by checking its mark word;
+      // getting the mark word from the new location of the object
+      // stalls. So, given that we already have the mark word and we
+      // are about to install it anyway, it's better to increase the
+      // age on the mark word, when the object does not have a
+      // displaced mark word. We're not expecting many objects to have
+      // a displaced marked word, so that case is not optimized
+      // further (it could be...) and we simply call obj->incr_age().
+
+      if (m->has_displaced_mark_helper()) {
+        // in this case, we have to install the mark word first,
+        // otherwise obj looks to be forwarded (the old mark word,
+        // which contains the forward pointer, was copied)
+        obj->set_mark(m);
+        obj->incr_age();
+      } else {
+        m = m->incr_age();
+      }
     }
+    obj->set_mark(m);
+
     // preserve "next" mark bit
     if (_g1->mark_in_progress() && !_g1->is_obj_ill(old)) {
       if (!use_local_bitmaps ||
@@ -3805,9 +3897,11 @@ oop G1ParCopyHelper::copy_to_survivor_space(oop old) {
 
     if (obj->is_objArray() && arrayOop(obj)->length() >= ParGCArrayScanChunk) {
       arrayOop(old)->set_length(0);
-      _par_scan_state->push_on_queue((oop*) ((intptr_t)old | G1_PARTIAL_ARRAY_MASK));
+      _par_scan_state->push_on_queue(set_partial_array_mask(old));
     } else {
-      _scanner->set_region(_g1->heap_region_containing(obj));
+      // No point in using the slower heap_region_containing() method,
+      // given that we know obj is in the heap.
+      _scanner->set_region(_g1->heap_region_containing_raw(obj));
       obj->oop_iterate_backwards(_scanner);
     }
   } else {
@@ -3817,47 +3911,55 @@ oop G1ParCopyHelper::copy_to_survivor_space(oop old) {
   return obj;
 }
 
-template
-void G1ParCopyClosure::do_oop_work(oop* p) {
+template
+void G1ParCopyClosure::do_oop_work(oop* p) {
   oop obj = *p;
   assert(barrier != G1BarrierRS || obj != NULL,
          "Precondition: G1BarrierRS implies obj is nonNull");
 
-  if (obj != NULL) {
-    if (_g1->obj_in_cs(obj)) {
+  // The only time we skip the cset test is when we're scanning
+  // references popped from the queue. And we only push on the queue
+  // references that we know point into the cset, so no point in
+  // checking again. But we'll leave an assert here for peace of mind.
+  assert(!skip_cset_test || _g1->obj_in_cs(obj), "invariant");
+
+  // here the null check is implicit in the cset_fast_test() test
+  if (skip_cset_test || _g1->in_cset_fast_test(obj)) {
 #if G1_REM_SET_LOGGING
-      gclog_or_tty->print_cr("Loc "PTR_FORMAT" contains pointer "PTR_FORMAT" into CS.",
-                             p, (void*) obj);
+    gclog_or_tty->print_cr("Loc "PTR_FORMAT" contains pointer "PTR_FORMAT" "
+                           "into CS.", p, (void*) obj);
 #endif
-      if (obj->is_forwarded()) {
-        *p = obj->forwardee();
-      } else {
-        *p = copy_to_survivor_space(obj);
-      }
-      // When scanning the RS, we only care about objs in CS.
-      if (barrier == G1BarrierRS) {
-        _g1_rem->par_write_ref(_from, p, _par_scan_state->queue_num());
-      }
+    if (obj->is_forwarded()) {
+      *p = obj->forwardee();
+    } else {
+      *p = copy_to_survivor_space(obj);
     }
-    // When scanning moved objs, must look at all oops.
-    if (barrier == G1BarrierEvac) {
+    // When scanning the RS, we only care about objs in CS.
+    if (barrier == G1BarrierRS) {
       _g1_rem->par_write_ref(_from, p, _par_scan_state->queue_num());
     }
+  }
 
-    if (do_gen_barrier) {
-      par_do_barrier(p);
-    }
+  // When scanning moved objs, must look at all oops.
+  if (barrier == G1BarrierEvac && obj != NULL) {
+    _g1_rem->par_write_ref(_from, p, _par_scan_state->queue_num());
+  }
+
+  if (do_gen_barrier && obj != NULL) {
+    par_do_barrier(p);
   }
 }
 
-template void G1ParCopyClosure::do_oop_work(oop* p);
+template void G1ParCopyClosure::do_oop_work(oop* p);
 
-template  void G1ParScanPartialArrayClosure::process_array_chunk(
+template void G1ParScanPartialArrayClosure::process_array_chunk(
   oop obj, int start, int end) {
   // process our set of indices (include header in first chunk)
   assert(start < end, "invariant");
   T* const base      = (T*)objArrayOop(obj)->base();
-  T* const start_addr = base + start;
+  T* const start_addr = (start == 0) ? (T*) obj : base + start;
   T* const end_addr   = base + end;
   MemRegion mr((HeapWord*)start_addr, (HeapWord*)end_addr);
   _scanner.set_region(_g1->heap_region_containing(obj));
@@ -3866,7 +3968,8 @@ template  void G1ParScanPartialArrayClosure::process_array_chunk(
 
 void G1ParScanPartialArrayClosure::do_oop_nv(oop* p) {
   assert(!UseCompressedOops, "Needs to be fixed to work with compressed oops");
-  oop old = oop((intptr_t)p & ~G1_PARTIAL_ARRAY_MASK);
+  assert(has_partial_array_mask(p), "invariant");
+  oop old = clear_partial_array_mask(p);
   assert(old->is_objArray(), "must be obj array");
   assert(old->is_forwarded(), "must be forwarded");
   assert(Universe::heap()->is_in_reserved(old), "must be in heap.");
@@ -3884,7 +3987,7 @@ void G1ParScanPartialArrayClosure::do_oop_nv(oop* p) {
     end = start + ParGCArrayScanChunk;
     arrayOop(old)->set_length(end);
     // Push remainder.
-    _par_scan_state->push_on_queue((oop*) ((intptr_t) old | G1_PARTIAL_ARRAY_MASK));
+    _par_scan_state->push_on_queue(set_partial_array_mask(old));
   } else {
     // Restore length so that the heap remains parsable in
     // case of evacuation failure.
@@ -3893,11 +3996,6 @@ void G1ParScanPartialArrayClosure::do_oop_nv(oop* p) {
 
   // process our set of indices (include header in first chunk)
   process_array_chunk(obj, start, end);
-  oop* start_addr = start == 0 ? (oop*)obj : obj->obj_at_addr(start);
-  oop* end_addr   = (oop*)(obj->base()) + end; // obj_at_addr(end) asserts end < length
-  MemRegion mr((HeapWord*)start_addr, (HeapWord*)end_addr);
-  _scanner.set_region(_g1->heap_region_containing(obj));
-  obj->oop_iterate(&_scanner, mr);
 }
 
 int G1ScanAndBalanceClosure::_nq = 0;
@@ -3931,6 +4029,13 @@ public:
                           pss->hash_seed(),
                           ref_to_scan)) {
         IF_G1_DETAILED_STATS(pss->note_steal());
+
+        // slightly paranoid tests; I'm trying to catch potential
+        // problems before we go into push_on_queue to know where the
+        // problem is coming from
+        assert(ref_to_scan != NULL, "invariant");
+        assert(has_partial_array_mask(ref_to_scan) ||
+                                   _g1h->obj_in_cs(*ref_to_scan), "invariant");
         pss->push_on_queue(ref_to_scan);
         continue;
       }
@@ -3976,10 +4081,10 @@ public:
     ResourceMark rm;
     HandleMark   hm;
 
-    G1ParScanThreadState pss(_g1h, i);
-    G1ParScanHeapEvacClosure     scan_evac_cl(_g1h, &pss);
-    G1ParScanHeapEvacClosure     evac_failure_cl(_g1h, &pss);
-    G1ParScanPartialArrayClosure partial_scan_cl(_g1h, &pss);
+    G1ParScanThreadState            pss(_g1h, i);
+    G1ParScanHeapEvacClosure        scan_evac_cl(_g1h, &pss);
+    G1ParScanHeapEvacFailureClosure evac_failure_cl(_g1h, &pss);
+    G1ParScanPartialArrayClosure    partial_scan_cl(_g1h, &pss);
 
     pss.set_evac_closure(&scan_evac_cl);
     pss.set_evac_failure_closure(&evac_failure_cl);
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
index edd4a55ce59..738b4be04ec 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
@@ -247,6 +247,27 @@ private:
   NumberSeq _pop_obj_rc_at_copy;
   void print_popularity_summary_info() const;
 
+  // This is used for a quick test on whether a reference points into
+  // the collection set or not. Basically, we have an array, with one
+  // byte per region, and that byte denotes whether the corresponding
+  // region is in the collection set or not. The entry corresponding
+  // the bottom of the heap, i.e., region 0, is pointed to by
+  // _in_cset_fast_test_base.  The _in_cset_fast_test field has been
+  // biased so that it actually points to address 0 of the address
+  // space, to make the test as fast as possible (we can simply shift
+  // the address to address into it, instead of having to subtract the
+  // bottom of the heap from the address before shifting it; basically
+  // it works in the same way the card table works).
+  bool* _in_cset_fast_test;
+
+  // The allocated array used for the fast test on whether a reference
+  // points into the collection set or not. This field is also used to
+  // free the array.
+  bool* _in_cset_fast_test_base;
+
+  // The length of the _in_cset_fast_test_base array.
+  size_t _in_cset_fast_test_length;
+
   volatile unsigned _gc_time_stamp;
 
   size_t* _surviving_young_words;
@@ -368,6 +389,38 @@ public:
   virtual void gc_prologue(bool full);
   virtual void gc_epilogue(bool full);
 
+  // We register a region with the fast "in collection set" test. We
+  // simply set to true the array slot corresponding to this region.
+  void register_region_with_in_cset_fast_test(HeapRegion* r) {
+    assert(_in_cset_fast_test_base != NULL, "sanity");
+    assert(r->in_collection_set(), "invariant");
+    int index = r->hrs_index();
+    assert(0 <= (size_t) index && (size_t) index < _in_cset_fast_test_length,
+           "invariant");
+    assert(!_in_cset_fast_test_base[index], "invariant");
+    _in_cset_fast_test_base[index] = true;
+  }
+
+  // This is a fast test on whether a reference points into the
+  // collection set or not. It does not assume that the reference
+  // points into the heap; if it doesn't, it will return false.
+  bool in_cset_fast_test(oop obj) {
+    assert(_in_cset_fast_test != NULL, "sanity");
+    if (_g1_committed.contains((HeapWord*) obj)) {
+      // no need to subtract the bottom of the heap from obj,
+      // _in_cset_fast_test is biased
+      size_t index = ((size_t) obj) >> HeapRegion::LogOfHRGrainBytes;
+      bool ret = _in_cset_fast_test[index];
+      // let's make sure the result is consistent with what the slower
+      // test returns
+      assert( ret || !obj_in_cs(obj), "sanity");
+      assert(!ret ||  obj_in_cs(obj), "sanity");
+      return ret;
+    } else {
+      return false;
+    }
+  }
+
 protected:
 
   // Shrink the garbage-first heap by at most the given size (in bytes!).
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
index 8cafe3d9885..4d88ee4cbb6 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp
@@ -36,8 +36,11 @@ G1CollectedHeap::heap_region_containing(const void* addr) const {
 
 inline HeapRegion*
 G1CollectedHeap::heap_region_containing_raw(const void* addr) const {
-  HeapRegion* res = _hrs->addr_to_region(addr);
-  assert(res != NULL, "addr outside of heap?");
+  assert(_g1_reserved.contains(addr), "invariant");
+  size_t index = ((intptr_t) addr - (intptr_t) _g1_reserved.start())
+                                              >> HeapRegion::LogOfHRGrainBytes;
+  HeapRegion* res = _hrs->at(index);
+  assert(res == _hrs->addr_to_region(addr), "sanity");
   return res;
 }
 
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
index a5d0165bb4d..e467e4d8070 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
@@ -2985,6 +2985,7 @@ add_to_collection_set(HeapRegion* hr) {
   _collection_set = hr;
   _collection_set_size++;
   _collection_set_bytes_used_before += hr->used();
+  _g1->register_region_with_in_cset_fast_test(hr);
 }
 
 void
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp
index 58653196a36..2791bf6ee6b 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1OopClosures.hpp
@@ -77,6 +77,18 @@ public:
 
 #define G1_PARTIAL_ARRAY_MASK 1
 
+inline bool has_partial_array_mask(oop* ref) {
+  return (intptr_t) ref & G1_PARTIAL_ARRAY_MASK;
+}
+
+inline oop* set_partial_array_mask(oop obj) {
+  return (oop*) ((intptr_t) obj | G1_PARTIAL_ARRAY_MASK);
+}
+
+inline oop clear_partial_array_mask(oop* ref) {
+  return oop((intptr_t) ref & ~G1_PARTIAL_ARRAY_MASK);
+}
+
 class G1ParScanPartialArrayClosure : public G1ParClosureSuper {
   G1ParScanClosure _scanner;
   template  void process_array_chunk(oop obj, int start, int end);
@@ -101,7 +113,8 @@ public:
     G1ParClosureSuper(g1, par_scan_state), _scanner(scanner) { }
 };
 
-template
+template
 class G1ParCopyClosure : public G1ParCopyHelper {
   G1ParScanClosure _scanner;
   void do_oop_work(oop* p);
@@ -119,14 +132,22 @@ public:
   virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
 };
 
-typedef G1ParCopyClosure G1ParScanExtRootClosure;
-typedef G1ParCopyClosure G1ParScanPermClosure;
-typedef G1ParCopyClosure G1ParScanAndMarkExtRootClosure;
-typedef G1ParCopyClosure G1ParScanAndMarkPermClosure;
-typedef G1ParCopyClosure G1ParScanHeapRSClosure;
-typedef G1ParCopyClosure G1ParScanAndMarkHeapRSClosure;
-typedef G1ParCopyClosure G1ParScanHeapEvacClosure;
-
+typedef G1ParCopyClosure G1ParScanExtRootClosure;
+typedef G1ParCopyClosure G1ParScanPermClosure;
+typedef G1ParCopyClosure G1ParScanAndMarkExtRootClosure;
+typedef G1ParCopyClosure G1ParScanAndMarkPermClosure;
+typedef G1ParCopyClosure G1ParScanHeapRSClosure;
+typedef G1ParCopyClosure G1ParScanAndMarkHeapRSClosure;
+// This is the only case when we set skip_cset_test. Basically, this
+// closure is (should?) only be called directly while we're draining
+// the overflow and task queues. In that case we know that the
+// reference in question points into the collection set, otherwise we
+// would not have pushed it on the queue.
+typedef G1ParCopyClosure G1ParScanHeapEvacClosure;
+// We need a separate closure to handle references during evacuation
+// failure processing, as it cannot asume that the reference already
+ // points to the collection set (like G1ParScanHeapEvacClosure does).
+typedef G1ParCopyClosure G1ParScanHeapEvacFailureClosure;
 
 class FilterIntoCSClosure: public OopClosure {
   G1CollectedHeap* _g1;
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp
index 72a684812d5..e7e9d7363d6 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1_globals.hpp
@@ -28,7 +28,7 @@
 
 #define G1_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw) \
                                                                             \
-  product(intx, ParallelGCG1AllocBufferSize, 4*K,                           \
+  product(intx, ParallelGCG1AllocBufferSize, 8*K,                           \
           "Size of parallel G1 allocation buffers in to-space.")            \
                                                                             \
   product(intx, G1TimeSliceMS, 500,                                         \
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp
index 39f72a616b7..4cfb76464e4 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1_specialized_oop_closures.hpp
@@ -32,11 +32,13 @@ enum G1Barrier {
   G1BarrierNone, G1BarrierRS, G1BarrierEvac
 };
 
-template
+template
 class G1ParCopyClosure;
 class G1ParScanClosure;
 
-typedef G1ParCopyClosure G1ParScanHeapEvacClosure;
+typedef G1ParCopyClosure
+                                                      G1ParScanHeapEvacClosure;
 
 class FilterIntoCSClosure;
 class FilterOutOfRegionClosure;
diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1 b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1
index 536a3704fe6..1f5ad18dc02 100644
--- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1
+++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1
@@ -31,7 +31,7 @@ bufferingOopClosure.hpp			os.hpp
 cardTableRS.cpp				concurrentMark.hpp
 cardTableRS.cpp				g1SATBCardTableModRefBS.hpp
 
-collectionSetChooser.cpp		g1CollectedHeap.hpp
+collectionSetChooser.cpp		g1CollectedHeap.inline.hpp
 collectionSetChooser.cpp		g1CollectorPolicy.hpp
 collectionSetChooser.cpp		collectionSetChooser.hpp
 
@@ -42,14 +42,14 @@ concurrentG1Refine.cpp			atomic.hpp
 concurrentG1Refine.cpp			concurrentG1Refine.hpp
 concurrentG1Refine.cpp			concurrentG1RefineThread.hpp
 concurrentG1Refine.cpp			copy.hpp
-concurrentG1Refine.cpp			g1CollectedHeap.hpp
+concurrentG1Refine.cpp			g1CollectedHeap.inline.hpp
 concurrentG1Refine.cpp			g1RemSet.hpp
 
 concurrentG1Refine.hpp			globalDefinitions.hpp
 
 concurrentG1RefineThread.cpp		concurrentG1Refine.hpp
 concurrentG1RefineThread.cpp		concurrentG1RefineThread.hpp
-concurrentG1RefineThread.cpp		g1CollectedHeap.hpp
+concurrentG1RefineThread.cpp		g1CollectedHeap.inline.hpp
 concurrentG1RefineThread.cpp            g1CollectorPolicy.hpp
 concurrentG1RefineThread.cpp		handles.inline.hpp
 concurrentG1RefineThread.cpp		mutexLocker.hpp
@@ -166,7 +166,7 @@ g1CollectorPolicy.cpp			concurrentMark.hpp
 g1CollectorPolicy.cpp			concurrentMarkThread.inline.hpp
 g1CollectorPolicy.cpp			debug.hpp
 g1CollectorPolicy.cpp			java.hpp
-g1CollectorPolicy.cpp                   g1CollectedHeap.hpp
+g1CollectorPolicy.cpp                   g1CollectedHeap.inline.hpp
 g1CollectorPolicy.cpp                   g1CollectorPolicy.hpp
 g1CollectorPolicy.cpp                   heapRegionRemSet.hpp
 g1CollectorPolicy.cpp			mutexLocker.hpp
@@ -187,7 +187,7 @@ g1MarkSweep.cpp                         biasedLocking.hpp
 g1MarkSweep.cpp                         codeCache.hpp
 g1MarkSweep.cpp                         events.hpp
 g1MarkSweep.cpp                         fprofiler.hpp
-g1MarkSweep.hpp                         g1CollectedHeap.hpp
+g1MarkSweep.hpp                         g1CollectedHeap.inline.hpp
 g1MarkSweep.cpp                         g1MarkSweep.hpp
 g1MarkSweep.cpp                         gcLocker.hpp
 g1MarkSweep.cpp                         genCollectedHeap.hpp
@@ -283,7 +283,7 @@ heapRegionRemSet.cpp                    globalDefinitions.hpp
 heapRegionRemSet.cpp                    space.inline.hpp
 
 heapRegionSeq.cpp                       allocation.hpp
-heapRegionSeq.cpp                       g1CollectedHeap.hpp
+heapRegionSeq.cpp                       g1CollectedHeap.inline.hpp
 heapRegionSeq.cpp                       heapRegionSeq.hpp
 
 heapRegionSeq.hpp                       growableArray.hpp
@@ -334,18 +334,18 @@ specialized_oop_closures.hpp		g1_specialized_oop_closures.hpp
 survRateGroup.hpp			numberSeq.hpp
 
 survRateGroup.cpp			allocation.hpp
-survRateGroup.cpp			g1CollectedHeap.hpp
+survRateGroup.cpp			g1CollectedHeap.inline.hpp
 survRateGroup.cpp			g1CollectorPolicy.hpp
 survRateGroup.cpp			heapRegion.hpp
 survRateGroup.cpp			survRateGroup.hpp
 
 thread.cpp				concurrentMarkThread.inline.hpp
 
-universe.cpp                            g1CollectedHeap.hpp
+universe.cpp                            g1CollectedHeap.inline.hpp
 universe.cpp                            g1CollectorPolicy.hpp
 
 vm_operations_g1.hpp			vmGCOperations.hpp
 
 vm_operations_g1.cpp			vm_operations_g1.hpp
-vm_operations_g1.cpp                    g1CollectedHeap.hpp
+vm_operations_g1.cpp                    g1CollectedHeap.inline.hpp
 vm_operations_g1.cpp                    isGCActiveMark.hpp
diff --git a/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared b/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared
index 7ea2265898d..99ce759a474 100644
--- a/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared
+++ b/hotspot/src/share/vm/gc_implementation/includeDB_gc_shared
@@ -100,4 +100,4 @@ spaceCounters.hpp                       mutableSpace.hpp
 spaceCounters.hpp                       perfData.hpp
 spaceCounters.hpp                       generationCounters.hpp
 
-vmGCOperations.cpp                      g1CollectedHeap.hpp
+vmGCOperations.cpp                      g1CollectedHeap.inline.hpp

From a23ea7296a466f301007afefc6a304c25d93b311 Mon Sep 17 00:00:00 2001
From: Vladimir Kozlov 
Date: Fri, 16 Jan 2009 11:23:10 -0800
Subject: [PATCH 062/199] 6790209: server VM fails with assert(will_link,"_new:
 typeflow responsibility")

Add missing code for reflection class loader in SystemDictionary::find().

Reviewed-by: never, jrose
---
 hotspot/src/share/vm/classfile/systemDictionary.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index 0908e1c8785..f78292a0419 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -841,6 +841,12 @@ klassOop SystemDictionary::find(symbolHandle class_name,
                                 Handle protection_domain,
                                 TRAPS) {
 
+  // UseNewReflection
+  // The result of this call should be consistent with the result
+  // of the call to resolve_instance_class_or_null().
+  // See evaluation 6790209 and 4474172 for more details.
+  class_loader = Handle(THREAD, java_lang_ClassLoader::non_reflection_class_loader(class_loader()));
+
   unsigned int d_hash = dictionary()->compute_hash(class_name, class_loader);
   int d_index = dictionary()->hash_to_index(d_hash);
 

From 66443965435433de5cac7514dd0b444665ef11a2 Mon Sep 17 00:00:00 2001
From: Joe Darcy 
Date: Fri, 16 Jan 2009 14:05:55 -0800
Subject: [PATCH 063/199] 6583626: Improve serialization support in
 javax.lang.model.type exception classes

Reviewed-by: jjg
---
 .../model/type/MirroredTypeException.java     | 14 ++++++++++--
 .../model/type/MirroredTypesException.java    | 22 ++++++++++++++-----
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java b/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java
index bf5904b8a61..db729c59550 100644
--- a/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java
+++ b/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package javax.lang.model.type;
 
-
+import java.io.ObjectInputStream;
+import java.io.IOException;
 import java.lang.annotation.Annotation;
 import javax.lang.model.element.Element;
 
@@ -67,4 +68,13 @@ public class MirroredTypeException extends RuntimeException {
     public TypeMirror getTypeMirror() {
         return type;
     }
+
+    /**
+     * Explicitly set all transient fields.
+     */
+    private void readObject(ObjectInputStream s)
+        throws IOException, ClassNotFoundException {
+        s.defaultReadObject();
+        type = null;
+    }
 }
diff --git a/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java b/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
index 4ed0383d5ea..54efe41a7c9 100644
--- a/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
+++ b/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,12 @@
 
 package javax.lang.model.type;
 
-
 import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Collections;
-
+import java.io.ObjectInputStream;
+import java.io.IOException;
 import javax.lang.model.element.Element;
 
 
@@ -49,8 +49,7 @@ public class MirroredTypesException extends RuntimeException {
 
     private static final long serialVersionUID = 269;
 
-    // Should this be non-final for a custum readObject method?
-    private final transient List types;   // cannot be serialized
+    private transient List types; // cannot be serialized
 
     /**
      * Constructs a new MirroredTypesException for the specified types.
@@ -58,7 +57,9 @@ public class MirroredTypesException extends RuntimeException {
      * @param types  the types being accessed
      */
     public MirroredTypesException(List types) {
-        super("Attempt to access Class objects for TypeMirrors " + types);
+        super("Attempt to access Class objects for TypeMirrors " +
+              (types = // defensive copy
+               new ArrayList(types)).toString() );
         this.types = Collections.unmodifiableList(types);
     }
 
@@ -72,4 +73,13 @@ public class MirroredTypesException extends RuntimeException {
     public List getTypeMirrors() {
         return types;
     }
+
+    /**
+     * Explicitly set all transient fields.
+     */
+    private void readObject(ObjectInputStream s)
+        throws IOException, ClassNotFoundException {
+        s.defaultReadObject();
+        types = null;
+    }
 }

From 220ed00264776702ddadd96e0db106917afc2f02 Mon Sep 17 00:00:00 2001
From: Weijun Wang 
Date: Mon, 19 Jan 2009 18:49:10 +0800
Subject: [PATCH 064/199] 6793475: krb5.ini not found on some Windows

Reviewed-by: xuelei
---
 .../classes/sun/security/krb5/Config.java     | 82 ++++++++++++-------
 .../sun/security/krb5/WindowsDirectory.c      | 31 ++++---
 2 files changed, 66 insertions(+), 47 deletions(-)

diff --git a/jdk/src/share/classes/sun/security/krb5/Config.java b/jdk/src/share/classes/sun/security/krb5/Config.java
index 2a16b983f33..ec3eb81767d 100644
--- a/jdk/src/share/classes/sun/security/krb5/Config.java
+++ b/jdk/src/share/classes/sun/security/krb5/Config.java
@@ -1,5 +1,5 @@
 /*
- * Portions Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Portions Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@ public class Config {
     private String defaultRealm;   // default kdc realm.
 
     // used for native interface
-    private static native String getWindowsDirectory();
+    private static native String getWindowsDirectory(boolean isSystem);
 
 
     /**
@@ -661,38 +661,37 @@ public class Config {
     }
 
     /**
-     * Gets the default configuration file name. The file will be searched
-     * in a list of possible loations in the following order:
-     * 1. the location and file name defined by system property
-     * "java.security.krb5.conf",
-     * 2. at Java home lib\security directory with "krb5.conf" name,
-     * 3. "krb5.ini" at Java home,
-     * 4. at windows directory with the name of "krb5.ini" for Windows,
-     * /etc/krb5/krb5.conf for Solaris, /etc/krb5.conf for Linux.
+     * Gets the default configuration file name. This method will never
+     * return null.
+     *
+     * If the system property "java.security.krb5.conf" is defined, we'll
+     * use its value, no matter if the file exists or not. Otherwise,
+     * the file will be searched in a list of possible loations in the
+     * following order:
+     *
+     * 1. at Java home lib\security directory with "krb5.conf" name,
+     * 2. at windows directory with the name of "krb5.ini" for Windows,
+     * /etc/krb5/krb5.conf for Solaris, /etc/krb5.conf otherwise.
+     *
+     * Note: When the Terminal Service is started in Windows (from 2003),
+     * there are two kinds of Windows directories: A system one (say,
+     * C:\Windows), and a user-private one (say, C:\Users\Me\Windows).
+     * We will first look for krb5.ini in the user-private one. If not
+     * found, try the system one instead.
      */
     private String getFileName() {
         String name =
             java.security.AccessController.doPrivileged(
                                 new sun.security.action.
                                 GetPropertyAction("java.security.krb5.conf"));
-        if (name != null) {
-            boolean temp =
-                java.security.AccessController.doPrivileged(
-                                new FileExistsAction(name));
-            if (temp)
-                return name;
-        } else {
+        if (name == null) {
             name = java.security.AccessController.doPrivileged(
                         new sun.security.action.
                         GetPropertyAction("java.home")) + File.separator +
                                 "lib" + File.separator + "security" +
                                 File.separator + "krb5.conf";
-            boolean temp =
-                java.security.AccessController.doPrivileged(
-                                new FileExistsAction(name));
-            if (temp) {
-                return name;
-            } else {
+            if (!fileExists(name)) {
+                name = null;
                 String osname =
                         java.security.AccessController.doPrivileged(
                         new sun.security.action.GetPropertyAction("os.name"));
@@ -703,19 +702,35 @@ public class Config {
                         // ignore exceptions
                     }
                     if (Credentials.alreadyLoaded) {
-                        if ((name = getWindowsDirectory()) == null) {
-                            name = "c:\\winnt\\krb5.ini";
-                        } else if (name.endsWith("\\")) {
-                            name += "krb5.ini";
-                        } else {
-                            name += "\\krb5.ini";
+                        String path = getWindowsDirectory(false);
+                        if (path != null) {
+                            if (path.endsWith("\\")) {
+                                path = path + "krb5.ini";
+                            } else {
+                                path = path + "\\krb5.ini";
+                            }
+                            if (fileExists(path)) {
+                                name = path;
+                            }
                         }
-                    } else {
+                        if (name == null) {
+                            path = getWindowsDirectory(true);
+                            if (path != null) {
+                                if (path.endsWith("\\")) {
+                                    path = path + "krb5.ini";
+                                } else {
+                                    path = path + "\\krb5.ini";
+                                }
+                                name = path;
+                            }
+                        }
+                    }
+                    if (name == null) {
                         name = "c:\\winnt\\krb5.ini";
                     }
                 } else if (osname.startsWith("SunOS")) {
                     name =  "/etc/krb5/krb5.conf";
-                } else if (osname.startsWith("Linux")) {
+                } else {
                     name =  "/etc/krb5.conf";
                 }
             }
@@ -1171,6 +1186,11 @@ public class Config {
         return kdcs;
     }
 
+    private boolean fileExists(String name) {
+        return java.security.AccessController.doPrivileged(
+                                new FileExistsAction(name));
+    }
+
     static class FileExistsAction
         implements java.security.PrivilegedAction {
 
diff --git a/jdk/src/windows/native/sun/security/krb5/WindowsDirectory.c b/jdk/src/windows/native/sun/security/krb5/WindowsDirectory.c
index dc96bad91ab..7b11163863d 100644
--- a/jdk/src/windows/native/sun/security/krb5/WindowsDirectory.c
+++ b/jdk/src/windows/native/sun/security/krb5/WindowsDirectory.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
  * have any questions.
  */
 
+#define UNICODE
 #include 
 #include 
 #include 
@@ -30,22 +31,20 @@
 /*
  * Class:     sun_security_krb5_Config
  * Method:    getWindowsDirectory
- * Signature: ()Ljava/lang/String;
+ * Signature: (Z)Ljava/lang/String;
  */
 JNIEXPORT jstring JNICALL Java_sun_security_krb5_Config_getWindowsDirectory(
-    JNIEnv* env, jclass configClass) {
-    LPTSTR lpPath = NULL;
-    UINT uLength ;
-    jstring path = NULL;
-
-    if (uLength = GetWindowsDirectory(lpPath, 0)) {
-        lpPath = (LPTSTR)malloc(sizeof(TCHAR) * uLength);
-        if (lpPath != NULL) {
-            if (GetWindowsDirectory(lpPath, uLength)) {
-                path = (*env)->NewStringUTF(env, lpPath);
-            }
-            free(lpPath);
-        }
+        JNIEnv* env, jclass configClass, jboolean isSystem) {
+    TCHAR lpPath[MAX_PATH+1];
+    UINT len;
+    if (isSystem) {
+        len = GetSystemWindowsDirectory(lpPath, MAX_PATH);
+    } else {
+        len = GetWindowsDirectory(lpPath, MAX_PATH);
+    }
+    if (len) {
+        return (*env)->NewString(env, lpPath, len);
+    } else {
+        return NULL;
     }
-    return path;
 }

From e3d66c641499640a5e7c0b6a1a3df7170fbc5299 Mon Sep 17 00:00:00 2001
From: Alex Menkov 
Date: Mon, 19 Jan 2009 20:11:58 +0300
Subject: [PATCH 065/199] 6702956: OpenJDK: replace encumbered code (software
 synthesizer) 6717691: Update Gervill with post 1.0 fixes 6740210: Update
 Gervill with more post 1.0 fixes 6748247: Further update Gervill with still
 more post 1.0 fixes 6748251: Apply IcedTea midi sound patch 6758986: Gervill:
 Turn SoftJitterCorrector, SoftAudioPusher threads into a daemon threads

Reviewed-by: ohair, darcy
---
 jdk/make/common/Release.gmk                   |    8 -
 jdk/make/common/internal/BinaryPlugs.gmk      |   91 +-
 jdk/make/javax/sound/Makefile                 |   21 +-
 jdk/make/javax/sound/jsoundhs/FILES.gmk       |   91 -
 jdk/make/javax/sound/jsoundhs/Makefile        |  100 -
 jdk/make/javax/sound/jsoundhs/mapfile-vers    |  153 -
 .../sun/media/sound/AbstractMidiDevice.java   |   29 +-
 .../media/sound/AudioFileSoundbankReader.java |  131 +
 .../sun/media/sound/AudioFloatConverter.java  | 1058 +++++++
 .../sound/AudioFloatFormatConverter.java      |  617 ++++
 .../media/sound/AudioFloatInputStream.java    |  281 ++
 .../com/sun/media/sound/AudioSynthesizer.java |  128 +
 .../sound/AudioSynthesizerPropertyInfo.java   |   76 +
 .../classes/com/sun/media/sound/DLSInfo.java  |  109 +
 .../com/sun/media/sound/DLSInstrument.java    |  448 +++
 .../com/sun/media/sound/DLSModulator.java     |  351 +++
 .../com/sun/media/sound/DLSRegion.java        |  150 +
 .../com/sun/media/sound/DLSSample.java        |  122 +
 .../com/sun/media/sound/DLSSampleLoop.java    |   63 +
 .../com/sun/media/sound/DLSSampleOptions.java |   80 +
 .../com/sun/media/sound/DLSSoundbank.java     | 1287 ++++++++
 .../sun/media/sound/DLSSoundbankReader.java   |   74 +
 .../sun/media/sound/DirectAudioDevice.java    |  108 +-
 .../sun/media/sound/EmergencySoundbank.java   | 2695 +++++++++++++++++
 .../classes/com/sun/media/sound/FFT.java      |  748 +++++
 .../sun/media/sound/InvalidDataException.java |   45 +
 .../media/sound/InvalidFormatException.java   |   44 +
 .../sun/media/sound/JARSoundbankReader.java   |  120 +
 .../sound/ModelAbstractChannelMixer.java      |  126 +
 .../media/sound/ModelAbstractOscillator.java  |  200 ++
 .../com/sun/media/sound/ModelByteBuffer.java  |  329 ++
 .../media/sound/ModelByteBufferWavetable.java |  281 ++
 .../sun/media/sound/ModelChannelMixer.java    |   50 +
 .../sun/media/sound/ModelConnectionBlock.java |  135 +
 .../com/sun/media/sound/ModelDestination.java |  117 +
 .../sun/media/sound/ModelDirectedPlayer.java  |   36 +
 .../com/sun/media/sound/ModelDirector.java    |   46 +
 .../com/sun/media/sound/ModelIdentifier.java  |  169 ++
 .../com/sun/media/sound/ModelInstrument.java  |  136 +
 .../sound/ModelInstrumentComparator.java      |   52 +
 .../media/sound/ModelMappedInstrument.java    |   62 +
 .../com/sun/media/sound/ModelOscillator.java  |   44 +
 .../media/sound/ModelOscillatorStream.java    |   48 +
 .../com/sun/media/sound/ModelPatch.java       |   52 +
 .../com/sun/media/sound/ModelPerformer.java   |  143 +
 .../com/sun/media/sound/ModelSource.java      |  109 +
 .../media/sound/ModelStandardDirector.java    |   86 +
 .../media/sound/ModelStandardTransform.java   |  139 +
 .../com/sun/media/sound/ModelTransform.java   |   35 +
 .../com/sun/media/sound/ModelWavetable.java   |   49 +
 .../classes/com/sun/media/sound/Platform.java |    5 +-
 .../media/sound/RIFFInvalidDataException.java |   43 +
 .../sound/RIFFInvalidFormatException.java     |   44 +
 .../com/sun/media/sound/RIFFReader.java       |  332 ++
 .../com/sun/media/sound/RIFFWriter.java       |  365 +++
 .../sun/media/sound/RealTimeSequencer.java    |  337 ---
 .../com/sun/media/sound/SF2GlobalRegion.java  |   33 +
 .../com/sun/media/sound/SF2Instrument.java    |  911 ++++++
 .../sun/media/sound/SF2InstrumentRegion.java  |   43 +
 .../classes/com/sun/media/sound/SF2Layer.java |   78 +
 .../com/sun/media/sound/SF2LayerRegion.java   |   43 +
 .../com/sun/media/sound/SF2Modulator.java     |   97 +
 .../com/sun/media/sound/SF2Region.java        |  167 +
 .../com/sun/media/sound/SF2Sample.java        |  216 ++
 .../com/sun/media/sound/SF2Soundbank.java     |  973 ++++++
 .../sun/media/sound/SF2SoundbankReader.java   |   73 +
 .../com/sun/media/sound/SimpleInstrument.java |  196 ++
 .../com/sun/media/sound/SimpleSoundbank.java  |  145 +
 .../media/sound/SoftAbstractResampler.java    |  390 +++
 .../com/sun/media/sound/SoftAudioBuffer.java  |  104 +
 .../sun/media/sound/SoftAudioProcessor.java   |   48 +
 .../com/sun/media/sound/SoftAudioPusher.java  |   91 +
 .../com/sun/media/sound/SoftChannel.java      | 1548 ++++++++++
 .../com/sun/media/sound/SoftChannelProxy.java |  202 ++
 .../com/sun/media/sound/SoftChorus.java       |  341 +++
 .../com/sun/media/sound/SoftControl.java      |   36 +
 .../sun/media/sound/SoftCubicResampler.java   |   87 +
 .../media/sound/SoftEnvelopeGenerator.java    |  298 ++
 .../com/sun/media/sound/SoftFilter.java       |  614 ++++
 .../com/sun/media/sound/SoftInstrument.java   |   82 +
 .../sun/media/sound/SoftJitterCorrector.java  |  276 ++
 .../sun/media/sound/SoftLanczosResampler.java |  118 +
 .../com/sun/media/sound/SoftLimiter.java      |  191 ++
 .../sun/media/sound/SoftLinearResampler.java  |   70 +
 .../sun/media/sound/SoftLinearResampler2.java |  108 +
 .../sound/SoftLowFrequencyOscillator.java     |  122 +
 .../com/sun/media/sound/SoftMainMixer.java    |  982 ++++++
 .../media/sound/SoftMidiAudioFileReader.java  |  214 ++
 .../com/sun/media/sound/SoftMixingClip.java   |  539 ++++
 .../sun/media/sound/SoftMixingDataLine.java   |  522 ++++
 .../sun/media/sound/SoftMixingMainMixer.java  |  259 ++
 .../com/sun/media/sound/SoftMixingMixer.java  |  529 ++++
 .../media/sound/SoftMixingMixerProvider.java  |   66 +
 .../media/sound/SoftMixingSourceDataLine.java |  519 ++++
 .../com/sun/media/sound/SoftPerformer.java    |  775 +++++
 .../sun/media/sound/SoftPointResampler.java   |   63 +
 .../com/sun/media/sound/SoftProcess.java      |   41 +
 .../com/sun/media/sound/SoftProvider.java     |   51 +
 .../com/sun/media/sound/SoftReceiver.java     |   83 +
 .../com/sun/media/sound/SoftResampler.java    |   35 +
 .../media/sound/SoftResamplerStreamer.java    |   38 +
 .../com/sun/media/sound/SoftReverb.java       |  515 ++++
 .../com/sun/media/sound/SoftShortMessage.java |   58 +
 .../sun/media/sound/SoftSincResampler.java    |  139 +
 .../com/sun/media/sound/SoftSynthesizer.java  | 1179 +++++++
 .../com/sun/media/sound/SoftTuning.java       |  256 ++
 .../com/sun/media/sound/SoftVoice.java        |  841 +++++
 .../media/sound/WaveExtensibleFileReader.java |  339 +++
 .../sun/media/sound/WaveFloatFileReader.java  |  166 +
 .../sun/media/sound/WaveFloatFileWriter.java  |  147 +
 .../javax.sound.midi.spi.MidiDeviceProvider   |    2 +-
 .../javax.sound.midi.spi.MidiFileReader       |    1 -
 .../javax.sound.midi.spi.SoundbankReader      |    5 +-
 .../javax.sound.sampled.spi.AudioFileReader   |    2 +
 ...sound.sampled.spi.FormatConversionProvider |    1 +
 .../javax.sound.sampled.spi.MixerProvider     |    2 -
 jdk/src/share/lib/audio/soundbank.gm          |  Bin 493589 -> 0 bytes
 .../AudioFloatConverter/GetFormat.java        |   41 +
 .../AudioFloatConverter/ToFloatArray.java     |  160 +
 .../AudioFloatInputStream/Available.java      |   81 +
 .../Gervill/AudioFloatInputStream/Close.java  |   72 +
 .../AudioFloatInputStream/GetFormat.java      |   74 +
 .../AudioFloatInputStream/GetFrameLength.java |   74 +
 .../AudioFloatInputStream/MarkSupported.java  |   74 +
 .../Gervill/AudioFloatInputStream/Read.java   |   83 +
 .../AudioFloatInputStream/ReadFloatArray.java |   81 +
 .../ReadFloatArrayIntInt.java                 |   83 +
 .../Gervill/AudioFloatInputStream/Reset.java  |   87 +
 .../Gervill/AudioFloatInputStream/Skip.java   |   83 +
 .../TestGetSoundbankFile.java                 |   52 +
 .../TestGetSoundbankInputStream.java          |   63 +
 .../TestGetSoundbankInputStream2.java         |  119 +
 .../TestGetSoundbankUrl.java                  |   54 +
 .../midi/Gervill/DLSSoundbankReader/ding.dls  |  Bin 0 -> 72554 bytes
 .../TestCreateSoundbank.java                  |   59 +
 .../ModelByteBuffer/GetInputStream.java       |   91 +
 .../midi/Gervill/ModelByteBuffer/GetRoot.java |   82 +
 .../midi/Gervill/ModelByteBuffer/Load.java    |   89 +
 .../midi/Gervill/ModelByteBuffer/LoadAll.java |   93 +
 .../NewModelByteBufferByteArray.java          |   84 +
 .../NewModelByteBufferByteArrayIntInt.java    |   86 +
 .../NewModelByteBufferFile.java               |   88 +
 .../NewModelByteBufferFileLongLong.java       |   88 +
 .../RandomFileInputStream/Available.java      |  107 +
 .../RandomFileInputStream/Close.java          |  104 +
 .../RandomFileInputStream/MarkReset.java      |  129 +
 .../RandomFileInputStream/MarkSupported.java  |  106 +
 .../RandomFileInputStream/Read.java           |  117 +
 .../RandomFileInputStream/ReadByte.java       |  118 +
 .../RandomFileInputStream/ReadByteIntInt.java |  118 +
 .../RandomFileInputStream/Skip.java           |  131 +
 .../ModelByteBuffer/SubbufferLong.java        |   92 +
 .../ModelByteBuffer/SubbufferLongLong.java    |   92 +
 .../SubbufferLongLongBoolean.java             |   98 +
 .../midi/Gervill/ModelByteBuffer/Unload.java  |   83 +
 .../midi/Gervill/ModelByteBuffer/WriteTo.java |   92 +
 .../GetAttenuation.java                       |   97 +
 .../ModelByteBufferWavetable/GetChannels.java |   97 +
 .../GetLoopLength.java                        |   96 +
 .../GetLoopStart.java                         |   96 +
 .../GetPitchCorrection.java                   |   97 +
 ...delByteBufferWavetableModelByteBuffer.java |   94 +
 ...erWavetableModelByteBufferAudioFormat.java |   94 +
 ...etableModelByteBufferAudioFormatFloat.java |   94 +
 ...teBufferWavetableModelByteBufferFloat.java |   96 +
 .../ModelByteBufferWavetable/Open.java        |   92 +
 .../Set8BitExtensionBuffer.java               |  119 +
 .../ModelByteBufferWavetable/SetLoopType.java |   96 +
 .../ModelDestination/NewModelDestination.java |   46 +
 .../NewModelDestinationModelIdentifier.java   |   46 +
 .../ModelDestination/SetIdentifier.java       |   45 +
 .../ModelDestination/SetTransform.java        |   46 +
 .../Gervill/ModelIdentifier/EqualsObject.java |   54 +
 .../NewModelIdentifierString.java             |   48 +
 .../NewModelIdentifierStringInt.java          |   48 +
 .../NewModelIdentifierStringString.java       |   48 +
 .../NewModelIdentifierStringStringInt.java    |   48 +
 .../Gervill/ModelIdentifier/SetInstance.java  |   45 +
 .../Gervill/ModelIdentifier/SetObject.java    |   45 +
 .../Gervill/ModelIdentifier/SetVariable.java  |   45 +
 .../ModelPerformer/GetOscillators.java        |   44 +
 .../ModelPerformer/SetConnectionBlocks.java   |   48 +
 .../SetDefaultConnectionsEnabled.java         |   49 +
 .../ModelPerformer/SetExclusiveClass.java     |   45 +
 .../Gervill/ModelPerformer/SetKeyFrom.java    |   45 +
 .../midi/Gervill/ModelPerformer/SetKeyTo.java |   45 +
 .../midi/Gervill/ModelPerformer/SetName.java  |   45 +
 .../ModelPerformer/SetSelfNonExclusive.java   |   48 +
 .../Gervill/ModelPerformer/SetVelFrom.java    |   45 +
 .../midi/Gervill/ModelPerformer/SetVelTo.java |   45 +
 .../Gervill/ModelSource/NewModelSource.java   |   48 +
 .../NewModelSourceModelIdentifier.java        |   46 +
 .../NewModelSourceModelIdentifierBoolean.java |   49 +
 ...elSourceModelIdentifierBooleanBoolean.java |   51 +
 ...ourceModelIdentifierBooleanBooleanInt.java |   56 +
 ...elSourceModelIdentifierModelTransform.java |   47 +
 .../Gervill/ModelSource/SetIdentifier.java    |   45 +
 .../Gervill/ModelSource/SetTransform.java     |   46 +
 .../NewModelStandardTransform.java            |   48 +
 .../NewModelStandardTransformBoolean.java     |   48 +
 ...wModelStandardTransformBooleanBoolean.java |   50 +
 ...delStandardTransformBooleanBooleanInt.java |   51 +
 .../ModelStandardTransform/SetDirection.java  |   45 +
 .../ModelStandardTransform/SetPolarity.java   |   45 +
 .../ModelStandardTransform/SetTransform.java  |   74 +
 .../TransformAbsolute.java                    |   73 +
 .../TransformConcave.java                     |   98 +
 .../TransformConvex.java                      |   98 +
 .../TransformLinear.java                      |   90 +
 .../TransformSwitch.java                      |   63 +
 .../Gervill/RiffReaderWriter/Available.java   |   78 +
 .../midi/Gervill/RiffReaderWriter/Close.java  |   72 +
 .../RiffReaderWriter/GetFilePointer.java      |   78 +
 .../Gervill/RiffReaderWriter/GetSize.java     |   77 +
 .../RiffReaderWriter/HasNextChunk.java        |   85 +
 .../midi/Gervill/RiffReaderWriter/Read.java   |   79 +
 .../Gervill/RiffReaderWriter/ReadByte.java    |   79 +
 .../RiffReaderWriter/ReadByteArrayIntInt.java |   81 +
 .../Gervill/RiffReaderWriter/ReadInt.java     |   79 +
 .../Gervill/RiffReaderWriter/ReadLong.java    |   79 +
 .../Gervill/RiffReaderWriter/ReadShort.java   |   79 +
 .../Gervill/RiffReaderWriter/ReadString.java  |   79 +
 .../RiffReaderWriter/ReadUnsignedByte.java    |   79 +
 .../RiffReaderWriter/ReadUnsignedInt.java     |   79 +
 .../RiffReaderWriter/ReadUnsignedShort.java   |   79 +
 .../midi/Gervill/RiffReaderWriter/Skip.java   |   78 +
 .../RiffReaderWriter/WriteOutputStream.java   |   81 +
 .../TestGetSoundbankFile.java                 |   52 +
 .../TestGetSoundbankInputStream.java          |   63 +
 .../TestGetSoundbankInputStream2.java         |  119 +
 .../TestGetSoundbankUrl.java                  |   54 +
 .../midi/Gervill/SF2SoundbankReader/ding.sf2  |  Bin 0 -> 72618 bytes
 .../SimpleInstrument/AddModelInstrument.java  |   86 +
 .../AddModelInstrumentIntInt.java             |   91 +
 .../AddModelInstrumentIntIntIntInt.java       |   97 +
 .../AddModelInstrumentIntIntIntIntInt.java    |   97 +
 .../SimpleInstrument/AddModelPerformer.java   |   83 +
 .../AddModelPerformerArray.java               |   83 +
 .../AddModelPerformerArrayIntInt.java         |   89 +
 .../AddModelPerformerArrayIntIntIntInt.java   |   95 +
 ...AddModelPerformerArrayIntIntIntIntInt.java |   95 +
 .../AddModelPerformerIntInt.java              |   89 +
 .../AddModelPerformerIntIntIntInt.java        |   95 +
 .../AddModelPerformerIntIntIntIntInt.java     |   95 +
 .../midi/Gervill/SimpleInstrument/Clear.java  |   73 +
 .../Gervill/SimpleInstrument/SetName.java     |   72 +
 .../Gervill/SimpleInstrument/SetPatch.java    |   75 +
 .../SimpleSoundbank/AddInstrument.java        |   51 +
 .../Gervill/SimpleSoundbank/AddResource.java  |   52 +
 .../SimpleSoundbank/GetInstrument.java        |   50 +
 .../SimpleSoundbank/RemoveInstrument.java     |   58 +
 .../SimpleSoundbank/SetDescription.java       |   47 +
 .../midi/Gervill/SimpleSoundbank/SetName.java |   47 +
 .../Gervill/SimpleSoundbank/SetVendor.java    |   47 +
 .../Gervill/SimpleSoundbank/SetVersion.java   |   47 +
 .../midi/Gervill/SoftAudioBuffer/Array.java   |   54 +
 .../midi/Gervill/SoftAudioBuffer/Clear.java   |   56 +
 .../midi/Gervill/SoftAudioBuffer/Get.java     |   68 +
 .../SoftAudioBuffer/NewSoftAudioBuffer.java   |   55 +
 .../DummySourceDataLine.java                  |  232 ++
 .../SoftAudioSynthesizer/GetFormat.java       |   61 +
 .../SoftAudioSynthesizer/GetPropertyInfo.java |   53 +
 .../Gervill/SoftAudioSynthesizer/Open.java    |   54 +
 .../SoftAudioSynthesizer/OpenStream.java      |   54 +
 .../midi/Gervill/SoftChannel/AllNotesOff.java |   64 +
 .../midi/Gervill/SoftChannel/AllSoundOff.java |   64 +
 .../Gervill/SoftChannel/ChannelPressure.java  |   59 +
 .../midi/Gervill/SoftChannel/Controller.java  |   62 +
 .../Gervill/SoftChannel/LocalControl.java     |   60 +
 .../sound/midi/Gervill/SoftChannel/Mono.java  |   59 +
 .../sound/midi/Gervill/SoftChannel/Mute.java  |   59 +
 .../midi/Gervill/SoftChannel/NoteOff.java     |   64 +
 .../midi/Gervill/SoftChannel/NoteOff2.java    |   64 +
 .../midi/Gervill/SoftChannel/NoteOn.java      |   64 +
 .../sound/midi/Gervill/SoftChannel/Omni.java  |   61 +
 .../midi/Gervill/SoftChannel/PitchBend.java   |   59 +
 .../Gervill/SoftChannel/PolyPressure.java     |   61 +
 .../Gervill/SoftChannel/ProgramChange.java    |   59 +
 .../SoftChannel/ResetAllControllers.java      |  132 +
 .../Gervill/SoftChannel/SoftTestUtils.java    |  111 +
 .../sound/midi/Gervill/SoftChannel/Solo.java  |   59 +
 .../SoftCubicResampler/Interpolate.java       |  113 +
 .../SoftLanczosResampler/Interpolate.java     |  113 +
 .../SoftLimiter/ProcessAudio_replace_mix.java |   96 +
 .../ProcessAudio_replace_mix_mono.java        |   83 +
 ...ocessAudio_replace_mix_mono_overdrive.java |   84 +
 .../ProcessAudio_replace_mix_overdrive.java   |   95 +
 .../ProcessAudio_replace_normal.java          |   95 +
 .../ProcessAudio_replace_normal_mono.java     |   83 +
 .../ProcessAudio_replace_overdrive.java       |   95 +
 .../ProcessAudio_replace_overdrive_mono.java  |   83 +
 .../SoftLinearResampler/Interpolate.java      |  113 +
 .../SoftLinearResampler2/Interpolate.java     |  113 +
 .../SoftPointResampler/Interpolate.java       |  113 +
 .../midi/Gervill/SoftProvider/GetDevice.java  |   70 +
 .../midi/Gervill/SoftReceiver/Close.java      |   59 +
 .../SoftReceiver/Send_ActiveSense.java        |   82 +
 .../SoftReceiver/Send_AllNotesOff.java        |   64 +
 .../SoftReceiver/Send_AllSoundOff.java        |   64 +
 .../SoftReceiver/Send_ChannelPressure.java    |   63 +
 .../Gervill/SoftReceiver/Send_Controller.java |   66 +
 .../midi/Gervill/SoftReceiver/Send_Mono.java  |   75 +
 .../Gervill/SoftReceiver/Send_NoteOff.java    |   65 +
 .../Gervill/SoftReceiver/Send_NoteOn.java     |   65 +
 .../SoftReceiver/Send_NoteOn_AllChannels.java |   71 +
 .../SoftReceiver/Send_NoteOn_Delayed.java     |   67 +
 .../SoftReceiver/Send_NoteOn_Multiple.java    |   76 +
 .../midi/Gervill/SoftReceiver/Send_Omni.java  |   74 +
 .../Gervill/SoftReceiver/Send_PitchBend.java  |   63 +
 .../SoftReceiver/Send_PolyPressure.java       |   65 +
 .../SoftReceiver/Send_ProgramChange.java      |   63 +
 .../Send_ResetAllControllers.java             |  136 +
 .../Gervill/SoftReceiver/SoftTestUtils.java   |  111 +
 .../SoftSincResampler/Interpolate.java        |  113 +
 .../midi/Gervill/SoftSynthesizer/Close.java   |   58 +
 .../SoftSynthesizer/DummySourceDataLine.java  |  232 ++
 .../GetAvailableInstruments.java              |   63 +
 .../Gervill/SoftSynthesizer/GetChannels.java  |   64 +
 .../SoftSynthesizer/GetDefaultSoundbank.java  |   58 +
 .../SoftSynthesizer/GetDeviceInfo.java        |   56 +
 .../Gervill/SoftSynthesizer/GetLatency.java   |   58 +
 .../SoftSynthesizer/GetLoadedInstruments.java |   65 +
 .../SoftSynthesizer/GetMaxPolyphony.java      |   58 +
 .../SoftSynthesizer/GetMaxReceivers.java      |   56 +
 .../SoftSynthesizer/GetMaxTransmitters.java   |   56 +
 .../GetMicrosecondPosition.java               |   64 +
 .../Gervill/SoftSynthesizer/GetReceiver.java  |   63 +
 .../Gervill/SoftSynthesizer/GetReceiver2.java |   62 +
 .../Gervill/SoftSynthesizer/GetReceivers.java |   63 +
 .../SoftSynthesizer/GetTransmitter.java       |   63 +
 .../SoftSynthesizer/GetTransmitters.java      |   58 +
 .../SoftSynthesizer/GetVoiceStatus.java       |   61 +
 .../SoftSynthesizer/ImplicitOpenClose.java    |  105 +
 .../midi/Gervill/SoftSynthesizer/IsOpen.java  |   59 +
 .../SoftSynthesizer/IsSoundbankSupported.java |   95 +
 .../SoftSynthesizer/LoadAllInstruments.java   |   73 +
 .../SoftSynthesizer/LoadInstrument.java       |   73 +
 .../SoftSynthesizer/LoadInstruments.java      |   73 +
 .../midi/Gervill/SoftSynthesizer/Open.java    |   64 +
 .../Gervill/SoftSynthesizer/OpenStream.java   |   58 +
 .../SoftSynthesizer/RemapInstrument.java      |   76 +
 .../Gervill/SoftSynthesizer/TestRender1.java  |  214 ++
 .../SoftSynthesizer/UnloadAllInstruments.java |   69 +
 .../SoftSynthesizer/UnloadInstrument.java     |   75 +
 .../SoftSynthesizer/UnloadInstruments.java    |   75 +
 .../midi/Gervill/SoftSynthesizer/ding.sf2     |  Bin 0 -> 72618 bytes
 .../midi/Gervill/SoftSynthesizer/expresso.mid |  Bin 0 -> 17449 bytes
 .../midi/Gervill/SoftTuning/GetName.java      |   54 +
 .../midi/Gervill/SoftTuning/GetTuning.java    |   56 +
 .../midi/Gervill/SoftTuning/GetTuningInt.java |   53 +
 .../sound/midi/Gervill/SoftTuning/Load1.java  |  101 +
 .../sound/midi/Gervill/SoftTuning/Load2.java  |   71 +
 .../sound/midi/Gervill/SoftTuning/Load4.java  |  104 +
 .../sound/midi/Gervill/SoftTuning/Load5.java  |   87 +
 .../sound/midi/Gervill/SoftTuning/Load6.java  |   91 +
 .../sound/midi/Gervill/SoftTuning/Load7.java  |   72 +
 .../sound/midi/Gervill/SoftTuning/Load8.java  |   65 +
 .../sound/midi/Gervill/SoftTuning/Load9.java  |   69 +
 .../Gervill/SoftTuning/NewSoftTuning.java     |   56 +
 .../SoftTuning/NewSoftTuningByteArray.java    |   63 +
 .../SoftTuning/NewSoftTuningPatch.java        |   54 +
 .../NewSoftTuningPatchByteArray.java          |   65 +
 362 files changed, 46203 insertions(+), 865 deletions(-)
 delete mode 100644 jdk/make/javax/sound/jsoundhs/FILES.gmk
 delete mode 100644 jdk/make/javax/sound/jsoundhs/Makefile
 delete mode 100644 jdk/make/javax/sound/jsoundhs/mapfile-vers
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/AudioFloatInputStream.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/AudioSynthesizer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSInfo.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSInstrument.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSModulator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSRegion.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSSample.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSSampleLoop.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSSampleOptions.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/EmergencySoundbank.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/FFT.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/InvalidDataException.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/InvalidFormatException.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/JARSoundbankReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelAbstractChannelMixer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelAbstractOscillator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelByteBuffer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelChannelMixer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelConnectionBlock.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelDestination.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelDirectedPlayer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelDirector.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelIdentifier.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelInstrument.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelInstrumentComparator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelMappedInstrument.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelOscillator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelOscillatorStream.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelPatch.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelPerformer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelSource.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelStandardDirector.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelStandardTransform.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelTransform.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/ModelWavetable.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/RIFFInvalidDataException.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/RIFFInvalidFormatException.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/RIFFReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/RIFFWriter.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2GlobalRegion.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2Instrument.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2InstrumentRegion.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2Layer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2LayerRegion.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2Modulator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2Region.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2Sample.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2Soundbank.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SF2SoundbankReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SimpleInstrument.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SimpleSoundbank.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftAbstractResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftAudioBuffer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftAudioProcessor.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftAudioPusher.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftChannel.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftChannelProxy.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftChorus.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftControl.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftCubicResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftEnvelopeGenerator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftFilter.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftInstrument.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftJitterCorrector.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftLanczosResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftLimiter.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftLinearResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftLinearResampler2.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftLowFrequencyOscillator.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMainMixer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMidiAudioFileReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMixingClip.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMixingDataLine.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMixingMainMixer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMixingMixer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMixingMixerProvider.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftMixingSourceDataLine.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftPerformer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftPointResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftProcess.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftProvider.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftReceiver.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftResamplerStreamer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftReverb.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftShortMessage.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftSincResampler.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftTuning.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/SoftVoice.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/WaveFloatFileReader.java
 create mode 100644 jdk/src/share/classes/com/sun/media/sound/WaveFloatFileWriter.java
 delete mode 100644 jdk/src/share/lib/audio/soundbank.gm
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatConverter/GetFormat.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatConverter/ToFloatArray.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/Available.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/Close.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/GetFormat.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/GetFrameLength.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/MarkSupported.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/Read.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/ReadFloatArray.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/ReadFloatArrayIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/Reset.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/AudioFloatInputStream/Skip.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/DLSSoundbankReader/TestGetSoundbankFile.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/DLSSoundbankReader/TestGetSoundbankInputStream.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/DLSSoundbankReader/TestGetSoundbankInputStream2.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/DLSSoundbankReader/TestGetSoundbankUrl.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/DLSSoundbankReader/ding.dls
 create mode 100644 jdk/test/javax/sound/midi/Gervill/EmergencySoundbank/TestCreateSoundbank.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetInputStream.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetRoot.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Load.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/LoadAll.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArray.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArrayIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFile.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFileLongLong.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Available.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Close.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkReset.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkSupported.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Read.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByte.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByteIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Skip.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLong.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLong.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLongBoolean.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Unload.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/WriteTo.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/GetAttenuation.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/GetChannels.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/GetLoopLength.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/GetLoopStart.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/GetPitchCorrection.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/NewModelByteBufferWavetableModelByteBuffer.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/NewModelByteBufferWavetableModelByteBufferAudioFormat.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/NewModelByteBufferWavetableModelByteBufferAudioFormatFloat.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/NewModelByteBufferWavetableModelByteBufferFloat.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/Open.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/Set8BitExtensionBuffer.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/SetLoopType.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelDestination/NewModelDestination.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelDestination/NewModelDestinationModelIdentifier.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelDestination/SetIdentifier.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelDestination/SetTransform.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/EqualsObject.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/NewModelIdentifierString.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/NewModelIdentifierStringInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/NewModelIdentifierStringString.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/NewModelIdentifierStringStringInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/SetInstance.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/SetObject.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelIdentifier/SetVariable.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/GetOscillators.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetConnectionBlocks.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetDefaultConnectionsEnabled.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetExclusiveClass.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetKeyFrom.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetKeyTo.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetName.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetSelfNonExclusive.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetVelFrom.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelPerformer/SetVelTo.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/NewModelSource.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/NewModelSourceModelIdentifier.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/NewModelSourceModelIdentifierBoolean.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/NewModelSourceModelIdentifierBooleanBoolean.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/NewModelSourceModelIdentifierBooleanBooleanInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/NewModelSourceModelIdentifierModelTransform.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/SetIdentifier.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelSource/SetTransform.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/NewModelStandardTransform.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/NewModelStandardTransformBoolean.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/NewModelStandardTransformBooleanBoolean.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/NewModelStandardTransformBooleanBooleanInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/SetDirection.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/SetPolarity.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/SetTransform.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/TransformAbsolute.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/TransformConcave.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/TransformConvex.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/TransformLinear.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/ModelStandardTransform/TransformSwitch.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Available.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Close.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetFilePointer.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/GetSize.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/HasNextChunk.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Read.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByte.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadByteArrayIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadLong.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadShort.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadString.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedByte.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/ReadUnsignedShort.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/Skip.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/RiffReaderWriter/WriteOutputStream.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SF2SoundbankReader/TestGetSoundbankFile.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SF2SoundbankReader/TestGetSoundbankInputStream.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SF2SoundbankReader/TestGetSoundbankInputStream2.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SF2SoundbankReader/TestGetSoundbankUrl.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SF2SoundbankReader/ding.sf2
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelInstrumentIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelInstrumentIntIntIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelInstrumentIntIntIntIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformer.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerArray.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerArrayIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerArrayIntIntIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerArrayIntIntIntIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerIntIntIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/AddModelPerformerIntIntIntIntInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/Clear.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/SetName.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleInstrument/SetPatch.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/AddInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/AddResource.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/GetInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/RemoveInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/SetDescription.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/SetName.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/SetVendor.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SimpleSoundbank/SetVersion.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioBuffer/Array.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioBuffer/Clear.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioBuffer/Get.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioBuffer/NewSoftAudioBuffer.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/DummySourceDataLine.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/GetFormat.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/GetPropertyInfo.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/Open.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftAudioSynthesizer/OpenStream.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/AllNotesOff.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/AllSoundOff.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/ChannelPressure.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/Controller.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/LocalControl.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/Mono.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/Mute.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/NoteOff.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/NoteOff2.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/NoteOn.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/Omni.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/PitchBend.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/PolyPressure.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/ProgramChange.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/ResetAllControllers.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/SoftTestUtils.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftChannel/Solo.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftCubicResampler/Interpolate.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLanczosResampler/Interpolate.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_mix.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_mix_mono.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_mix_mono_overdrive.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_mix_overdrive.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_normal.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_normal_mono.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_overdrive.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLimiter/ProcessAudio_replace_overdrive_mono.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLinearResampler/Interpolate.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftLinearResampler2/Interpolate.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftPointResampler/Interpolate.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftProvider/GetDevice.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Close.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_ActiveSense.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_AllNotesOff.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_AllSoundOff.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_ChannelPressure.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_Controller.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_Mono.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_NoteOff.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_NoteOn.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_NoteOn_AllChannels.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_NoteOn_Delayed.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_NoteOn_Multiple.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_Omni.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_PitchBend.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_PolyPressure.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_ProgramChange.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/Send_ResetAllControllers.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftReceiver/SoftTestUtils.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSincResampler/Interpolate.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/Close.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/DummySourceDataLine.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetAvailableInstruments.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetChannels.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetDefaultSoundbank.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetDeviceInfo.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetLatency.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetLoadedInstruments.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetMaxPolyphony.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetMaxReceivers.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetMaxTransmitters.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetMicrosecondPosition.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetReceiver.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetReceiver2.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetReceivers.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetTransmitter.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetTransmitters.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/GetVoiceStatus.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/ImplicitOpenClose.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/IsOpen.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/IsSoundbankSupported.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/LoadAllInstruments.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/LoadInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/LoadInstruments.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/Open.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/OpenStream.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/RemapInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/TestRender1.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/UnloadAllInstruments.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/UnloadInstrument.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/UnloadInstruments.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/ding.sf2
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftSynthesizer/expresso.mid
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/GetName.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/GetTuning.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/GetTuningInt.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load1.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load2.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load4.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load5.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load6.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load7.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load8.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/Load9.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/NewSoftTuning.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/NewSoftTuningByteArray.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/NewSoftTuningPatch.java
 create mode 100644 jdk/test/javax/sound/midi/Gervill/SoftTuning/NewSoftTuningPatchByteArray.java

diff --git a/jdk/make/common/Release.gmk b/jdk/make/common/Release.gmk
index 76a1bc466f2..4bee467967d 100644
--- a/jdk/make/common/Release.gmk
+++ b/jdk/make/common/Release.gmk
@@ -911,14 +911,6 @@ initial-image-jdk:: initial-image-jdk-setup \
 	    fi; \
 	done
   ifeq ($(PLATFORM), windows)
-	@#
-	@# Audio soundbank - Bug# 4236400
-	@# Windows only: adding audio files to JDK's jre/lib directory.
-	@#
-	($(CD) $(LIBDIR) && $(TAR) cf - \
-	    `$(FIND) audio -depth -print`) | \
-	    ($(CD) $(JDK_IMAGE_DIR)/jre/lib && $(TAR) xf -)
-	@#
 	@#
 	@# lib/
 	@#
diff --git a/jdk/make/common/internal/BinaryPlugs.gmk b/jdk/make/common/internal/BinaryPlugs.gmk
index bb2d64262ed..a77044af43c 100644
--- a/jdk/make/common/internal/BinaryPlugs.gmk
+++ b/jdk/make/common/internal/BinaryPlugs.gmk
@@ -29,9 +29,7 @@
 
 # Names of native shared libraries
 
-PLUG_JSOUND_LIBRARY=$(LIB_PREFIX)jsoundhs.$(LIBRARY_SUFFIX)
-PLUG_LIBRARY_NAMES = \
-    $(PLUG_JSOUND_LIBRARY)
+PLUG_LIBRARY_NAMES=
 
 # Sub-directory where native shared libraries are located (e.g. jre/bin or...)
 
@@ -74,62 +72,10 @@ com/sun/jmx/snmp/daemon/SnmpSocket.class \
 com/sun/jmx/snmp/daemon/SnmpTimerServer.class \
 com/sun/jmx/snmp/daemon/WaitQ.class
 
-PLUG_SOUND_CLASS_NAMES = \
-com/sun/media/sound/AbstractPlayer.class \
-com/sun/media/sound/CircularBuffer.class \
-com/sun/media/sound/HeadspaceInstrument.class \
-com/sun/media/sound/HeadspaceMixer\$$1.class \
-com/sun/media/sound/HeadspaceMixer\$$MidiLine.class \
-com/sun/media/sound/HeadspaceMixer\$$MidiLineInfo.class \
-com/sun/media/sound/HeadspaceMixer\$$MixerInfo.class \
-com/sun/media/sound/HeadspaceMixer\$$MixerReverbControl\$$MixerReverbType.class \
-com/sun/media/sound/HeadspaceMixer\$$MixerReverbControl.class \
-com/sun/media/sound/HeadspaceMixer.class \
-com/sun/media/sound/HeadspaceMixerProvider.class \
-com/sun/media/sound/HeadspaceSample.class \
-com/sun/media/sound/HeadspaceSoundbank.class \
-com/sun/media/sound/HsbParser.class \
-com/sun/media/sound/MixerClip\$$1.class \
-com/sun/media/sound/MixerClip\$$MixerClipApplyReverbControl.class \
-com/sun/media/sound/MixerClip\$$MixerClipGainControl.class \
-com/sun/media/sound/MixerClip\$$MixerClipMuteControl.class \
-com/sun/media/sound/MixerClip\$$MixerClipPanControl.class \
-com/sun/media/sound/MixerClip\$$MixerClipSampleRateControl.class \
-com/sun/media/sound/MixerClip.class \
-com/sun/media/sound/MixerMidiChannel.class \
-com/sun/media/sound/MixerSequencer\$$1.class \
-com/sun/media/sound/MixerSequencer\$$ControllerVectorElement.class \
-com/sun/media/sound/MixerSequencer\$$MixerSequencerInfo.class \
-com/sun/media/sound/MixerSequencer\$$RecordingTrack.class \
-com/sun/media/sound/MixerSequencer.class \
-com/sun/media/sound/MixerSequencerProvider.class \
-com/sun/media/sound/MixerSourceLine\$$1.class \
-com/sun/media/sound/MixerSourceLine\$$MixerSourceLineApplyReverbControl.class \
-com/sun/media/sound/MixerSourceLine\$$MixerSourceLineGainControl.class \
-com/sun/media/sound/MixerSourceLine\$$MixerSourceLineMuteControl.class \
-com/sun/media/sound/MixerSourceLine\$$MixerSourceLinePanControl.class \
-com/sun/media/sound/MixerSourceLine\$$MixerSourceLineSampleRateControl.class \
-com/sun/media/sound/MixerSourceLine.class \
-com/sun/media/sound/MixerSynth\$$1.class \
-com/sun/media/sound/MixerSynth\$$MixerSynthInfo.class \
-com/sun/media/sound/MixerSynth\$$SynthReceiver.class \
-com/sun/media/sound/MixerSynth.class \
-com/sun/media/sound/MixerSynthProvider.class \
-com/sun/media/sound/MixerThread.class \
-com/sun/media/sound/RmfFileReader.class \
-com/sun/media/sound/SimpleInputDevice\$$1.class \
-com/sun/media/sound/SimpleInputDevice\$$InputDeviceDataLine.class \
-com/sun/media/sound/SimpleInputDevice\$$InputDevicePort.class \
-com/sun/media/sound/SimpleInputDevice\$$InputDevicePortInfo.class \
-com/sun/media/sound/SimpleInputDevice.class \
-com/sun/media/sound/SimpleInputDeviceProvider\$$1.class \
-com/sun/media/sound/SimpleInputDeviceProvider\$$InputDeviceInfo.class \
-com/sun/media/sound/SimpleInputDeviceProvider.class
-
 # Class list temp files (used by both import and export of plugs)
 
 PLUG_TEMPDIR=$(ABS_TEMPDIR)/plugs
-PLUG_CLASS_AREAS = jmf sound
+PLUG_CLASS_AREAS = jmf
 PLUG_CLISTS = $(PLUG_CLASS_AREAS:%=$(PLUG_TEMPDIR)/%.clist)
 
 # Create jargs file command
@@ -147,18 +93,11 @@ $(PLUG_TEMPDIR)/jmf.clist:
 	@for i in $(PLUG_JMF_CLASS_NAMES) ; do \
 	  $(ECHO) "$$i" >> $@; \
 	done
-$(PLUG_TEMPDIR)/sound.clist:
-	@$(prep-target)
-	@for i in $(PLUG_SOUND_CLASS_NAMES) ; do \
-	  $(ECHO) "$$i" >> $@ ; \
-	done
 $(PLUG_TEMPDIR)/all.clist: $(PLUG_CLISTS)
 	@$(prep-target)
 	$(CAT) $(PLUG_CLISTS) > $@
 $(PLUG_TEMPDIR)/jmf.jargs: $(PLUG_TEMPDIR)/jmf.clist
 	$(plug-create-jargs)
-$(PLUG_TEMPDIR)/sound.jargs: $(PLUG_TEMPDIR)/sound.clist
-	$(plug-create-jargs)
 $(PLUG_TEMPDIR)/all.jargs: $(PLUG_TEMPDIR)/all.clist
 	$(plug-create-jargs)
 
@@ -193,25 +132,11 @@ endef # import-binary-plug-classes
 
 import-binary-plug-jmf-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/jmf.clist
 	$(call import-binary-plug-classes,$(PLUG_TEMPDIR)/jmf.clist)
-import-binary-plug-sound-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/sound.clist
-	$(call import-binary-plug-classes,$(PLUG_TEMPDIR)/sound.clist)
 
 # Import all classes from the jar file
 
 import-binary-plug-jar: \
-	     import-binary-plug-jmf-classes \
-	     import-binary-plug-sound-classes
-
-# Import native libraries
-
-$(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY): \
-    $(PLUG_IMPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/$(PLUG_JSOUND_LIBRARY)
-	$(import-binary-plug-file)
-
-# Rules only used by lower level makefiles
-
-import-binary-plug-jsound-library: \
-    $(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY)
+	     import-binary-plug-jmf-classes
 
 # Binary plug start/complete messages
 
@@ -241,9 +166,7 @@ import-binary-plugs: \
 	import-binary-plugs-libs \
 	import-binary-plugs \
 	import-binary-plug-jar \
-        import-binary-plug-jmf-classes \
-        import-binary-plug-sound-classes \
-        import-binary-plug-jsound-library
+	import-binary-plug-jmf-classes
 
 else # !OPENJDK
 
@@ -280,12 +203,6 @@ $(PLUG_EXPORT_JARFILE): $(PLUG_TEMPDIR)/all.clist $(PLUG_TEMPDIR)/all.jargs
 	@$(java-vm-cleanup)
 export-binary-plugs-jar: $(PLUG_EXPORT_JARFILE)
 
-# Export native libraries
-
-$(PLUG_EXPORT_DIR)/$(PLUG_LOCATION_SUBDIR)/$(PLUG_JSOUND_LIBRARY): \
-    $(LIB_LOCATION)/$(PLUG_JSOUND_LIBRARY)
-	$(export-binary-plug-file)
-
 # Export binary plug start/complete messages
 
 export-binary-plugs-started:
diff --git a/jdk/make/javax/sound/Makefile b/jdk/make/javax/sound/Makefile
index 9b5346003d1..c3e0524fd46 100644
--- a/jdk/make/javax/sound/Makefile
+++ b/jdk/make/javax/sound/Makefile
@@ -53,18 +53,6 @@ include FILES_c.gmk
 # add java files
 AUTO_FILES_JAVA_DIRS = javax/sound com/sun/media/sound
 
-#
-# Specific to OpenJDK building
-#
-ifdef OPENJDK
-
-# copy closed .class files
-build: import-binary-plug-sound-classes 
-
-include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
-
-endif # OPENJDK
-
 #
 # Files that just need cp.
 #
@@ -79,13 +67,11 @@ FILES_copy = \
 	$(SERVICEDIR)/javax.sound.sampled.spi.AudioFileReader \
 	$(SERVICEDIR)/javax.sound.sampled.spi.FormatConversionProvider \
 	$(SERVICEDIR)/javax.sound.sampled.spi.MixerProvider \
-	$(LIBDIR)/audio/soundbank.gm \
 	$(LIBDIR)/sound.properties
 
 FILES_mkdirs = \
 	$(CLASSBINDIR)/META-INF \
-	$(CLASSBINDIR)/META-INF/services \
-	$(LIBDIR)/audio
+	$(CLASSBINDIR)/META-INF/services
 
 FILES_copydirs = \
 	$(CLASSBINDIR) \
@@ -95,11 +81,6 @@ FILES_copydirs = \
 FILES_c += $(FILES_$(PLATFORM))
 
 
-#
-# add "closed" library
-#
-SUBDIRS += jsoundhs
-
 #
 # system dependent flags
 #
diff --git a/jdk/make/javax/sound/jsoundhs/FILES.gmk b/jdk/make/javax/sound/jsoundhs/FILES.gmk
deleted file mode 100644
index 6bc7a57da83..00000000000
--- a/jdk/make/javax/sound/jsoundhs/FILES.gmk
+++ /dev/null
@@ -1,91 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-FILES_c = \
-	Utilities.c \
-	MixerThread.c \
-	HeadspaceMixer.c \
-	MixerClip.c \
-	MixerSourceLine.c \
-	SimpleInputDevice.c \
-	SimpleInputDeviceProvider.c \
-	HeadspaceSoundbank.c \
-	MixerMidiChannel.c \
-	AbstractPlayer.c \
-	MixerSequencer.c \
-	MixerSynth.c
-
-FILES_engine = \
-	DriverTools.c \
-	GenAudioCaptureStreams.c \
-	GenAudioStreams.c \
-	GenOutput.c \
-	GenPatch.c \
-	GenReverb.c \
-	GenSample.c \
-	GenSeq.c \
-	GenSetup.c \
-	GenSong.c \
-	GenSynth.c \
-	GenSynthFilters.c \
-	GenSynthInterp2.c \
-	GenSynthResample.c \
-	NewNewLZSS.c \
-	SampleTools.c \
-	SMOD_Volume_Scaler.c \
-	X_API.c \
-	X_Decompress.c \
-	X_IMA.c \
-	GenFiltersReverb.c \
-	GenInterp2Reverb.c \
-	GenSoundFiles.c \
-	SincResample.c
-
-FILES_solaris = \
-	HAE_API_SolarisOS.c \
-	HAE_API_SolarisOS_Capture.c
-
-FILES_linux = \
-	HAE_API_LinuxOS.c \
-	HAE_API_LinuxOS_Capture.c
-
-FILES_windows = \
-	HAE_API_WinOS.c \
-	HAE_API_WinOS_Capture.c \
-	HAE_API_WinOS_Synth.c
-
-FILES_export = \
-	com/sun/media/sound/AbstractPlayer.java \
-	com/sun/media/sound/HeadspaceMixer.java \
-	com/sun/media/sound/HeadspaceSoundbank.java \
-	com/sun/media/sound/MixerClip.java \
-	com/sun/media/sound/MixerMidiChannel.java \
-	com/sun/media/sound/MixerSequencer.java \
-	com/sun/media/sound/MixerSourceLine.java \
-	com/sun/media/sound/MixerSynth.java \
-	com/sun/media/sound/MixerThread.java \
-	com/sun/media/sound/SimpleInputDevice.java \
-	com/sun/media/sound/SimpleInputDeviceProvider.java
-
diff --git a/jdk/make/javax/sound/jsoundhs/Makefile b/jdk/make/javax/sound/jsoundhs/Makefile
deleted file mode 100644
index 6a4952c6522..00000000000
--- a/jdk/make/javax/sound/jsoundhs/Makefile
+++ /dev/null
@@ -1,100 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-BUILDDIR = ../../..
-PACKAGE = javax.sound
-LIBRARY = jsoundhs
-PRODUCT = sun
-CPLUSPLUSLIBRARY = true
-include $(BUILDDIR)/common/Defs.gmk
-
-# this Makefile compiles "closed" JavaSound library
-
-ifdef OPENJDK
-
-# precompiled lib will be copied by the rules in Library.gmk instead of compiling.
-USE_BINARY_PLUG_LIBRARY=true
-
-build: import-binary-plug-jsound-library
-
-include $(BUILDDIR)/common/internal/BinaryPlugs.gmk
-
-else # OPENJDK
-
-# include defines for sound
-include ../SoundDefs.gmk
-
-#
-# Add use of mapfile
-#
-FILES_m = mapfile-vers
-include $(BUILDDIR)/common/Mapfile-vers.gmk
-
-#
-# Files
-#
-include FILES.gmk
-
-FILES_c += $(FILES_engine) $(FILES_$(PLATFORM))
-
-#
-# Extra cc/linker flags.
-#
-# flags needed for all platforms
-CPPFLAGS += \
-	-DJAVA_SOUND -DJAVA_THREAD \
-	-I$(CLOSED_SHARE_SRC)/native/com/sun/media/sound \
-	-I$(CLOSED_SHARE_SRC)/native/com/sun/media/sound/engine
-
-# system dependent flags
-ifeq ($(PLATFORM), windows)
-  CPPFLAGS += 	-DUSE_DIRECTSOUND=0 \
-		-DUSE_EXTERNAL_SYNTH=TRUE
-  LDLIBS += winmm.lib
-endif # PLATFORM windows
-
-ifeq ($(PLATFORM), linux)
-endif # PLATFORM linux
-
-ifeq ($(PLATFORM), solaris)
-endif # PLATFORM solaris
-
-
-#
-# Add to the ambient VPATH.
-#
-vpath %.c $(CLOSED_SHARE_SRC)/native/com/sun/media/sound
-vpath %.c $(CLOSED_SHARE_SRC)/native/com/sun/media/sound/engine
-vpath %.c $(CLOSED_PLATFORM_SRC)/native/com/sun/media/sound/engine
-
-
-endif # OPENJDK
-
-
-#
-# Include rules
-#
-include $(BUILDDIR)/common/Library.gmk
-
diff --git a/jdk/make/javax/sound/jsoundhs/mapfile-vers b/jdk/make/javax/sound/jsoundhs/mapfile-vers
deleted file mode 100644
index 7961825600c..00000000000
--- a/jdk/make/javax/sound/jsoundhs/mapfile-vers
+++ /dev/null
@@ -1,153 +0,0 @@
-#
-# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_AbstractPlayer_nAddReceiver;
-            Java_com_sun_media_sound_AbstractPlayer_nClose;
-            Java_com_sun_media_sound_AbstractPlayer_nLoadInstrument;
-            Java_com_sun_media_sound_AbstractPlayer_nRemapInstrument;
-            Java_com_sun_media_sound_AbstractPlayer_nRemoveReceiver;
-            Java_com_sun_media_sound_AbstractPlayer_nUnloadInstrument;
-            Java_com_sun_media_sound_HeadspaceMixer_nAllocateVoices;
-            Java_com_sun_media_sound_HeadspaceMixer_nCloseMixer;
-            Java_com_sun_media_sound_HeadspaceMixer_nCreateLinkedStreams;
-            Java_com_sun_media_sound_HeadspaceMixer_nDrain;
-            Java_com_sun_media_sound_HeadspaceMixer_nFlush;
-            Java_com_sun_media_sound_HeadspaceMixer_nGetCpuLoad;
-            Java_com_sun_media_sound_HeadspaceMixer_nGetDefaultBufferSize;
-            Java_com_sun_media_sound_HeadspaceMixer_nGetLevel;
-            Java_com_sun_media_sound_HeadspaceMixer_nGetPosition;
-            Java_com_sun_media_sound_HeadspaceMixer_nGetTotalVoices;
-            Java_com_sun_media_sound_HeadspaceMixer_nOpenMixer;
-            Java_com_sun_media_sound_HeadspaceMixer_nPause;
-            Java_com_sun_media_sound_HeadspaceMixer_nResume;
-            Java_com_sun_media_sound_HeadspaceMixer_nSetInterpolation;
-            Java_com_sun_media_sound_HeadspaceMixer_nSetMixerFormat;
-            Java_com_sun_media_sound_HeadspaceMixer_nSetMixLevel;
-            Java_com_sun_media_sound_HeadspaceMixer_nSetReverb;
-            Java_com_sun_media_sound_HeadspaceMixer_nStartLinkedStreams;
-            Java_com_sun_media_sound_HeadspaceMixer_nStopLinkedStreams;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nCloseResource;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nGetInstruments;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nGetName;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nGetSamples;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nGetVersionMajor;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nGetVersionMinor;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nGetVersionSubMinor;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nOpenResource;
-            Java_com_sun_media_sound_HeadspaceSoundbank_nOpenResourceFromByteArray;
-            Java_com_sun_media_sound_MixerClip_nClose;
-            Java_com_sun_media_sound_MixerClip_nDrain;
-            Java_com_sun_media_sound_MixerClip_nFlush;
-            Java_com_sun_media_sound_MixerClip_nGetPosition;
-            Java_com_sun_media_sound_MixerClip_nOpen;
-            Java_com_sun_media_sound_MixerClip_nSetLinearGain;
-            Java_com_sun_media_sound_MixerClip_nSetPan;
-            Java_com_sun_media_sound_MixerClip_nSetSampleRate;
-            Java_com_sun_media_sound_MixerClip_nSetup;
-            Java_com_sun_media_sound_MixerClip_nStart;
-            Java_com_sun_media_sound_MixerClip_nStop;
-            Java_com_sun_media_sound_MixerMidiChannel_nAllNotesOff;
-            Java_com_sun_media_sound_MixerMidiChannel_nControlChange;
-            Java_com_sun_media_sound_MixerMidiChannel_nGetController;
-            Java_com_sun_media_sound_MixerMidiChannel_nGetPitchBend;
-            Java_com_sun_media_sound_MixerMidiChannel_nGetSolo;
-            Java_com_sun_media_sound_MixerMidiChannel_nNoteOff;
-            Java_com_sun_media_sound_MixerMidiChannel_nNoteOn;
-            Java_com_sun_media_sound_MixerMidiChannel_nProgramChange__JIIIJ;
-            Java_com_sun_media_sound_MixerMidiChannel_nProgramChange__JIIJ;
-            Java_com_sun_media_sound_MixerMidiChannel_nResetAllControllers;
-            Java_com_sun_media_sound_MixerMidiChannel_nSetMute;
-            Java_com_sun_media_sound_MixerMidiChannel_nSetPitchBend;
-            Java_com_sun_media_sound_MixerMidiChannel_nSetSolo;
-            Java_com_sun_media_sound_MixerSequencer_nAddControllerEventCallback;
-            Java_com_sun_media_sound_MixerSequencer_nGetMasterTempo;
-            Java_com_sun_media_sound_MixerSequencer_nGetSequenceMicrosecondLength;
-            Java_com_sun_media_sound_MixerSequencer_nGetSequencerMicrosecondPosition;
-            Java_com_sun_media_sound_MixerSequencer_nGetSequencerTickPosition;
-            Java_com_sun_media_sound_MixerSequencer_nGetSequenceTickLength;
-            Java_com_sun_media_sound_MixerSequencer_nGetTempoInBPM;
-            Java_com_sun_media_sound_MixerSequencer_nGetTempoInMPQ;
-            Java_com_sun_media_sound_MixerSequencer_nGetTrackMute;
-            Java_com_sun_media_sound_MixerSequencer_nGetTrackSolo;
-            Java_com_sun_media_sound_MixerSequencer_nOpenMidiSequencer;
-            Java_com_sun_media_sound_MixerSequencer_nOpenRmfSequencer;
-            Java_com_sun_media_sound_MixerSequencer_nPauseSequencer;
-            Java_com_sun_media_sound_MixerSequencer_nResumeSequencer;
-            Java_com_sun_media_sound_MixerSequencer_nSetMasterTempo;
-            Java_com_sun_media_sound_MixerSequencer_nSetSequencerMicrosecondPosition;
-            Java_com_sun_media_sound_MixerSequencer_nSetSequencerTickPosition;
-            Java_com_sun_media_sound_MixerSequencer_nSetTempoInBPM;
-            Java_com_sun_media_sound_MixerSequencer_nSetTempoInMPQ;
-            Java_com_sun_media_sound_MixerSequencer_nSetTrackMute;
-            Java_com_sun_media_sound_MixerSequencer_nSetTrackSolo;
-            Java_com_sun_media_sound_MixerSequencer_nStartSequencer;
-            Java_com_sun_media_sound_MixerSourceLine_nClose;
-            Java_com_sun_media_sound_MixerSourceLine_nDrain;
-            Java_com_sun_media_sound_MixerSourceLine_nFlush;
-            Java_com_sun_media_sound_MixerSourceLine_nGetLevel;
-            Java_com_sun_media_sound_MixerSourceLine_nGetPosition;
-            Java_com_sun_media_sound_MixerSourceLine_nOpen;
-            Java_com_sun_media_sound_MixerSourceLine_nPause;
-            Java_com_sun_media_sound_MixerSourceLine_nResume;
-            Java_com_sun_media_sound_MixerSourceLine_nSetLinearGain;
-            Java_com_sun_media_sound_MixerSourceLine_nSetPan;
-            Java_com_sun_media_sound_MixerSourceLine_nSetSampleRate;
-            Java_com_sun_media_sound_MixerSourceLine_nStart;
-            Java_com_sun_media_sound_MixerSynth_nCreateSynthesizer;
-            Java_com_sun_media_sound_MixerSynth_nDestroySynthesizer;
-            Java_com_sun_media_sound_MixerSynth_nGetLatency;
-            Java_com_sun_media_sound_MixerSynth_nLoadInstrument;
-            Java_com_sun_media_sound_MixerSynth_nRemapInstrument;
-            Java_com_sun_media_sound_MixerSynth_nStartSynthesizer;
-            Java_com_sun_media_sound_MixerSynth_nUnloadInstrument;
-            Java_com_sun_media_sound_MixerThread_runNative;
-            Java_com_sun_media_sound_SimpleInputDevice_nClose;
-            Java_com_sun_media_sound_SimpleInputDevice_nDrain;
-            Java_com_sun_media_sound_SimpleInputDevice_nFlush;
-            Java_com_sun_media_sound_SimpleInputDevice_nGetBufferSizeInFrames;
-            Java_com_sun_media_sound_SimpleInputDevice_nGetFormats;
-            Java_com_sun_media_sound_SimpleInputDevice_nGetNumPorts;
-            Java_com_sun_media_sound_SimpleInputDevice_nGetPortName;
-            Java_com_sun_media_sound_SimpleInputDevice_nGetPosition;
-            Java_com_sun_media_sound_SimpleInputDevice_nOpen;
-            Java_com_sun_media_sound_SimpleInputDevice_nPause;
-            Java_com_sun_media_sound_SimpleInputDevice_nResume;
-            Java_com_sun_media_sound_SimpleInputDevice_nStart;
-            Java_com_sun_media_sound_SimpleInputDevice_nStop;
-            Java_com_sun_media_sound_SimpleInputDevice_nSupportsChannels;
-            Java_com_sun_media_sound_SimpleInputDevice_nSupportsSampleRate;
-            Java_com_sun_media_sound_SimpleInputDevice_nSupportsSampleSizeInBits;
-            Java_com_sun_media_sound_SimpleInputDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_SimpleInputDeviceProvider_nGetName;
-            Java_com_sun_media_sound_SimpleInputDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_SimpleInputDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_SimpleInputDeviceProvider_nGetVersion;
-	local:
-	    *;
-};
diff --git a/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java b/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java
index 5409ab0567b..70cb15e0a40 100644
--- a/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java
+++ b/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java
@@ -75,13 +75,6 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
     /**
      * This is the device handle returned from native code
      */
-    /*
-     * $$rratta Solaris 64 bit holds pointer must be long
-     *
-     * $$mp 2003-08-07:
-     * 'id' is a really bad name. The variable should
-     * be called nativePointer or something similar.
-     */
     protected long id                   = 0;
 
 
@@ -586,7 +579,6 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
 
         private ArrayList transmitters = new ArrayList();
         private MidiOutDevice.MidiOutReceiver midiOutReceiver;
-        private MixerSynth.SynthReceiver mixerSynthReceiver;
 
         // how many transmitters must be present for optimized
         // handling
@@ -621,22 +613,14 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
                 if (midiOutReceiver == oldR) {
                     midiOutReceiver = null;
                 }
-                if (mixerSynthReceiver == oldR) {
-                    mixerSynthReceiver = null;
-                }
                 if (newR != null) {
                     if ((newR instanceof MidiOutDevice.MidiOutReceiver)
                         && (midiOutReceiver == null)) {
                         midiOutReceiver = ((MidiOutDevice.MidiOutReceiver) newR);
                     }
-                    if ((newR instanceof MixerSynth.SynthReceiver)
-                        && (mixerSynthReceiver == null)) {
-                        mixerSynthReceiver = ((MixerSynth.SynthReceiver) newR);
-                    }
                 }
                 optimizedReceiverCount =
-                      ((midiOutReceiver!=null)?1:0)
-                    + ((mixerSynthReceiver!=null)?1:0);
+                      ((midiOutReceiver!=null)?1:0);
             }
             // more potential for optimization here
         }
@@ -670,10 +654,6 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
                             if (TRACE_TRANSMITTER) Printer.println("Sending packed message to MidiOutReceiver");
                             midiOutReceiver.sendPackedMidiMessage(packedMessage, timeStamp);
                         }
-                        if (mixerSynthReceiver != null) {
-                            if (TRACE_TRANSMITTER) Printer.println("Sending packed message to MixerSynthReceiver");
-                            mixerSynthReceiver.sendPackedMidiMessage(packedMessage, timeStamp);
-                        }
                     } else {
                         if (TRACE_TRANSMITTER) Printer.println("Sending packed message to "+size+" transmitter's receivers");
                         for (int i = 0; i < size; i++) {
@@ -682,9 +662,6 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
                                 if (optimizedReceiverCount > 0) {
                                     if (receiver instanceof MidiOutDevice.MidiOutReceiver) {
                                         ((MidiOutDevice.MidiOutReceiver) receiver).sendPackedMidiMessage(packedMessage, timeStamp);
-                                    }
-                                    else if (receiver instanceof MixerSynth.SynthReceiver) {
-                                        ((MixerSynth.SynthReceiver) receiver).sendPackedMidiMessage(packedMessage, timeStamp);
                                     } else {
                                         receiver.send(new FastShortMessage(packedMessage), timeStamp);
                                     }
@@ -739,10 +716,6 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice
                         if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to MidiOutReceiver");
                         midiOutReceiver.send(message, timeStamp);
                     }
-                    if (mixerSynthReceiver != null) {
-                        if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to MixerSynthReceiver");
-                        mixerSynthReceiver.send(message, timeStamp);
-                    }
                 } else {
                     if (TRACE_TRANSMITTER) Printer.println("Sending MIDI message to "+size+" transmitter's receivers");
                     for (int i = 0; i < size; i++) {
diff --git a/jdk/src/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java b/jdk/src/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java
new file mode 100644
index 00000000000..7f4090d8d3e
--- /dev/null
+++ b/jdk/src/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.media.sound;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.sound.midi.InvalidMidiDataException;
+import javax.sound.midi.Soundbank;
+import javax.sound.midi.spi.SoundbankReader;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.UnsupportedAudioFileException;
+
+/**
+ * Soundbank reader that uses audio files as soundbanks.
+ *
+ * @author Karl Helgason
+ */
+public class AudioFileSoundbankReader extends SoundbankReader {
+
+    public Soundbank getSoundbank(URL url)
+            throws InvalidMidiDataException, IOException {
+        try {
+            AudioInputStream ais = AudioSystem.getAudioInputStream(url);
+            Soundbank sbk = getSoundbank(ais);
+            ais.close();
+            return sbk;
+        } catch (UnsupportedAudioFileException e) {
+            return null;
+        } catch (IOException e) {
+            return null;
+        }
+    }
+
+    public Soundbank getSoundbank(InputStream stream)
+            throws InvalidMidiDataException, IOException {
+        stream.mark(512);
+        try {
+            AudioInputStream ais = AudioSystem.getAudioInputStream(stream);
+            Soundbank sbk = getSoundbank(ais);
+            if (sbk != null)
+                return sbk;
+        } catch (UnsupportedAudioFileException e) {
+        } catch (IOException e) {
+        }
+        stream.reset();
+        return null;
+    }
+
+    public Soundbank getSoundbank(AudioInputStream ais)
+            throws InvalidMidiDataException, IOException {
+        try {
+            byte[] buffer;
+            if (ais.getFrameLength() == -1) {
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                byte[] buff = new byte[1024
+                        - (1024 % ais.getFormat().getFrameSize())];
+                int ret;
+                while ((ret = ais.read(buff)) != -1) {
+                    baos.write(buff, 0, ret);
+                }
+                ais.close();
+                buffer = baos.toByteArray();
+            } else {
+                buffer = new byte[(int) (ais.getFrameLength()
+                                    * ais.getFormat().getFrameSize())];
+                new DataInputStream(ais).readFully(buffer);
+            }
+            ModelByteBufferWavetable osc = new ModelByteBufferWavetable(
+                    new ModelByteBuffer(buffer), ais.getFormat(), -4800);
+            ModelPerformer performer = new ModelPerformer();
+            performer.getOscillators().add(osc);
+
+            SimpleSoundbank sbk = new SimpleSoundbank();
+            SimpleInstrument ins = new SimpleInstrument();
+            ins.add(performer);
+            sbk.addInstrument(ins);
+            return sbk;
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+    public Soundbank getSoundbank(File file)
+            throws InvalidMidiDataException, IOException {
+        try {
+            AudioInputStream ais = AudioSystem.getAudioInputStream(file);
+            ais.close();
+            ModelByteBufferWavetable osc = new ModelByteBufferWavetable(
+                    new ModelByteBuffer(file, 0, file.length()), -4800);
+            ModelPerformer performer = new ModelPerformer();
+            performer.getOscillators().add(osc);
+            SimpleSoundbank sbk = new SimpleSoundbank();
+            SimpleInstrument ins = new SimpleInstrument();
+            ins.add(performer);
+            sbk.addInstrument(ins);
+            return sbk;
+        } catch (UnsupportedAudioFileException e1) {
+            return null;
+        } catch (IOException e) {
+            return null;
+        }
+    }
+}
diff --git a/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java b/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java
new file mode 100644
index 00000000000..e8d9dbeb14d
--- /dev/null
+++ b/jdk/src/share/classes/com/sun/media/sound/AudioFloatConverter.java
@@ -0,0 +1,1058 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.media.sound;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.DoubleBuffer;
+import java.nio.FloatBuffer;
+
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioFormat.Encoding;
+
+/**
+ * This class is used to convert between 8,16,24,32,32+ bit signed/unsigned
+ * big/litle endian fixed/floating point byte buffers and float buffers.
+ *
+ * @author Karl Helgason
+ */
+public abstract class AudioFloatConverter {
+
+    public static final Encoding PCM_FLOAT = new Encoding("PCM_FLOAT");
+
+    /***************************************************************************
+     *
+     * LSB Filter, used filter least significant byte in samples arrays.
+     *
+     * Is used filter out data in lsb byte when SampleSizeInBits is not
+     * dividable by 8.
+     *
+     **************************************************************************/
+
+    private static class AudioFloatLSBFilter extends AudioFloatConverter {
+
+        private AudioFloatConverter converter;
+
+        final private int offset;
+
+        final private int stepsize;
+
+        final private byte mask;
+
+        private byte[] mask_buffer;
+
+        public AudioFloatLSBFilter(AudioFloatConverter converter,
+                AudioFormat format) {
+            int bits = format.getSampleSizeInBits();
+            boolean bigEndian = format.isBigEndian();
+            this.converter = converter;
+            stepsize = (bits + 7) / 8;
+            offset = bigEndian ? (stepsize - 1) : 0;
+            int lsb_bits = bits % 8;
+            if (lsb_bits == 0)
+                mask = (byte) 0x00;
+            else if (lsb_bits == 1)
+                mask = (byte) 0x80;
+            else if (lsb_bits == 2)
+                mask = (byte) 0xC0;
+            else if (lsb_bits == 3)
+                mask = (byte) 0xE0;
+            else if (lsb_bits == 4)
+                mask = (byte) 0xF0;
+            else if (lsb_bits == 5)
+                mask = (byte) 0xF8;
+            else if (lsb_bits == 6)
+                mask = (byte) 0xFC;
+            else if (lsb_bits == 7)
+                mask = (byte) 0xFE;
+            else
+                mask = (byte) 0xFF;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            byte[] ret = converter.toByteArray(in_buff, in_offset, in_len,
+                    out_buff, out_offset);
+
+            int out_offset_end = in_len * stepsize;
+            for (int i = out_offset + offset; i < out_offset_end; i += stepsize) {
+                out_buff[i] = (byte) (out_buff[i] & mask);
+            }
+
+            return ret;
+        }
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            if (mask_buffer == null || mask_buffer.length < in_buff.length)
+                mask_buffer = new byte[in_buff.length];
+            System.arraycopy(in_buff, 0, mask_buffer, 0, in_buff.length);
+            int in_offset_end = out_len * stepsize;
+            for (int i = in_offset + offset; i < in_offset_end; i += stepsize) {
+                mask_buffer[i] = (byte) (mask_buffer[i] & mask);
+            }
+            float[] ret = converter.toFloatArray(mask_buffer, in_offset,
+                    out_buff, out_offset, out_len);
+            return ret;
+        }
+
+    }
+
+    /***************************************************************************
+     *
+     * 64 bit float, little/big-endian
+     *
+     **************************************************************************/
+
+    // PCM 64 bit float, little-endian
+    private static class AudioFloatConversion64L extends AudioFloatConverter {
+        ByteBuffer bytebuffer = null;
+
+        DoubleBuffer floatbuffer = null;
+
+        double[] double_buff = null;
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int in_len = out_len * 8;
+            if (bytebuffer == null || bytebuffer.capacity() < in_len) {
+                bytebuffer = ByteBuffer.allocate(in_len).order(
+                        ByteOrder.LITTLE_ENDIAN);
+                floatbuffer = bytebuffer.asDoubleBuffer();
+            }
+            bytebuffer.position(0);
+            floatbuffer.position(0);
+            bytebuffer.put(in_buff, in_offset, in_len);
+            if (double_buff == null
+                    || double_buff.length < out_len + out_offset)
+                double_buff = new double[out_len + out_offset];
+            floatbuffer.get(double_buff, out_offset, out_len);
+            int out_offset_end = out_offset + out_len;
+            for (int i = out_offset; i < out_offset_end; i++) {
+                out_buff[i] = (float) double_buff[i];
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int out_len = in_len * 8;
+            if (bytebuffer == null || bytebuffer.capacity() < out_len) {
+                bytebuffer = ByteBuffer.allocate(out_len).order(
+                        ByteOrder.LITTLE_ENDIAN);
+                floatbuffer = bytebuffer.asDoubleBuffer();
+            }
+            floatbuffer.position(0);
+            bytebuffer.position(0);
+            if (double_buff == null || double_buff.length < in_offset + in_len)
+                double_buff = new double[in_offset + in_len];
+            int in_offset_end = in_offset + in_len;
+            for (int i = in_offset; i < in_offset_end; i++) {
+                double_buff[i] = in_buff[i];
+            }
+            floatbuffer.put(double_buff, in_offset, in_len);
+            bytebuffer.get(out_buff, out_offset, out_len);
+            return out_buff;
+        }
+    }
+
+    // PCM 64 bit float, big-endian
+    private static class AudioFloatConversion64B extends AudioFloatConverter {
+        ByteBuffer bytebuffer = null;
+
+        DoubleBuffer floatbuffer = null;
+
+        double[] double_buff = null;
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int in_len = out_len * 8;
+            if (bytebuffer == null || bytebuffer.capacity() < in_len) {
+                bytebuffer = ByteBuffer.allocate(in_len).order(
+                        ByteOrder.BIG_ENDIAN);
+                floatbuffer = bytebuffer.asDoubleBuffer();
+            }
+            bytebuffer.position(0);
+            floatbuffer.position(0);
+            bytebuffer.put(in_buff, in_offset, in_len);
+            if (double_buff == null
+                    || double_buff.length < out_len + out_offset)
+                double_buff = new double[out_len + out_offset];
+            floatbuffer.get(double_buff, out_offset, out_len);
+            int out_offset_end = out_offset + out_len;
+            for (int i = out_offset; i < out_offset_end; i++) {
+                out_buff[i] = (float) double_buff[i];
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int out_len = in_len * 8;
+            if (bytebuffer == null || bytebuffer.capacity() < out_len) {
+                bytebuffer = ByteBuffer.allocate(out_len).order(
+                        ByteOrder.BIG_ENDIAN);
+                floatbuffer = bytebuffer.asDoubleBuffer();
+            }
+            floatbuffer.position(0);
+            bytebuffer.position(0);
+            if (double_buff == null || double_buff.length < in_offset + in_len)
+                double_buff = new double[in_offset + in_len];
+            int in_offset_end = in_offset + in_len;
+            for (int i = in_offset; i < in_offset_end; i++) {
+                double_buff[i] = in_buff[i];
+            }
+            floatbuffer.put(double_buff, in_offset, in_len);
+            bytebuffer.get(out_buff, out_offset, out_len);
+            return out_buff;
+        }
+    }
+
+    /***************************************************************************
+     *
+     * 32 bit float, little/big-endian
+     *
+     **************************************************************************/
+
+    // PCM 32 bit float, little-endian
+    private static class AudioFloatConversion32L extends AudioFloatConverter {
+        ByteBuffer bytebuffer = null;
+
+        FloatBuffer floatbuffer = null;
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int in_len = out_len * 4;
+            if (bytebuffer == null || bytebuffer.capacity() < in_len) {
+                bytebuffer = ByteBuffer.allocate(in_len).order(
+                        ByteOrder.LITTLE_ENDIAN);
+                floatbuffer = bytebuffer.asFloatBuffer();
+            }
+            bytebuffer.position(0);
+            floatbuffer.position(0);
+            bytebuffer.put(in_buff, in_offset, in_len);
+            floatbuffer.get(out_buff, out_offset, out_len);
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int out_len = in_len * 4;
+            if (bytebuffer == null || bytebuffer.capacity() < out_len) {
+                bytebuffer = ByteBuffer.allocate(out_len).order(
+                        ByteOrder.LITTLE_ENDIAN);
+                floatbuffer = bytebuffer.asFloatBuffer();
+            }
+            floatbuffer.position(0);
+            bytebuffer.position(0);
+            floatbuffer.put(in_buff, in_offset, in_len);
+            bytebuffer.get(out_buff, out_offset, out_len);
+            return out_buff;
+        }
+    }
+
+    // PCM 32 bit float, big-endian
+    private static class AudioFloatConversion32B extends AudioFloatConverter {
+        ByteBuffer bytebuffer = null;
+
+        FloatBuffer floatbuffer = null;
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int in_len = out_len * 4;
+            if (bytebuffer == null || bytebuffer.capacity() < in_len) {
+                bytebuffer = ByteBuffer.allocate(in_len).order(
+                        ByteOrder.BIG_ENDIAN);
+                floatbuffer = bytebuffer.asFloatBuffer();
+            }
+            bytebuffer.position(0);
+            floatbuffer.position(0);
+            bytebuffer.put(in_buff, in_offset, in_len);
+            floatbuffer.get(out_buff, out_offset, out_len);
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int out_len = in_len * 4;
+            if (bytebuffer == null || bytebuffer.capacity() < out_len) {
+                bytebuffer = ByteBuffer.allocate(out_len).order(
+                        ByteOrder.BIG_ENDIAN);
+                floatbuffer = bytebuffer.asFloatBuffer();
+            }
+            floatbuffer.position(0);
+            bytebuffer.position(0);
+            floatbuffer.put(in_buff, in_offset, in_len);
+            bytebuffer.get(out_buff, out_offset, out_len);
+            return out_buff;
+        }
+    }
+
+    /***************************************************************************
+     *
+     * 8 bit signed/unsigned
+     *
+     **************************************************************************/
+
+    // PCM 8 bit, signed
+    private static class AudioFloatConversion8S extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++)
+                out_buff[ox++] = in_buff[ix++] * (1.0f / 127.0f);
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++)
+                out_buff[ox++] = (byte) (in_buff[ix++] * 127.0f);
+            return out_buff;
+        }
+    }
+
+    // PCM 8 bit, unsigned
+    private static class AudioFloatConversion8U extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++)
+                out_buff[ox++] = ((in_buff[ix++] & 0xFF) - 127)
+                        * (1.0f / 127.0f);
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++)
+                out_buff[ox++] = (byte) (127 + in_buff[ix++] * 127.0f);
+            return out_buff;
+        }
+    }
+
+    /***************************************************************************
+     *
+     * 16 bit signed/unsigned, little/big-endian
+     *
+     **************************************************************************/
+
+    // PCM 16 bit, signed, little-endian
+    private static class AudioFloatConversion16SL extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int len = out_offset + out_len;
+            for (int ox = out_offset; ox < len; ox++) {
+                out_buff[ox] = ((short) ((in_buff[ix++] & 0xFF) |
+                           (in_buff[ix++] << 8))) * (1.0f / 32767.0f);
+            }
+
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ox = out_offset;
+            int len = in_offset + in_len;
+            for (int ix = in_offset; ix < len; ix++) {
+                int x = (int) (in_buff[ix] * 32767.0);
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 16 bit, signed, big-endian
+    private static class AudioFloatConversion16SB extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                out_buff[ox++] = ((short) ((in_buff[ix++] << 8) |
+                        (in_buff[ix++] & 0xFF))) * (1.0f / 32767.0f);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * 32767.0);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 16 bit, unsigned, little-endian
+    private static class AudioFloatConversion16UL extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8);
+                out_buff[ox++] = (x - 32767) * (1.0f / 32767.0f);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = 32767 + (int) (in_buff[ix++] * 32767.0);
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 16 bit, unsigned, big-endian
+    private static class AudioFloatConversion16UB extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 8) | (in_buff[ix++] & 0xFF);
+                out_buff[ox++] = (x - 32767) * (1.0f / 32767.0f);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = 32767 + (int) (in_buff[ix++] * 32767.0);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+            }
+            return out_buff;
+        }
+    }
+
+    /***************************************************************************
+     *
+     * 24 bit signed/unsigned, little/big-endian
+     *
+     **************************************************************************/
+
+    // PCM 24 bit, signed, little-endian
+    private static class AudioFloatConversion24SL extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8)
+                        | ((in_buff[ix++] & 0xFF) << 16);
+                if (x > 0x7FFFFF)
+                    x -= 0x1000000;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFF);
+                if (x < 0)
+                    x += 0x1000000;
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) (x >>> 16);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 24 bit, signed, big-endian
+    private static class AudioFloatConversion24SB extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 16)
+                        | ((in_buff[ix++] & 0xFF) << 8) | (in_buff[ix++] & 0xFF);
+                if (x > 0x7FFFFF)
+                    x -= 0x1000000;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFF);
+                if (x < 0)
+                    x += 0x1000000;
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 24 bit, unsigned, little-endian
+    private static class AudioFloatConversion24UL extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8)
+                        | ((in_buff[ix++] & 0xFF) << 16);
+                x -= 0x7FFFFF;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFF);
+                x += 0x7FFFFF;
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) (x >>> 16);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 24 bit, unsigned, big-endian
+    private static class AudioFloatConversion24UB extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 16)
+                        | ((in_buff[ix++] & 0xFF) << 8) | (in_buff[ix++] & 0xFF);
+                x -= 0x7FFFFF;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFF);
+                x += 0x7FFFFF;
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+            }
+            return out_buff;
+        }
+    }
+
+    /***************************************************************************
+     *
+     * 32 bit signed/unsigned, little/big-endian
+     *
+     **************************************************************************/
+
+    // PCM 32 bit, signed, little-endian
+    private static class AudioFloatConversion32SL extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8) |
+                        ((in_buff[ix++] & 0xFF) << 16) |
+                        ((in_buff[ix++] & 0xFF) << 24);
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 24);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 32 bit, signed, big-endian
+    private static class AudioFloatConversion32SB extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 24) |
+                        ((in_buff[ix++] & 0xFF) << 16) |
+                        ((in_buff[ix++] & 0xFF) << 8) | (in_buff[ix++] & 0xFF);
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                out_buff[ox++] = (byte) (x >>> 24);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 32 bit, unsigned, little-endian
+    private static class AudioFloatConversion32UL extends AudioFloatConverter {
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8) |
+                        ((in_buff[ix++] & 0xFF) << 16) |
+                        ((in_buff[ix++] & 0xFF) << 24);
+                x -= 0x7FFFFFFF;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                x += 0x7FFFFFFF;
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 24);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 32 bit, unsigned, big-endian
+    private static class AudioFloatConversion32UB extends AudioFloatConverter {
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 24) |
+                        ((in_buff[ix++] & 0xFF) << 16) |
+                        ((in_buff[ix++] & 0xFF) << 8) | (in_buff[ix++] & 0xFF);
+                x -= 0x7FFFFFFF;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                x += 0x7FFFFFFF;
+                out_buff[ox++] = (byte) (x >>> 24);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+            }
+            return out_buff;
+        }
+    }
+
+    /***************************************************************************
+     *
+     * 32+ bit signed/unsigned, little/big-endian
+     *
+     **************************************************************************/
+
+    // PCM 32+ bit, signed, little-endian
+    private static class AudioFloatConversion32xSL extends AudioFloatConverter {
+
+        final int xbytes;
+
+        public AudioFloatConversion32xSL(int xbytes) {
+            this.xbytes = xbytes;
+        }
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                ix += xbytes;
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8)
+                        | ((in_buff[ix++] & 0xFF) << 16)
+                        | ((in_buff[ix++] & 0xFF) << 24);
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                for (int j = 0; j < xbytes; j++) {
+                    out_buff[ox++] = 0;
+                }
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 24);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 32+ bit, signed, big-endian
+    private static class AudioFloatConversion32xSB extends AudioFloatConverter {
+
+        final int xbytes;
+
+        public AudioFloatConversion32xSB(int xbytes) {
+            this.xbytes = xbytes;
+        }
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 24)
+                        | ((in_buff[ix++] & 0xFF) << 16)
+                        | ((in_buff[ix++] & 0xFF) << 8)
+                        | (in_buff[ix++] & 0xFF);
+                ix += xbytes;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                out_buff[ox++] = (byte) (x >>> 24);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+                for (int j = 0; j < xbytes; j++) {
+                    out_buff[ox++] = 0;
+                }
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 32+ bit, unsigned, little-endian
+    private static class AudioFloatConversion32xUL extends AudioFloatConverter {
+
+        final int xbytes;
+
+        public AudioFloatConversion32xUL(int xbytes) {
+            this.xbytes = xbytes;
+        }
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                ix += xbytes;
+                int x = (in_buff[ix++] & 0xFF) | ((in_buff[ix++] & 0xFF) << 8)
+                        | ((in_buff[ix++] & 0xFF) << 16)
+                        | ((in_buff[ix++] & 0xFF) << 24);
+                x -= 0x7FFFFFFF;
+                out_buff[ox++] = x * (1.0f / (float)0x7FFFFFFF);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * (float)0x7FFFFFFF);
+                x += 0x7FFFFFFF;
+                for (int j = 0; j < xbytes; j++) {
+                    out_buff[ox++] = 0;
+                }
+                out_buff[ox++] = (byte) x;
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 24);
+            }
+            return out_buff;
+        }
+    }
+
+    // PCM 32+ bit, unsigned, big-endian
+    private static class AudioFloatConversion32xUB extends AudioFloatConverter {
+
+        final int xbytes;
+
+        public AudioFloatConversion32xUB(int xbytes) {
+            this.xbytes = xbytes;
+        }
+
+        public float[] toFloatArray(byte[] in_buff, int in_offset,
+                float[] out_buff, int out_offset, int out_len) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < out_len; i++) {
+                int x = ((in_buff[ix++] & 0xFF) << 24) |
+                        ((in_buff[ix++] & 0xFF) << 16) |
+                        ((in_buff[ix++] & 0xFF) << 8) | (in_buff[ix++] & 0xFF);
+                ix += xbytes;
+                x -= 2147483647;
+                out_buff[ox++] = x * (1.0f / 2147483647.0f);
+            }
+            return out_buff;
+        }
+
+        public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+                byte[] out_buff, int out_offset) {
+            int ix = in_offset;
+            int ox = out_offset;
+            for (int i = 0; i < in_len; i++) {
+                int x = (int) (in_buff[ix++] * 2147483647.0);
+                x += 2147483647;
+                out_buff[ox++] = (byte) (x >>> 24);
+                out_buff[ox++] = (byte) (x >>> 16);
+                out_buff[ox++] = (byte) (x >>> 8);
+                out_buff[ox++] = (byte) x;
+                for (int j = 0; j < xbytes; j++) {
+                    out_buff[ox++] = 0;
+                }
+            }
+            return out_buff;
+        }
+    }
+
+    public static AudioFloatConverter getConverter(AudioFormat format) {
+        AudioFloatConverter conv = null;
+        if (format.getFrameSize() == 0)
+            return null;
+        if (format.getFrameSize() !=
+                ((format.getSampleSizeInBits() + 7) / 8) * format.getChannels()) {
+            return null;
+        }
+        if (format.getEncoding().equals(Encoding.PCM_SIGNED)) {
+            if (format.isBigEndian()) {
+                if (format.getSampleSizeInBits() <= 8) {
+                    conv = new AudioFloatConversion8S();
+                } else if (format.getSampleSizeInBits() > 8 &&
+                      format.getSampleSizeInBits() <= 16) {
+                    conv = new AudioFloatConversion16SB();
+                } else if (format.getSampleSizeInBits() > 16 &&
+                      format.getSampleSizeInBits() <= 24) {
+                    conv = new AudioFloatConversion24SB();
+                } else if (format.getSampleSizeInBits() > 24 &&
+                      format.getSampleSizeInBits() <= 32) {
+                    conv = new AudioFloatConversion32SB();
+                } else if (format.getSampleSizeInBits() > 32) {
+                    conv = new AudioFloatConversion32xSB(((format
+                            .getSampleSizeInBits() + 7) / 8) - 4);
+                }
+            } else {
+                if (format.getSampleSizeInBits() <= 8) {
+                    conv = new AudioFloatConversion8S();
+                } else if (format.getSampleSizeInBits() > 8 &&
+                         format.getSampleSizeInBits() <= 16) {
+                    conv = new AudioFloatConversion16SL();
+                } else if (format.getSampleSizeInBits() > 16 &&
+                         format.getSampleSizeInBits() <= 24) {
+                    conv = new AudioFloatConversion24SL();
+                } else if (format.getSampleSizeInBits() > 24 &&
+                         format.getSampleSizeInBits() <= 32) {
+                    conv = new AudioFloatConversion32SL();
+                } else if (format.getSampleSizeInBits() > 32) {
+                    conv = new AudioFloatConversion32xSL(((format
+                            .getSampleSizeInBits() + 7) / 8) - 4);
+                }
+            }
+        } else if (format.getEncoding().equals(Encoding.PCM_UNSIGNED)) {
+            if (format.isBigEndian()) {
+                if (format.getSampleSizeInBits() <= 8) {
+                    conv = new AudioFloatConversion8U();
+                } else if (format.getSampleSizeInBits() > 8 &&
+                        format.getSampleSizeInBits() <= 16) {
+                    conv = new AudioFloatConversion16UB();
+                } else if (format.getSampleSizeInBits() > 16 &&
+                        format.getSampleSizeInBits() <= 24) {
+                    conv = new AudioFloatConversion24UB();
+                } else if (format.getSampleSizeInBits() > 24 &&
+                        format.getSampleSizeInBits() <= 32) {
+                    conv = new AudioFloatConversion32UB();
+                } else if (format.getSampleSizeInBits() > 32) {
+                    conv = new AudioFloatConversion32xUB(((
+                            format.getSampleSizeInBits() + 7) / 8) - 4);
+                }
+            } else {
+                if (format.getSampleSizeInBits() <= 8) {
+                    conv = new AudioFloatConversion8U();
+                } else if (format.getSampleSizeInBits() > 8 &&
+                        format.getSampleSizeInBits() <= 16) {
+                    conv = new AudioFloatConversion16UL();
+                } else if (format.getSampleSizeInBits() > 16 &&
+                        format.getSampleSizeInBits() <= 24) {
+                    conv = new AudioFloatConversion24UL();
+                } else if (format.getSampleSizeInBits() > 24 &&
+                        format.getSampleSizeInBits() <= 32) {
+                    conv = new AudioFloatConversion32UL();
+                } else if (format.getSampleSizeInBits() > 32) {
+                    conv = new AudioFloatConversion32xUL(((
+                            format.getSampleSizeInBits() + 7) / 8) - 4);
+                }
+            }
+        } else if (format.getEncoding().equals(PCM_FLOAT)) {
+            if (format.getSampleSizeInBits() == 32) {
+                if (format.isBigEndian())
+                    conv = new AudioFloatConversion32B();
+                else
+                    conv = new AudioFloatConversion32L();
+            } else if (format.getSampleSizeInBits() == 64) {
+                if (format.isBigEndian())
+                    conv = new AudioFloatConversion64B();
+                else
+                    conv = new AudioFloatConversion64L();
+            }
+
+        }
+
+        if ((format.getEncoding().equals(Encoding.PCM_SIGNED) ||
+                format.getEncoding().equals(Encoding.PCM_UNSIGNED)) &&
+                (format.getSampleSizeInBits() % 8 != 0)) {
+            conv = new AudioFloatLSBFilter(conv, format);
+        }
+
+        if (conv != null)
+            conv.format = format;
+        return conv;
+    }
+
+    private AudioFormat format;
+
+    public AudioFormat getFormat() {
+        return format;
+    }
+
+    public abstract float[] toFloatArray(byte[] in_buff, int in_offset,
+            float[] out_buff, int out_offset, int out_len);
+
+    public float[] toFloatArray(byte[] in_buff, float[] out_buff,
+            int out_offset, int out_len) {
+        return toFloatArray(in_buff, 0, out_buff, out_offset, out_len);
+    }
+
+    public float[] toFloatArray(byte[] in_buff, int in_offset,
+            float[] out_buff, int out_len) {
+        return toFloatArray(in_buff, in_offset, out_buff, 0, out_len);
+    }
+
+    public float[] toFloatArray(byte[] in_buff, float[] out_buff, int out_len) {
+        return toFloatArray(in_buff, 0, out_buff, 0, out_len);
+    }
+
+    public float[] toFloatArray(byte[] in_buff, float[] out_buff) {
+        return toFloatArray(in_buff, 0, out_buff, 0, out_buff.length);
+    }
+
+    public abstract byte[] toByteArray(float[] in_buff, int in_offset,
+            int in_len, byte[] out_buff, int out_offset);
+
+    public byte[] toByteArray(float[] in_buff, int in_len, byte[] out_buff,
+            int out_offset) {
+        return toByteArray(in_buff, 0, in_len, out_buff, out_offset);
+    }
+
+    public byte[] toByteArray(float[] in_buff, int in_offset, int in_len,
+            byte[] out_buff) {
+        return toByteArray(in_buff, in_offset, in_len, out_buff, 0);
+    }
+
+    public byte[] toByteArray(float[] in_buff, int in_len, byte[] out_buff) {
+        return toByteArray(in_buff, 0, in_len, out_buff, 0);
+    }
+
+    public byte[] toByteArray(float[] in_buff, byte[] out_buff) {
+        return toByteArray(in_buff, 0, in_buff.length, out_buff, 0);
+    }
+}
diff --git a/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java b/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java
new file mode 100644
index 00000000000..4e835f4c192
--- /dev/null
+++ b/jdk/src/share/classes/com/sun/media/sound/AudioFloatFormatConverter.java
@@ -0,0 +1,617 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.media.sound;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.AudioFormat.Encoding;
+import javax.sound.sampled.spi.FormatConversionProvider;
+
+/**
+ * This class is used to convert between 8,16,24,32 bit signed/unsigned
+ * big/litle endian fixed/floating stereo/mono/multi-channel audio streams and
+ * perform sample-rate conversion if needed.
+ *
+ * @author Karl Helgason
+ */
+public class AudioFloatFormatConverter extends FormatConversionProvider {
+
+    private static class AudioFloatFormatConverterInputStream extends
+            InputStream {
+        private AudioFloatConverter converter;
+
+        private AudioFloatInputStream stream;
+
+        private float[] readfloatbuffer;
+
+        private int fsize = 0;
+
+        public AudioFloatFormatConverterInputStream(AudioFormat targetFormat,
+                AudioFloatInputStream stream) {
+            this.stream = stream;
+            converter = AudioFloatConverter.getConverter(targetFormat);
+            fsize = ((targetFormat.getSampleSizeInBits() + 7) / 8);
+        }
+
+        public int read() throws IOException {
+            byte[] b = new byte[1];
+            int ret = read(b);
+            if (ret < 0)
+                return ret;
+            return b[0] & 0xFF;
+        }
+
+        public int read(byte[] b, int off, int len) throws IOException {
+
+            int flen = len / fsize;
+            if (readfloatbuffer == null || readfloatbuffer.length < flen)
+                readfloatbuffer = new float[flen];
+            int ret = stream.read(readfloatbuffer, 0, flen);
+            if (ret < 0)
+                return ret;
+            converter.toByteArray(readfloatbuffer, 0, ret, b, off);
+            return ret * fsize;
+        }
+
+        public int available() throws IOException {
+            int ret = stream.available();
+            if (ret < 0)
+                return ret;
+            return ret * fsize;
+        }
+
+        public void close() throws IOException {
+            stream.close();
+        }
+
+        public synchronized void mark(int readlimit) {
+            stream.mark(readlimit * fsize);
+        }
+
+        public boolean markSupported() {
+            return stream.markSupported();
+        }
+
+        public synchronized void reset() throws IOException {
+            stream.reset();
+        }
+
+        public long skip(long n) throws IOException {
+            long ret = stream.skip(n / fsize);
+            if (ret < 0)
+                return ret;
+            return ret * fsize;
+        }
+
+    }
+
+    private static class AudioFloatInputStreamChannelMixer extends
+            AudioFloatInputStream {
+
+        private int targetChannels;
+
+        private int sourceChannels;
+
+        private AudioFloatInputStream ais;
+
+        private AudioFormat targetFormat;
+
+        private float[] conversion_buffer;
+
+        public AudioFloatInputStreamChannelMixer(AudioFloatInputStream ais,
+                int targetChannels) {
+            this.sourceChannels = ais.getFormat().getChannels();
+            this.targetChannels = targetChannels;
+            this.ais = ais;
+            AudioFormat format = ais.getFormat();
+            targetFormat = new AudioFormat(format.getEncoding(), format
+                    .getSampleRate(), format.getSampleSizeInBits(),
+                    targetChannels, (format.getFrameSize() / sourceChannels)
+                            * targetChannels, format.getFrameRate(), format
+                            .isBigEndian());
+        }
+
+        public int available() throws IOException {
+            return (ais.available() / sourceChannels) * targetChannels;
+        }
+
+        public void close() throws IOException {
+            ais.close();
+        }
+
+        public AudioFormat getFormat() {
+            return targetFormat;
+        }
+
+        public long getFrameLength() {
+            return ais.getFrameLength();
+        }
+
+        public void mark(int readlimit) {
+            ais.mark((readlimit / targetChannels) * sourceChannels);
+        }
+
+        public boolean markSupported() {
+            return ais.markSupported();
+        }
+
+        public int read(float[] b, int off, int len) throws IOException {
+            int len2 = (len / targetChannels) * sourceChannels;
+            if (conversion_buffer == null || conversion_buffer.length < len2)
+                conversion_buffer = new float[len2];
+            int ret = ais.read(conversion_buffer, 0, len2);
+            if (ret < 0)
+                return ret;
+            if (sourceChannels == 1) {
+                int cs = targetChannels;
+                for (int c = 0; c < targetChannels; c++) {
+                    for (int i = 0, ix = off + c; i < len2; i++, ix += cs) {
+                        b[ix] = conversion_buffer[i];
+                        ;
+                    }
+                }
+            } else if (targetChannels == 1) {
+                int cs = sourceChannels;
+                for (int i = 0, ix = off; i < len2; i += cs, ix++) {
+                    b[ix] = conversion_buffer[i];
+                }
+                for (int c = 1; c < sourceChannels; c++) {
+                    for (int i = c, ix = off; i < len2; i += cs, ix++) {
+                        b[ix] += conversion_buffer[i];
+                        ;
+                    }
+                }
+                float vol = 1f / ((float) sourceChannels);
+                for (int i = 0, ix = off; i < len2; i += cs, ix++) {
+                    b[ix] *= vol;
+                }
+            } else {
+                int minChannels = Math.min(sourceChannels, targetChannels);
+                int off_len = off + len;
+                int ct = targetChannels;
+                int cs = sourceChannels;
+                for (int c = 0; c < minChannels; c++) {
+                    for (int i = off + c, ix = c; i < off_len; i += ct, ix += cs) {
+                        b[i] = conversion_buffer[ix];
+                    }
+                }
+                for (int c = minChannels; c < targetChannels; c++) {
+                    for (int i = off + c; i < off_len; i += ct) {
+                        b[i] = 0;
+                    }
+                }
+            }
+            return (ret / sourceChannels) * targetChannels;
+        }
+
+        public void reset() throws IOException {
+            ais.reset();
+        }
+
+        public long skip(long len) throws IOException {
+            long ret = ais.skip((len / targetChannels) * sourceChannels);
+            if (ret < 0)
+                return ret;
+            return (ret / sourceChannels) * targetChannels;
+        }
+
+    }
+
+    private static class AudioFloatInputStreamResampler extends
+            AudioFloatInputStream {
+
+        private AudioFloatInputStream ais;
+
+        private AudioFormat targetFormat;
+
+        private float[] skipbuffer;
+
+        private SoftAbstractResampler resampler;
+
+        private float[] pitch = new float[1];
+
+        private float[] ibuffer2;
+
+        private float[][] ibuffer;
+
+        private float ibuffer_index = 0;
+
+        private int ibuffer_len = 0;
+
+        private int nrofchannels = 0;
+
+        private float[][] cbuffer;
+
+        private int buffer_len = 512;
+
+        private int pad;
+
+        private int pad2;
+
+        private float[] ix = new float[1];
+
+        private int[] ox = new int[1];
+
+        private float[][] mark_ibuffer = null;
+
+        private float mark_ibuffer_index = 0;
+
+        private int mark_ibuffer_len = 0;
+
+        public AudioFloatInputStreamResampler(AudioFloatInputStream ais,
+                AudioFormat format) {
+            this.ais = ais;
+            AudioFormat sourceFormat = ais.getFormat();
+            targetFormat = new AudioFormat(sourceFormat.getEncoding(), format
+                    .getSampleRate(), sourceFormat.getSampleSizeInBits(),
+                    sourceFormat.getChannels(), sourceFormat.getFrameSize(),
+                    format.getSampleRate(), sourceFormat.isBigEndian());
+            nrofchannels = targetFormat.getChannels();
+            Object interpolation = format.getProperty("interpolation");
+            if (interpolation != null && (interpolation instanceof String)) {
+                String resamplerType = (String) interpolation;
+                if (resamplerType.equalsIgnoreCase("point"))
+                    this.resampler = new SoftPointResampler();
+                if (resamplerType.equalsIgnoreCase("linear"))
+                    this.resampler = new SoftLinearResampler2();
+                if (resamplerType.equalsIgnoreCase("linear1"))
+                    this.resampler = new SoftLinearResampler();
+                if (resamplerType.equalsIgnoreCase("linear2"))
+                    this.resampler = new SoftLinearResampler2();
+                if (resamplerType.equalsIgnoreCase("cubic"))
+                    this.resampler = new SoftCubicResampler();
+                if (resamplerType.equalsIgnoreCase("lanczos"))
+                    this.resampler = new SoftLanczosResampler();
+                if (resamplerType.equalsIgnoreCase("sinc"))
+                    this.resampler = new SoftSincResampler();
+            }
+            if (resampler == null)
+                resampler = new SoftLinearResampler2(); // new
+                                                        // SoftLinearResampler2();
+            pitch[0] = sourceFormat.getSampleRate() / format.getSampleRate();
+            pad = resampler.getPadding();
+            pad2 = pad * 2;
+            ibuffer = new float[nrofchannels][buffer_len + pad2];
+            ibuffer2 = new float[nrofchannels * buffer_len];
+            ibuffer_index = buffer_len + pad;
+            ibuffer_len = buffer_len;
+        }
+
+        public int available() throws IOException {
+            return 0;
+        }
+
+        public void close() throws IOException {
+            ais.close();
+        }
+
+        public AudioFormat getFormat() {
+            return targetFormat;
+        }
+
+        public long getFrameLength() {
+            return AudioSystem.NOT_SPECIFIED; // ais.getFrameLength();
+        }
+
+        public void mark(int readlimit) {
+            ais.mark((int) (readlimit * pitch[0]));
+            mark_ibuffer_index = ibuffer_index;
+            mark_ibuffer_len = ibuffer_len;
+            if (mark_ibuffer == null) {
+                mark_ibuffer = new float[ibuffer.length][ibuffer[0].length];
+            }
+            for (int c = 0; c < ibuffer.length; c++) {
+                float[] from = ibuffer[c];
+                float[] to = mark_ibuffer[c];
+                for (int i = 0; i < to.length; i++) {
+                    to[i] = from[i];
+                }
+            }
+        }
+
+        public boolean markSupported() {
+            return ais.markSupported();
+        }
+
+        private void readNextBuffer() throws IOException {
+
+            if (ibuffer_len == -1)
+                return;
+
+            for (int c = 0; c < nrofchannels; c++) {
+                float[] buff = ibuffer[c];
+                int buffer_len_pad = ibuffer_len + pad2;
+                for (int i = ibuffer_len, ix = 0; i < buffer_len_pad; i++, ix++) {
+                    buff[ix] = buff[i];
+                }
+            }
+
+            ibuffer_index -= (ibuffer_len);
+
+            ibuffer_len = ais.read(ibuffer2);
+            if (ibuffer_len >= 0) {
+                while (ibuffer_len < ibuffer2.length) {
+                    int ret = ais.read(ibuffer2, ibuffer_len, ibuffer2.length
+                            - ibuffer_len);
+                    if (ret == -1)
+                        break;
+                    ibuffer_len += ret;
+                }
+                Arrays.fill(ibuffer2, ibuffer_len, ibuffer2.length, 0);
+                ibuffer_len /= nrofchannels;
+            } else {
+                Arrays.fill(ibuffer2, 0, ibuffer2.length, 0);
+            }
+
+            int ibuffer2_len = ibuffer2.length;
+            for (int c = 0; c < nrofchannels; c++) {
+                float[] buff = ibuffer[c];
+                for (int i = c, ix = pad2; i < ibuffer2_len; i += nrofchannels, ix++) {
+                    buff[ix] = ibuffer2[i];
+                }
+            }
+
+        }
+
+        public int read(float[] b, int off, int len) throws IOException {
+
+            if (cbuffer == null || cbuffer[0].length < len / nrofchannels) {
+                cbuffer = new float[nrofchannels][len / nrofchannels];
+            }
+            if (ibuffer_len == -1)
+                return -1;
+            if (len < 0)
+                return 0;
+            int remain = len / nrofchannels;
+            int destPos = 0;
+            int in_end = ibuffer_len;
+            while (remain > 0) {
+                if (ibuffer_len >= 0) {
+                    if (ibuffer_index >= (ibuffer_len + pad))
+                        readNextBuffer();
+                    in_end = ibuffer_len + pad;
+                }
+
+                if (ibuffer_len < 0) {
+                    in_end = pad2;
+                    if (ibuffer_index >= in_end)
+                        break;
+                }
+
+                if (ibuffer_index < 0)
+                    break;
+                int preDestPos = destPos;
+                for (int c = 0; c < nrofchannels; c++) {
+                    ix[0] = ibuffer_index;
+                    ox[0] = destPos;
+                    float[] buff = ibuffer[c];
+                    resampler.interpolate(buff, ix, in_end, pitch, 0,
+                            cbuffer[c], ox, len / nrofchannels);
+                }
+                ibuffer_index = ix[0];
+                destPos = ox[0];
+                remain -= destPos - preDestPos;
+            }
+            for (int c = 0; c < nrofchannels; c++) {
+                int ix = 0;
+                float[] buff = cbuffer[c];
+                for (int i = c; i < b.length; i += nrofchannels) {
+                    b[i] = buff[ix++];
+                }
+            }
+            return len - remain * nrofchannels;
+        }
+
+        public void reset() throws IOException {
+            ais.reset();
+            if (mark_ibuffer == null)
+                return;
+            ibuffer_index = mark_ibuffer_index;
+            ibuffer_len = mark_ibuffer_len;
+            for (int c = 0; c < ibuffer.length; c++) {
+                float[] from = mark_ibuffer[c];
+                float[] to = ibuffer[c];
+                for (int i = 0; i < to.length; i++) {
+                    to[i] = from[i];
+                }
+            }
+
+        }
+
+        public long skip(long len) throws IOException {
+            if (len > 0)
+                return 0;
+            if (skipbuffer == null)
+                skipbuffer = new float[1024 * targetFormat.getFrameSize()];
+            float[] l_skipbuffer = skipbuffer;
+            long remain = len;
+            while (remain > 0) {
+                int ret = read(l_skipbuffer, 0, (int) Math.min(remain,
+                        skipbuffer.length));
+                if (ret < 0) {
+                    if (remain == len)
+                        return ret;
+                    break;
+                }
+                remain -= ret;
+            }
+            return len - remain;
+
+        }
+
+    }
+
+    private Encoding[] formats = { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
+            AudioFloatConverter.PCM_FLOAT };
+
+    public AudioInputStream getAudioInputStream(Encoding targetEncoding,
+            AudioInputStream sourceStream) {
+        if (sourceStream.getFormat().getEncoding().equals(targetEncoding))
+            return sourceStream;
+        AudioFormat format = sourceStream.getFormat();
+        int channels = format.getChannels();
+        Encoding encoding = targetEncoding;
+        float samplerate = format.getSampleRate();
+        int bits = format.getSampleSizeInBits();
+        boolean bigendian = format.isBigEndian();
+        if (targetEncoding.equals(AudioFloatConverter.PCM_FLOAT))
+            bits = 32;
+        AudioFormat targetFormat = new AudioFormat(encoding, samplerate, bits,
+                channels, channels * bits / 8, samplerate, bigendian);
+        return getAudioInputStream(targetFormat, sourceStream);
+    }
+
+    public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
+            AudioInputStream sourceStream) {
+        if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
+            throw new IllegalArgumentException("Unsupported conversion: "
+                    + sourceStream.getFormat().toString() + " to "
+                    + targetFormat.toString());
+        return getAudioInputStream(targetFormat, AudioFloatInputStream
+                .getInputStream(sourceStream));
+    }
+
+    public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
+            AudioFloatInputStream sourceStream) {
+
+        if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
+            throw new IllegalArgumentException("Unsupported conversion: "
+                    + sourceStream.getFormat().toString() + " to "
+                    + targetFormat.toString());
+        if (targetFormat.getChannels() != sourceStream.getFormat()
+                .getChannels())
+            sourceStream = new AudioFloatInputStreamChannelMixer(sourceStream,
+                    targetFormat.getChannels());
+        if (Math.abs(targetFormat.getSampleRate()
+                - sourceStream.getFormat().getSampleRate()) > 0.000001)
+            sourceStream = new AudioFloatInputStreamResampler(sourceStream,
+                    targetFormat);
+        return new AudioInputStream(new AudioFloatFormatConverterInputStream(
+                targetFormat, sourceStream), targetFormat, sourceStream
+                .getFrameLength());
+    }
+
+    public Encoding[] getSourceEncodings() {
+        return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
+                AudioFloatConverter.PCM_FLOAT };
+    }
+
+    public Encoding[] getTargetEncodings() {
+        return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
+                AudioFloatConverter.PCM_FLOAT };
+    }
+
+    public Encoding[] getTargetEncodings(AudioFormat sourceFormat) {
+        if (AudioFloatConverter.getConverter(sourceFormat) == null)
+            return new Encoding[0];
+        return new Encoding[] { Encoding.PCM_SIGNED, Encoding.PCM_UNSIGNED,
+                AudioFloatConverter.PCM_FLOAT };
+    }
+
+    public AudioFormat[] getTargetFormats(Encoding targetEncoding,
+            AudioFormat sourceFormat) {
+        if (AudioFloatConverter.getConverter(sourceFormat) == null)
+            return new AudioFormat[0];
+        int channels = sourceFormat.getChannels();
+
+        ArrayList formats = new ArrayList();
+
+        if (targetEncoding.equals(Encoding.PCM_SIGNED))
+            formats.add(new AudioFormat(Encoding.PCM_SIGNED,
+                    AudioSystem.NOT_SPECIFIED, 8, channels, channels,
+                    AudioSystem.NOT_SPECIFIED, false));
+        if (targetEncoding.equals(Encoding.PCM_UNSIGNED))
+            formats.add(new AudioFormat(Encoding.PCM_UNSIGNED,
+                    AudioSystem.NOT_SPECIFIED, 8, channels, channels,
+                    AudioSystem.NOT_SPECIFIED, false));
+
+        for (int bits = 16; bits < 32; bits += 8) {
+            if (targetEncoding.equals(Encoding.PCM_SIGNED)) {
+                formats.add(new AudioFormat(Encoding.PCM_SIGNED,
+                        AudioSystem.NOT_SPECIFIED, bits, channels, channels
+                                * bits / 8, AudioSystem.NOT_SPECIFIED, false));
+                formats.add(new AudioFormat(Encoding.PCM_SIGNED,
+                        AudioSystem.NOT_SPECIFIED, bits, channels, channels
+                                * bits / 8, AudioSystem.NOT_SPECIFIED, true));
+            }
+            if (targetEncoding.equals(Encoding.PCM_UNSIGNED)) {
+                formats.add(new AudioFormat(Encoding.PCM_UNSIGNED,
+                        AudioSystem.NOT_SPECIFIED, bits, channels, channels
+                                * bits / 8, AudioSystem.NOT_SPECIFIED, true));
+                formats.add(new AudioFormat(Encoding.PCM_UNSIGNED,
+                        AudioSystem.NOT_SPECIFIED, bits, channels, channels
+                                * bits / 8, AudioSystem.NOT_SPECIFIED, false));
+            }
+        }
+
+        if (targetEncoding.equals(AudioFloatConverter.PCM_FLOAT)) {
+            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+                    AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4,
+                    AudioSystem.NOT_SPECIFIED, false));
+            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+                    AudioSystem.NOT_SPECIFIED, 32, channels, channels * 4,
+                    AudioSystem.NOT_SPECIFIED, true));
+            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+                    AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8,
+                    AudioSystem.NOT_SPECIFIED, false));
+            formats.add(new AudioFormat(AudioFloatConverter.PCM_FLOAT,
+                    AudioSystem.NOT_SPECIFIED, 64, channels, channels * 8,
+                    AudioSystem.NOT_SPECIFIED, true));
+        }
+
+        return formats.toArray(new AudioFormat[formats.size()]);
+    }
+
+    public boolean isConversionSupported(AudioFormat targetFormat,
+            AudioFormat sourceFormat) {
+        if (AudioFloatConverter.getConverter(sourceFormat) == null)
+            return false;
+        if (AudioFloatConverter.getConverter(targetFormat) == null)
+            return false;
+        if (sourceFormat.getChannels() <= 0)
+            return false;
+        if (targetFormat.getChannels() <= 0)
+            return false;
+        return true;
+    }
+
+    public boolean isConversionSupported(Encoding targetEncoding,
+            AudioFormat sourceFormat) {
+        if (AudioFloatConverter.getConverter(sourceFormat) == null)
+            return false;
+        for (int i = 0; i < formats.length; i++) {
+            if (targetEncoding.equals(formats[i]))
+                return true;
+        }
+        return false;
+    }
+
+}
diff --git a/jdk/src/share/classes/com/sun/media/sound/AudioFloatInputStream.java b/jdk/src/share/classes/com/sun/media/sound/AudioFloatInputStream.java
new file mode 100644
index 00000000000..9c3673721c3
--- /dev/null
+++ b/jdk/src/share/classes/com/sun/media/sound/AudioFloatInputStream.java
@@ -0,0 +1,281 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.media.sound;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.AudioSystem;
+import javax.sound.sampled.UnsupportedAudioFileException;
+
+/**
+ * This class is used to create AudioFloatInputStream from AudioInputStream and
+ * byte buffers.
+ *
+ * @author Karl Helgason
+ */
+public abstract class AudioFloatInputStream {
+
+    private static class BytaArrayAudioFloatInputStream
+            extends AudioFloatInputStream {
+
+        private int pos = 0;
+        private int markpos = 0;
+        private AudioFloatConverter converter;
+        private AudioFormat format;
+        private byte[] buffer;
+        private int buffer_offset;
+        private int buffer_len;
+        private int framesize_pc;
+
+        public BytaArrayAudioFloatInputStream(AudioFloatConverter converter,
+                byte[] buffer, int offset, int len) {
+            this.converter = converter;
+            this.format = converter.getFormat();
+            this.buffer = buffer;
+            this.buffer_offset = offset;
+            framesize_pc = format.getFrameSize() / format.getChannels();
+            this.buffer_len = len / framesize_pc;
+
+        }
+
+        public AudioFormat getFormat() {
+            return format;
+        }
+
+        public long getFrameLength() {
+            return buffer_len;// / format.getFrameSize();
+        }
+
+        public int read(float[] b, int off, int len) throws IOException {
+            if (b == null)
+                throw new NullPointerException();
+            if (off < 0 || len < 0 || len > b.length - off)
+                throw new IndexOutOfBoundsException();
+            if (pos >= buffer_len)
+                return -1;
+            if (len == 0)
+                return 0;
+            if (pos + len > buffer_len)
+                len = buffer_len - pos;
+            converter.toFloatArray(buffer, buffer_offset + pos * framesize_pc,
+                    b, off, len);
+            pos += len;
+            return len;
+        }
+
+        public long skip(long len) throws IOException {
+            if (pos >= buffer_len)
+                return -1;
+            if (len <= 0)
+                return 0;
+            if (pos + len > buffer_len)
+                len = buffer_len - pos;
+            pos += len;
+            return len;
+        }
+
+        public int available() throws IOException {
+            return buffer_len - pos;
+        }
+
+        public void close() throws IOException {
+        }
+
+        public void mark(int readlimit) {
+            markpos = pos;
+        }
+
+        public boolean markSupported() {
+            return true;
+        }
+
+        public void reset() throws IOException {
+            pos = markpos;
+        }
+    }
+
+    private static class DirectAudioFloatInputStream
+            extends AudioFloatInputStream {
+
+        private AudioInputStream stream;
+        private AudioFloatConverter converter;
+        private int framesize_pc; // framesize / channels
+        private byte[] buffer;
+
+        public DirectAudioFloatInputStream(AudioInputStream stream) {
+            converter = AudioFloatConverter.getConverter(stream.getFormat());
+            if (converter == null) {
+                AudioFormat format = stream.getFormat();
+                AudioFormat newformat;
+
+                AudioFormat[] formats = AudioSystem.getTargetFormats(
+                        AudioFormat.Encoding.PCM_SIGNED, format);
+                if (formats.length != 0) {
+                    newformat = formats[0];
+                } else {
+                    float samplerate = format.getSampleRate();
+                    int samplesizeinbits = format.getSampleSizeInBits();
+                    int framesize = format.getFrameSize();
+                    float framerate = format.getFrameRate();
+                    samplesizeinbits = 16;
+                    framesize = format.getChannels() * (samplesizeinbits / 8);
+                    framerate = samplerate;
+
+                    newformat = new AudioFormat(
+                            AudioFormat.Encoding.PCM_SIGNED, samplerate,
+                            samplesizeinbits, format.getChannels(), framesize,
+                            framerate, false);
+                }
+
+                stream = AudioSystem.getAudioInputStream(newformat, stream);
+                converter = AudioFloatConverter.getConverter(stream.getFormat());
+            }
+            framesize_pc = stream.getFormat().getFrameSize()
+                    / stream.getFormat().getChannels();
+            this.stream = stream;
+        }
+
+        public AudioFormat getFormat() {
+            return stream.getFormat();
+        }
+
+        public long getFrameLength() {
+            return stream.getFrameLength();
+        }
+
+        public int read(float[] b, int off, int len) throws IOException {
+            int b_len = len * framesize_pc;
+            if (buffer == null || buffer.length < b_len)
+                buffer = new byte[b_len];
+            int ret = stream.read(buffer, 0, b_len);
+            if (ret == -1)
+                return -1;
+            converter.toFloatArray(buffer, b, off, ret / framesize_pc);
+            return ret / framesize_pc;
+        }
+
+        public long skip(long len) throws IOException {
+            long b_len = len * framesize_pc;
+            long ret = stream.skip(b_len);
+            if (ret == -1)
+                return -1;
+            return ret / framesize_pc;
+        }
+
+        public int available() throws IOException {
+            return stream.available() / framesize_pc;
+        }
+
+        public void close() throws IOException {
+            stream.close();
+        }
+
+        public void mark(int readlimit) {
+            stream.mark(readlimit * framesize_pc);
+        }
+
+        public boolean markSupported() {
+            return stream.markSupported();
+        }
+
+        public void reset() throws IOException {
+            stream.reset();
+        }
+    }
+
+    public static AudioFloatInputStream getInputStream(URL url)
+            throws UnsupportedAudioFileException, IOException {
+        return new DirectAudioFloatInputStream(AudioSystem
+                .getAudioInputStream(url));
+    }
+
+    public static AudioFloatInputStream getInputStream(File file)
+            throws UnsupportedAudioFileException, IOException {
+        return new DirectAudioFloatInputStream(AudioSystem
+                .getAudioInputStream(file));
+    }
+
+    public static AudioFloatInputStream getInputStream(InputStream stream)
+            throws UnsupportedAudioFileException, IOException {
+        return new DirectAudioFloatInputStream(AudioSystem
+                .getAudioInputStream(stream));
+    }
+
+    public static AudioFloatInputStream getInputStream(
+            AudioInputStream stream) {
+        return new DirectAudioFloatInputStream(stream);
+    }
+
+    public static AudioFloatInputStream getInputStream(AudioFormat format,
+            byte[] buffer, int offset, int len) {
+        AudioFloatConverter converter = AudioFloatConverter
+                .getConverter(format);
+        if (converter != null)
+            return new BytaArrayAudioFloatInputStream(converter, buffer,
+                    offset, len);
+
+        InputStream stream = new ByteArrayInputStream(buffer, offset, len);
+        long aLen = format.getFrameSize() == AudioSystem.NOT_SPECIFIED
+                ? AudioSystem.NOT_SPECIFIED : len / format.getFrameSize();
+        AudioInputStream astream = new AudioInputStream(stream, format, aLen);
+        return getInputStream(astream);
+    }
+
+    public abstract AudioFormat getFormat();
+
+    public abstract long getFrameLength();
+
+    public abstract int read(float[] b, int off, int len) throws IOException;
+
+    public int read(float[] b) throws IOException {
+        return read(b, 0, b.length);
+    }
+
+    public float read() throws IOException {
+        float[] b = new float[1];
+        int ret = read(b, 0, 1);
+        if (ret == -1 || ret == 0)
+            return 0;
+        return b[0];
+    }
+
+    public abstract long skip(long len) throws IOException;
+
+    public abstract int available() throws IOException;
+
+    public abstract void close() throws IOException;
+
+    public abstract void mark(int readlimit);
+
+    public abstract boolean markSupported();
+
+    public abstract void reset() throws IOException;
+}
diff --git a/jdk/src/share/classes/com/sun/media/sound/AudioSynthesizer.java b/jdk/src/share/classes/com/sun/media/sound/AudioSynthesizer.java
new file mode 100644
index 00000000000..247e03f04ab
--- /dev/null
+++ b/jdk/src/share/classes/com/sun/media/sound/AudioSynthesizer.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package com.sun.media.sound;
+
+import java.util.Map;
+import javax.sound.midi.MidiUnavailableException;
+import javax.sound.midi.Synthesizer;
+import javax.sound.sampled.AudioFormat;
+import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.SourceDataLine;
+
+/**
+ * AudioSynthesizer is a Synthesizer
+ * which renders it's output audio into SourceDataLine
+ * or AudioInputStream.
+ *
+ * @see MidiSystem#getSynthesizer
+ * @see Synthesizer
+ *
+ * @author Karl Helgason
+ */
+public interface AudioSynthesizer extends Synthesizer {
+
+    /**
+     * Obtains the current format (encoding, sample rate, number of channels,
+     * etc.) of the synthesizer audio data.
+     *
+     * 

If the synthesizer is not open and has never been opened, it returns + * the default format. + * + * @return current audio data format + * @see AudioFormat + */ + public AudioFormat getFormat(); + + /** + * Gets information about the possible properties for the synthesizer. + * + * @param info a proposed list of tag/value pairs that will be sent on open. + * @return an array of AudioSynthesizerPropertyInfo objects + * describing possible properties. This array may be an empty array if + * no properties are required. + */ + public AudioSynthesizerPropertyInfo[] getPropertyInfo( + Map info); + + /** + * Opens the synthesizer and starts rendering audio into + * SourceDataLine. + * + *

An application opening a synthesizer explicitly with this call + * has to close the synthesizer by calling {@link #close}. This is + * necessary to release system resources and allow applications to + * exit cleanly. + * + *

Note that some synthesizers, once closed, cannot be reopened. + * Attempts to reopen such a synthesizer will always result in + * a MidiUnavailableException. + * + * @param line which AudioSynthesizer writes output audio into. + * If line is null, then line from system default mixer is used. + * @param info a Map object containing + * properties for additional configuration supported by synthesizer. + * If info is null then default settings are used. + * + * @throws MidiUnavailableException thrown if the synthesizer cannot be + * opened due to resource restrictions. + * @throws SecurityException thrown if the synthesizer cannot be + * opened due to security restrictions. + * + * @see #close + * @see #isOpen + */ + public void open(SourceDataLine line, Map info) + throws MidiUnavailableException; + + /** + * Opens the synthesizer and renders audio into returned + * AudioInputStream. + * + *

An application opening a synthesizer explicitly with this call + * has to close the synthesizer by calling {@link #close}. This is + * necessary to release system resources and allow applications to + * exit cleanly. + * + *

Note that some synthesizers, once closed, cannot be reopened. + * Attempts to reopen such a synthesizer will always result in + * a MidiUnavailableException. + * + * @param targetFormat specifies the AudioFormat + * used in returned AudioInputStream. + * @param info a Map object containing + * properties for additional configuration supported by synthesizer. + * If info is null then default settings are used. + * + * @throws MidiUnavailableException thrown if the synthesizer cannot be + * opened due to resource restrictions. + * @throws SecurityException thrown if the synthesizer cannot be + * opened due to security restrictions. + * + * @see #close + * @see #isOpen + */ + public AudioInputStream openStream(AudioFormat targetFormat, + Map info) throws MidiUnavailableException; +} diff --git a/jdk/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java b/jdk/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java new file mode 100644 index 00000000000..cf40dda256a --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/AudioSynthesizerPropertyInfo.java @@ -0,0 +1,76 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * Information about property used in opening AudioSynthesizer. + * + * @author Karl Helgason + */ +public class AudioSynthesizerPropertyInfo { + + /** + * Constructs a AudioSynthesizerPropertyInfo object with a given + * name and value. The description and choices + * are intialized by null values. + * + * @param name the name of the property + * @param value the current value or class used for values. + * + */ + public AudioSynthesizerPropertyInfo(String name, Object value) { + this.name = name; + this.value = value; + if (value instanceof Class) + valueClass = (Class)value; + else if (value != null) + valueClass = value.getClass(); + } + /** + * The name of the property. + */ + public String name; + /** + * A brief description of the property, which may be null. + */ + public String description = null; + /** + * The value field specifies the current value of + * the property. + */ + public Object value = null; + /** + * The valueClass field specifies class + * used in value field. + */ + public Class valueClass = null; + /** + * An array of possible values if the value for the field + * AudioSynthesizerPropertyInfo.value may be selected + * from a particular set of values; otherwise null. + */ + public Object[] choices = null; + +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSInfo.java b/jdk/src/share/classes/com/sun/media/sound/DLSInfo.java new file mode 100644 index 00000000000..4e904216138 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSInfo.java @@ -0,0 +1,109 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * This class is used to store information to describe soundbanks, instruments + * and samples. It is stored inside a "INFO" List Chunk inside DLS files. + * + * @author Karl Helgason + */ +public class DLSInfo { + + /** + * (INAM) Title or subject. + */ + public String name = "untitled"; + /** + * (ICRD) Date of creation, the format is: YYYY-MM-DD. + * For example 2007-01-01 for 1. january of year 2007. + */ + public String creationDate = null; + /** + * (IENG) Name of engineer who created the object. + */ + public String engineers = null; + /** + * (IPRD) Name of the product which the object is intended for. + */ + public String product = null; + /** + * (ICOP) Copyright information. + */ + public String copyright = null; + /** + * (ICMT) General comments. Doesn't contain newline characters. + */ + public String comments = null; + /** + * (ISFT) Name of software package used to create the file. + */ + public String tools = null; + /** + * (IARL) Where content is archived. + */ + public String archival_location = null; + /** + * (IART) Artists of original content. + */ + public String artist = null; + /** + * (ICMS) Names of persons or orginizations who commissioned the file. + */ + public String commissioned = null; + /** + * (IGNR) Genre of the work. + * Example: jazz, classical, rock, etc. + */ + public String genre = null; + /** + * (IKEY) List of keyword that describe the content. + * Examples: FX, bird, piano, etc. + */ + public String keywords = null; + /** + * (IMED) Describes original medium of the data. + * For example: record, CD, etc. + */ + public String medium = null; + /** + * (ISBJ) Description of the content. + */ + public String subject = null; + /** + * (ISRC) Name of person or orginization who supplied + * orginal material for the file. + */ + public String source = null; + /** + * (ISRF) Source media for sample data is from. + * For example: CD, TV, etc. + */ + public String source_form = null; + /** + * (ITCH) Technician who sample the file/object. + */ + public String technician = null; +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSInstrument.java b/jdk/src/share/classes/com/sun/media/sound/DLSInstrument.java new file mode 100644 index 00000000000..c4912314abb --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSInstrument.java @@ -0,0 +1,448 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.sound.midi.Patch; + +/** + * This class is used to store information to describe instrument. + * It contains list of regions and modulators. + * It is stored inside a "ins " List Chunk inside DLS files. + * In the DLS documentation a modulator is called articulator. + * + * @author Karl Helgason + */ +public class DLSInstrument extends ModelInstrument { + + protected int preset = 0; + protected int bank = 0; + protected boolean druminstrument = false; + protected byte[] guid = null; + protected DLSInfo info = new DLSInfo(); + protected List regions = new ArrayList(); + protected List modulators = new ArrayList(); + + public DLSInstrument() { + super(null, null, null, null); + } + + public DLSInstrument(DLSSoundbank soundbank) { + super(soundbank, null, null, null); + } + + public DLSInfo getInfo() { + return info; + } + + public String getName() { + return info.name; + } + + public void setName(String name) { + info.name = name; + } + + public ModelPatch getPatch() { + return new ModelPatch(bank, preset, druminstrument); + } + + public void setPatch(Patch patch) { + if (patch instanceof ModelPatch && ((ModelPatch)patch).isPercussion()) { + druminstrument = true; + bank = patch.getBank(); + preset = patch.getProgram(); + } else { + druminstrument = false; + bank = patch.getBank(); + preset = patch.getProgram(); + } + } + + public Object getData() { + return null; + } + + public List getRegions() { + return regions; + } + + public List getModulators() { + return modulators; + } + + public String toString() { + if (druminstrument) + return "Drumkit: " + info.name + + " bank #" + bank + " preset #" + preset; + else + return "Instrument: " + info.name + + " bank #" + bank + " preset #" + preset; + } + + private ModelIdentifier convertToModelDest(int dest) { + if (dest == DLSModulator.CONN_DST_NONE) + return null; + if (dest == DLSModulator.CONN_DST_GAIN) + return ModelDestination.DESTINATION_GAIN; + if (dest == DLSModulator.CONN_DST_PITCH) + return ModelDestination.DESTINATION_PITCH; + if (dest == DLSModulator.CONN_DST_PAN) + return ModelDestination.DESTINATION_PAN; + + if (dest == DLSModulator.CONN_DST_LFO_FREQUENCY) + return ModelDestination.DESTINATION_LFO1_FREQ; + if (dest == DLSModulator.CONN_DST_LFO_STARTDELAY) + return ModelDestination.DESTINATION_LFO1_DELAY; + + if (dest == DLSModulator.CONN_DST_EG1_ATTACKTIME) + return ModelDestination.DESTINATION_EG1_ATTACK; + if (dest == DLSModulator.CONN_DST_EG1_DECAYTIME) + return ModelDestination.DESTINATION_EG1_DECAY; + if (dest == DLSModulator.CONN_DST_EG1_RELEASETIME) + return ModelDestination.DESTINATION_EG1_RELEASE; + if (dest == DLSModulator.CONN_DST_EG1_SUSTAINLEVEL) + return ModelDestination.DESTINATION_EG1_SUSTAIN; + + if (dest == DLSModulator.CONN_DST_EG2_ATTACKTIME) + return ModelDestination.DESTINATION_EG2_ATTACK; + if (dest == DLSModulator.CONN_DST_EG2_DECAYTIME) + return ModelDestination.DESTINATION_EG2_DECAY; + if (dest == DLSModulator.CONN_DST_EG2_RELEASETIME) + return ModelDestination.DESTINATION_EG2_RELEASE; + if (dest == DLSModulator.CONN_DST_EG2_SUSTAINLEVEL) + return ModelDestination.DESTINATION_EG2_SUSTAIN; + + // DLS2 Destinations + if (dest == DLSModulator.CONN_DST_KEYNUMBER) + return ModelDestination.DESTINATION_KEYNUMBER; + + if (dest == DLSModulator.CONN_DST_CHORUS) + return ModelDestination.DESTINATION_CHORUS; + if (dest == DLSModulator.CONN_DST_REVERB) + return ModelDestination.DESTINATION_REVERB; + + if (dest == DLSModulator.CONN_DST_VIB_FREQUENCY) + return ModelDestination.DESTINATION_LFO2_FREQ; + if (dest == DLSModulator.CONN_DST_VIB_STARTDELAY) + return ModelDestination.DESTINATION_LFO2_DELAY; + + if (dest == DLSModulator.CONN_DST_EG1_DELAYTIME) + return ModelDestination.DESTINATION_EG1_DELAY; + if (dest == DLSModulator.CONN_DST_EG1_HOLDTIME) + return ModelDestination.DESTINATION_EG1_HOLD; + if (dest == DLSModulator.CONN_DST_EG1_SHUTDOWNTIME) + return ModelDestination.DESTINATION_EG1_SHUTDOWN; + + if (dest == DLSModulator.CONN_DST_EG2_DELAYTIME) + return ModelDestination.DESTINATION_EG2_DELAY; + if (dest == DLSModulator.CONN_DST_EG2_HOLDTIME) + return ModelDestination.DESTINATION_EG2_HOLD; + + if (dest == DLSModulator.CONN_DST_FILTER_CUTOFF) + return ModelDestination.DESTINATION_FILTER_FREQ; + if (dest == DLSModulator.CONN_DST_FILTER_Q) + return ModelDestination.DESTINATION_FILTER_Q; + + return null; + } + + private ModelIdentifier convertToModelSrc(int src) { + if (src == DLSModulator.CONN_SRC_NONE) + return null; + + if (src == DLSModulator.CONN_SRC_LFO) + return ModelSource.SOURCE_LFO1; + if (src == DLSModulator.CONN_SRC_KEYONVELOCITY) + return ModelSource.SOURCE_NOTEON_VELOCITY; + if (src == DLSModulator.CONN_SRC_KEYNUMBER) + return ModelSource.SOURCE_NOTEON_KEYNUMBER; + if (src == DLSModulator.CONN_SRC_EG1) + return ModelSource.SOURCE_EG1; + if (src == DLSModulator.CONN_SRC_EG2) + return ModelSource.SOURCE_EG2; + if (src == DLSModulator.CONN_SRC_PITCHWHEEL) + return ModelSource.SOURCE_MIDI_PITCH; + if (src == DLSModulator.CONN_SRC_CC1) + return new ModelIdentifier("midi_cc", "1", 0); + if (src == DLSModulator.CONN_SRC_CC7) + return new ModelIdentifier("midi_cc", "7", 0); + if (src == DLSModulator.CONN_SRC_CC10) + return new ModelIdentifier("midi_cc", "10", 0); + if (src == DLSModulator.CONN_SRC_CC11) + return new ModelIdentifier("midi_cc", "11", 0); + if (src == DLSModulator.CONN_SRC_RPN0) + return new ModelIdentifier("midi_rpn", "0", 0); + if (src == DLSModulator.CONN_SRC_RPN1) + return new ModelIdentifier("midi_rpn", "1", 0); + + if (src == DLSModulator.CONN_SRC_POLYPRESSURE) + return ModelSource.SOURCE_MIDI_POLY_PRESSURE; + if (src == DLSModulator.CONN_SRC_CHANNELPRESSURE) + return ModelSource.SOURCE_MIDI_CHANNEL_PRESSURE; + if (src == DLSModulator.CONN_SRC_VIBRATO) + return ModelSource.SOURCE_LFO2; + if (src == DLSModulator.CONN_SRC_MONOPRESSURE) + return ModelSource.SOURCE_MIDI_CHANNEL_PRESSURE; + + if (src == DLSModulator.CONN_SRC_CC91) + return new ModelIdentifier("midi_cc", "91", 0); + if (src == DLSModulator.CONN_SRC_CC93) + return new ModelIdentifier("midi_cc", "93", 0); + + return null; + } + + private ModelConnectionBlock convertToModel(DLSModulator mod) { + ModelIdentifier source = convertToModelSrc(mod.getSource()); + ModelIdentifier control = convertToModelSrc(mod.getControl()); + ModelIdentifier destination_id = + convertToModelDest(mod.getDestination()); + + int scale = mod.getScale(); + double f_scale; + if (scale == Integer.MIN_VALUE) + f_scale = Double.NEGATIVE_INFINITY; + else + f_scale = scale / 65536.0; + + if (destination_id != null) { + ModelSource src = null; + ModelSource ctrl = null; + ModelConnectionBlock block = new ModelConnectionBlock(); + if (control != null) { + ModelSource s = new ModelSource(); + if (control == ModelSource.SOURCE_MIDI_PITCH) { + ((ModelStandardTransform)s.getTransform()).setPolarity( + ModelStandardTransform.POLARITY_BIPOLAR); + } else if (control == ModelSource.SOURCE_LFO1 + || control == ModelSource.SOURCE_LFO2) { + ((ModelStandardTransform)s.getTransform()).setPolarity( + ModelStandardTransform.POLARITY_BIPOLAR); + } + s.setIdentifier(control); + block.addSource(s); + ctrl = s; + } + if (source != null) { + ModelSource s = new ModelSource(); + if (source == ModelSource.SOURCE_MIDI_PITCH) { + ((ModelStandardTransform)s.getTransform()).setPolarity( + ModelStandardTransform.POLARITY_BIPOLAR); + } else if (source == ModelSource.SOURCE_LFO1 + || source == ModelSource.SOURCE_LFO2) { + ((ModelStandardTransform)s.getTransform()).setPolarity( + ModelStandardTransform.POLARITY_BIPOLAR); + } + s.setIdentifier(source); + block.addSource(s); + src = s; + } + ModelDestination destination = new ModelDestination(); + destination.setIdentifier(destination_id); + block.setDestination(destination); + + if (mod.getVersion() == 1) { + //if (mod.getTransform() == DLSModulator.CONN_TRN_CONCAVE) { + // ((ModelStandardTransform)destination.getTransform()) + // .setTransform( + // ModelStandardTransform.TRANSFORM_CONCAVE); + //} + if (mod.getTransform() == DLSModulator.CONN_TRN_CONCAVE) { + if (src != null) { + ((ModelStandardTransform)src.getTransform()) + .setTransform( + ModelStandardTransform.TRANSFORM_CONCAVE); + ((ModelStandardTransform)src.getTransform()) + .setDirection( + ModelStandardTransform.DIRECTION_MAX2MIN); + } + if (ctrl != null) { + ((ModelStandardTransform)ctrl.getTransform()) + .setTransform( + ModelStandardTransform.TRANSFORM_CONCAVE); + ((ModelStandardTransform)ctrl.getTransform()) + .setDirection( + ModelStandardTransform.DIRECTION_MAX2MIN); + } + } + + } else if (mod.getVersion() == 2) { + int transform = mod.getTransform(); + int src_transform_invert = (transform >> 15) & 1; + int src_transform_bipolar = (transform >> 14) & 1; + int src_transform = (transform >> 10) & 8; + int ctr_transform_invert = (transform >> 9) & 1; + int ctr_transform_bipolar = (transform >> 8) & 1; + int ctr_transform = (transform >> 4) & 8; + + + if (src != null) { + int trans = ModelStandardTransform.TRANSFORM_LINEAR; + if (src_transform == DLSModulator.CONN_TRN_SWITCH) + trans = ModelStandardTransform.TRANSFORM_SWITCH; + if (src_transform == DLSModulator.CONN_TRN_CONCAVE) + trans = ModelStandardTransform.TRANSFORM_CONCAVE; + if (src_transform == DLSModulator.CONN_TRN_CONVEX) + trans = ModelStandardTransform.TRANSFORM_CONVEX; + ((ModelStandardTransform)src.getTransform()) + .setTransform(trans); + ((ModelStandardTransform)src.getTransform()) + .setPolarity(src_transform_bipolar == 1); + ((ModelStandardTransform)src.getTransform()) + .setDirection(src_transform_invert == 1); + + } + + if (ctrl != null) { + int trans = ModelStandardTransform.TRANSFORM_LINEAR; + if (ctr_transform == DLSModulator.CONN_TRN_SWITCH) + trans = ModelStandardTransform.TRANSFORM_SWITCH; + if (ctr_transform == DLSModulator.CONN_TRN_CONCAVE) + trans = ModelStandardTransform.TRANSFORM_CONCAVE; + if (ctr_transform == DLSModulator.CONN_TRN_CONVEX) + trans = ModelStandardTransform.TRANSFORM_CONVEX; + ((ModelStandardTransform)ctrl.getTransform()) + .setTransform(trans); + ((ModelStandardTransform)ctrl.getTransform()) + .setPolarity(ctr_transform_bipolar == 1); + ((ModelStandardTransform)ctrl.getTransform()) + .setDirection(ctr_transform_invert == 1); + } + + /* No output transforms are defined the DLS Level 2 + int out_transform = transform % 8; + int trans = ModelStandardTransform.TRANSFORM_LINEAR; + if (out_transform == DLSModulator.CONN_TRN_SWITCH) + trans = ModelStandardTransform.TRANSFORM_SWITCH; + if (out_transform == DLSModulator.CONN_TRN_CONCAVE) + trans = ModelStandardTransform.TRANSFORM_CONCAVE; + if (out_transform == DLSModulator.CONN_TRN_CONVEX) + trans = ModelStandardTransform.TRANSFORM_CONVEX; + if (ctrl != null) { + ((ModelStandardTransform)destination.getTransform()) + .setTransform(trans); + } + */ + + } + + block.setScale(f_scale); + + return block; + } + + return null; + } + + public ModelPerformer[] getPerformers() { + List performers = new ArrayList(); + + Map modmap = new HashMap(); + for (DLSModulator mod: getModulators()) { + modmap.put(mod.getSource() + "x" + mod.getControl() + "=" + + mod.getDestination(), mod); + } + + Map insmodmap = + new HashMap(); + + for (DLSRegion zone: regions) { + ModelPerformer performer = new ModelPerformer(); + performer.setName(zone.getSample().getName()); + performer.setSelfNonExclusive((zone.getFusoptions() & + DLSRegion.OPTION_SELFNONEXCLUSIVE) != 0); + performer.setExclusiveClass(zone.getExclusiveClass()); + performer.setKeyFrom(zone.getKeyfrom()); + performer.setKeyTo(zone.getKeyto()); + performer.setVelFrom(zone.getVelfrom()); + performer.setVelTo(zone.getVelto()); + + insmodmap.clear(); + insmodmap.putAll(modmap); + for (DLSModulator mod: zone.getModulators()) { + insmodmap.put(mod.getSource() + "x" + mod.getControl() + "=" + + mod.getDestination(), mod); + } + + List blocks = performer.getConnectionBlocks(); + for (DLSModulator mod: insmodmap.values()) { + ModelConnectionBlock p = convertToModel(mod); + if (p != null) + blocks.add(p); + } + + + DLSSample sample = zone.getSample(); + DLSSampleOptions sampleopt = zone.getSampleoptions(); + if (sampleopt == null) + sampleopt = sample.getSampleoptions(); + + ModelByteBuffer buff = sample.getDataBuffer(); + + float pitchcorrection = (-sampleopt.unitynote * 100) + + sampleopt.finetune; + + ModelByteBufferWavetable osc = new ModelByteBufferWavetable(buff, + sample.getFormat(), pitchcorrection); + osc.setAttenuation(osc.getAttenuation() / 65536f); + if (sampleopt.getLoops().size() != 0) { + DLSSampleLoop loop = sampleopt.getLoops().get(0); + osc.setLoopStart((int)loop.getStart()); + osc.setLoopLength((int)loop.getLength()); + if (loop.getType() == DLSSampleLoop.LOOP_TYPE_FORWARD) + osc.setLoopType(ModelWavetable.LOOP_TYPE_FORWARD); + if (loop.getType() == DLSSampleLoop.LOOP_TYPE_RELEASE) + osc.setLoopType(ModelWavetable.LOOP_TYPE_RELEASE); + else + osc.setLoopType(ModelWavetable.LOOP_TYPE_FORWARD); + } + + performer.getConnectionBlocks().add( + new ModelConnectionBlock(SoftFilter.FILTERTYPE_LP12, + new ModelDestination( + new ModelIdentifier("filter", "type", 1)))); + + performer.getOscillators().add(osc); + + performers.add(performer); + + } + + return performers.toArray(new ModelPerformer[performers.size()]); + } + + public byte[] getGuid() { + return guid; + } + + public void setGuid(byte[] guid) { + this.guid = guid; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSModulator.java b/jdk/src/share/classes/com/sun/media/sound/DLSModulator.java new file mode 100644 index 00000000000..082454ea980 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSModulator.java @@ -0,0 +1,351 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * This class is used to store modulator/artiuclation data. + * A modulator connects one synthesizer source to + * a destination. For example a note on velocity + * can be mapped to the gain of the synthesized voice. + * It is stored as a "art1" or "art2" chunk inside DLS files. + * + * @author Karl Helgason + */ +public class DLSModulator { + + // DLS1 Destinations + public static final int CONN_DST_NONE = 0x000; // 0 + public static final int CONN_DST_GAIN = 0x001; // cB + public static final int CONN_DST_PITCH = 0x003; // cent + public static final int CONN_DST_PAN = 0x004; // 0.1% + public static final int CONN_DST_LFO_FREQUENCY = 0x104; // cent (default 5 Hz) + public static final int CONN_DST_LFO_STARTDELAY = 0x105; // timecent + public static final int CONN_DST_EG1_ATTACKTIME = 0x206; // timecent + public static final int CONN_DST_EG1_DECAYTIME = 0x207; // timecent + public static final int CONN_DST_EG1_RELEASETIME = 0x209; // timecent + public static final int CONN_DST_EG1_SUSTAINLEVEL = 0x20A; // 0.1% + public static final int CONN_DST_EG2_ATTACKTIME = 0x30A; // timecent + public static final int CONN_DST_EG2_DECAYTIME = 0x30B; // timecent + public static final int CONN_DST_EG2_RELEASETIME = 0x30D; // timecent + public static final int CONN_DST_EG2_SUSTAINLEVEL = 0x30E; // 0.1% + // DLS2 Destinations + public static final int CONN_DST_KEYNUMBER = 0x005; + public static final int CONN_DST_LEFT = 0x010; // 0.1% + public static final int CONN_DST_RIGHT = 0x011; // 0.1% + public static final int CONN_DST_CENTER = 0x012; // 0.1% + public static final int CONN_DST_LEFTREAR = 0x013; // 0.1% + public static final int CONN_DST_RIGHTREAR = 0x014; // 0.1% + public static final int CONN_DST_LFE_CHANNEL = 0x015; // 0.1% + public static final int CONN_DST_CHORUS = 0x080; // 0.1% + public static final int CONN_DST_REVERB = 0x081; // 0.1% + public static final int CONN_DST_VIB_FREQUENCY = 0x114; // cent + public static final int CONN_DST_VIB_STARTDELAY = 0x115; // dB + public static final int CONN_DST_EG1_DELAYTIME = 0x20B; // timecent + public static final int CONN_DST_EG1_HOLDTIME = 0x20C; // timecent + public static final int CONN_DST_EG1_SHUTDOWNTIME = 0x20D; // timecent + public static final int CONN_DST_EG2_DELAYTIME = 0x30F; // timecent + public static final int CONN_DST_EG2_HOLDTIME = 0x310; // timecent + public static final int CONN_DST_FILTER_CUTOFF = 0x500; // cent + public static final int CONN_DST_FILTER_Q = 0x501; // dB + + // DLS1 Sources + public static final int CONN_SRC_NONE = 0x000; // 1 + public static final int CONN_SRC_LFO = 0x001; // linear (sine wave) + public static final int CONN_SRC_KEYONVELOCITY = 0x002; // ??db or velocity?? + public static final int CONN_SRC_KEYNUMBER = 0x003; // ??cent or keynumber?? + public static final int CONN_SRC_EG1 = 0x004; // linear direct from eg + public static final int CONN_SRC_EG2 = 0x005; // linear direct from eg + public static final int CONN_SRC_PITCHWHEEL = 0x006; // linear -1..1 + public static final int CONN_SRC_CC1 = 0x081; // linear 0..1 + public static final int CONN_SRC_CC7 = 0x087; // linear 0..1 + public static final int CONN_SRC_CC10 = 0x08A; // linear 0..1 + public static final int CONN_SRC_CC11 = 0x08B; // linear 0..1 + public static final int CONN_SRC_RPN0 = 0x100; // ?? // Pitch Bend Range + public static final int CONN_SRC_RPN1 = 0x101; // ?? // Fine Tune + public static final int CONN_SRC_RPN2 = 0x102; // ?? // Course Tune + // DLS2 Sources + public static final int CONN_SRC_POLYPRESSURE = 0x007; // linear 0..1 + public static final int CONN_SRC_CHANNELPRESSURE = 0x008; // linear 0..1 + public static final int CONN_SRC_VIBRATO = 0x009; // linear 0..1 + public static final int CONN_SRC_MONOPRESSURE = 0x00A; // linear 0..1 + public static final int CONN_SRC_CC91 = 0x0DB; // linear 0..1 + public static final int CONN_SRC_CC93 = 0x0DD; // linear 0..1 + // DLS1 Transforms + public static final int CONN_TRN_NONE = 0x000; + public static final int CONN_TRN_CONCAVE = 0x001; + // DLS2 Transforms + public static final int CONN_TRN_CONVEX = 0x002; + public static final int CONN_TRN_SWITCH = 0x003; + public static final int DST_FORMAT_CB = 1; + public static final int DST_FORMAT_CENT = 1; + public static final int DST_FORMAT_TIMECENT = 2; + public static final int DST_FORMAT_PERCENT = 3; + protected int source; + protected int control; + protected int destination; + protected int transform; + protected int scale; + protected int version = 1; + + public int getControl() { + return control; + } + + public void setControl(int control) { + this.control = control; + } + + public static int getDestinationFormat(int destination) { + + if (destination == CONN_DST_GAIN) + return DST_FORMAT_CB; + if (destination == CONN_DST_PITCH) + return DST_FORMAT_CENT; + if (destination == CONN_DST_PAN) + return DST_FORMAT_PERCENT; + + if (destination == CONN_DST_LFO_FREQUENCY) + return DST_FORMAT_CENT; + if (destination == CONN_DST_LFO_STARTDELAY) + return DST_FORMAT_TIMECENT; + + if (destination == CONN_DST_EG1_ATTACKTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG1_DECAYTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG1_RELEASETIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG1_SUSTAINLEVEL) + return DST_FORMAT_PERCENT; + + if (destination == CONN_DST_EG2_ATTACKTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG2_DECAYTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG2_RELEASETIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG2_SUSTAINLEVEL) + return DST_FORMAT_PERCENT; + + if (destination == CONN_DST_KEYNUMBER) + return DST_FORMAT_CENT; // NOT SURE WITHOUT DLS 2 SPEC + if (destination == CONN_DST_LEFT) + return DST_FORMAT_CB; + if (destination == CONN_DST_RIGHT) + return DST_FORMAT_CB; + if (destination == CONN_DST_CENTER) + return DST_FORMAT_CB; + if (destination == CONN_DST_LEFTREAR) + return DST_FORMAT_CB; + if (destination == CONN_DST_RIGHTREAR) + return DST_FORMAT_CB; + if (destination == CONN_DST_LFE_CHANNEL) + return DST_FORMAT_CB; + if (destination == CONN_DST_CHORUS) + return DST_FORMAT_PERCENT; + if (destination == CONN_DST_REVERB) + return DST_FORMAT_PERCENT; + + if (destination == CONN_DST_VIB_FREQUENCY) + return DST_FORMAT_CENT; + if (destination == CONN_DST_VIB_STARTDELAY) + return DST_FORMAT_TIMECENT; + + if (destination == CONN_DST_EG1_DELAYTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG1_HOLDTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG1_SHUTDOWNTIME) + return DST_FORMAT_TIMECENT; + + if (destination == CONN_DST_EG2_DELAYTIME) + return DST_FORMAT_TIMECENT; + if (destination == CONN_DST_EG2_HOLDTIME) + return DST_FORMAT_TIMECENT; + + if (destination == CONN_DST_FILTER_CUTOFF) + return DST_FORMAT_CENT; + if (destination == CONN_DST_FILTER_Q) + return DST_FORMAT_CB; + + return -1; + } + + public static String getDestinationName(int destination) { + + if (destination == CONN_DST_GAIN) + return "gain"; + if (destination == CONN_DST_PITCH) + return "pitch"; + if (destination == CONN_DST_PAN) + return "pan"; + + if (destination == CONN_DST_LFO_FREQUENCY) + return "lfo1.freq"; + if (destination == CONN_DST_LFO_STARTDELAY) + return "lfo1.delay"; + + if (destination == CONN_DST_EG1_ATTACKTIME) + return "eg1.attack"; + if (destination == CONN_DST_EG1_DECAYTIME) + return "eg1.decay"; + if (destination == CONN_DST_EG1_RELEASETIME) + return "eg1.release"; + if (destination == CONN_DST_EG1_SUSTAINLEVEL) + return "eg1.sustain"; + + if (destination == CONN_DST_EG2_ATTACKTIME) + return "eg2.attack"; + if (destination == CONN_DST_EG2_DECAYTIME) + return "eg2.decay"; + if (destination == CONN_DST_EG2_RELEASETIME) + return "eg2.release"; + if (destination == CONN_DST_EG2_SUSTAINLEVEL) + return "eg2.sustain"; + + if (destination == CONN_DST_KEYNUMBER) + return "keynumber"; + if (destination == CONN_DST_LEFT) + return "left"; + if (destination == CONN_DST_RIGHT) + return "right"; + if (destination == CONN_DST_CENTER) + return "center"; + if (destination == CONN_DST_LEFTREAR) + return "leftrear"; + if (destination == CONN_DST_RIGHTREAR) + return "rightrear"; + if (destination == CONN_DST_LFE_CHANNEL) + return "lfe_channel"; + if (destination == CONN_DST_CHORUS) + return "chorus"; + if (destination == CONN_DST_REVERB) + return "reverb"; + + if (destination == CONN_DST_VIB_FREQUENCY) + return "vib.freq"; + if (destination == CONN_DST_VIB_STARTDELAY) + return "vib.delay"; + + if (destination == CONN_DST_EG1_DELAYTIME) + return "eg1.delay"; + if (destination == CONN_DST_EG1_HOLDTIME) + return "eg1.hold"; + if (destination == CONN_DST_EG1_SHUTDOWNTIME) + return "eg1.shutdown"; + + if (destination == CONN_DST_EG2_DELAYTIME) + return "eg2.delay"; + if (destination == CONN_DST_EG2_HOLDTIME) + return "eg.2hold"; + + if (destination == CONN_DST_FILTER_CUTOFF) + return "filter.cutoff"; // NOT SURE WITHOUT DLS 2 SPEC + if (destination == CONN_DST_FILTER_Q) + return "filter.q"; // NOT SURE WITHOUT DLS 2 SPEC + + return null; + } + + public static String getSourceName(int source) { + + if (source == CONN_SRC_NONE) + return "none"; + if (source == CONN_SRC_LFO) + return "lfo"; + if (source == CONN_SRC_KEYONVELOCITY) + return "keyonvelocity"; + if (source == CONN_SRC_KEYNUMBER) + return "keynumber"; + if (source == CONN_SRC_EG1) + return "eg1"; + if (source == CONN_SRC_EG2) + return "eg2"; + if (source == CONN_SRC_PITCHWHEEL) + return "pitchweel"; + if (source == CONN_SRC_CC1) + return "cc1"; + if (source == CONN_SRC_CC7) + return "cc7"; + if (source == CONN_SRC_CC10) + return "c10"; + if (source == CONN_SRC_CC11) + return "cc11"; + + if (source == CONN_SRC_POLYPRESSURE) + return "polypressure"; + if (source == CONN_SRC_CHANNELPRESSURE) + return "channelpressure"; + if (source == CONN_SRC_VIBRATO) + return "vibrato"; + if (source == CONN_SRC_MONOPRESSURE) + return "monopressure"; + if (source == CONN_SRC_CC91) + return "cc91"; + if (source == CONN_SRC_CC93) + return "cc93"; + return null; + } + + public int getDestination() { + return destination; + } + + public void setDestination(int destination) { + this.destination = destination; + } + + public int getScale() { + return scale; + } + + public void setScale(int scale) { + this.scale = scale; + } + + public int getSource() { + return source; + } + + public void setSource(int source) { + this.source = source; + } + + public int getVersion() { + return version; + } + + public void setVersion(int version) { + this.version = version; + } + + public int getTransform() { + return transform; + } + + public void setTransform(int transform) { + this.transform = transform; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSRegion.java b/jdk/src/share/classes/com/sun/media/sound/DLSRegion.java new file mode 100644 index 00000000000..17e57a3b3cf --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSRegion.java @@ -0,0 +1,150 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class is used to store region parts for instrument. + * A region has a velocity and key range which it response to. + * And it has a list of modulators/articulators which + * is used how to synthesize a single voice. + * It is stored inside a "rgn " List Chunk inside DLS files. + * + * @author Karl Helgason + */ +public class DLSRegion { + + public final static int OPTION_SELFNONEXCLUSIVE = 0x0001; + protected List modulators = new ArrayList(); + protected int keyfrom; + protected int keyto; + protected int velfrom; + protected int velto; + protected int options; + protected int exclusiveClass; + protected int fusoptions; + protected int phasegroup; + protected long channel; + protected DLSSample sample = null; + protected DLSSampleOptions sampleoptions; + + public List getModulators() { + return modulators; + } + + public long getChannel() { + return channel; + } + + public void setChannel(long channel) { + this.channel = channel; + } + + public int getExclusiveClass() { + return exclusiveClass; + } + + public void setExclusiveClass(int exclusiveClass) { + this.exclusiveClass = exclusiveClass; + } + + public int getFusoptions() { + return fusoptions; + } + + public void setFusoptions(int fusoptions) { + this.fusoptions = fusoptions; + } + + public int getKeyfrom() { + return keyfrom; + } + + public void setKeyfrom(int keyfrom) { + this.keyfrom = keyfrom; + } + + public int getKeyto() { + return keyto; + } + + public void setKeyto(int keyto) { + this.keyto = keyto; + } + + public int getOptions() { + return options; + } + + public void setOptions(int options) { + this.options = options; + } + + public int getPhasegroup() { + return phasegroup; + } + + public void setPhasegroup(int phasegroup) { + this.phasegroup = phasegroup; + } + + public DLSSample getSample() { + return sample; + } + + public void setSample(DLSSample sample) { + this.sample = sample; + } + + public int getVelfrom() { + return velfrom; + } + + public void setVelfrom(int velfrom) { + this.velfrom = velfrom; + } + + public int getVelto() { + return velto; + } + + public void setVelto(int velto) { + this.velto = velto; + } + + public void setModulators(List modulators) { + this.modulators = modulators; + } + + public DLSSampleOptions getSampleoptions() { + return sampleoptions; + } + + public void setSampleoptions(DLSSampleOptions sampleOptions) { + this.sampleoptions = sampleOptions; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSSample.java b/jdk/src/share/classes/com/sun/media/sound/DLSSample.java new file mode 100644 index 00000000000..b75b2a9a94c --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSSample.java @@ -0,0 +1,122 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.InputStream; +import javax.sound.midi.Soundbank; +import javax.sound.midi.SoundbankResource; +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; + +/** + * This class is used to store the sample data itself. + * A sample is encoded as PCM audio stream + * and in DLS Level 1 files it is always a mono 8/16 bit stream. + * They are stored just like RIFF WAVE files are stored. + * It is stored inside a "wave" List Chunk inside DLS files. + * + * @author Karl Helgason + */ +public class DLSSample extends SoundbankResource { + + protected byte[] guid = null; + protected DLSInfo info = new DLSInfo(); + protected DLSSampleOptions sampleoptions; + protected ModelByteBuffer data; + protected AudioFormat format; + + public DLSSample(Soundbank soundBank) { + super(soundBank, null, AudioInputStream.class); + } + + public DLSSample() { + super(null, null, AudioInputStream.class); + } + + public DLSInfo getInfo() { + return info; + } + + public Object getData() { + AudioFormat format = getFormat(); + + InputStream is = data.getInputStream(); + if (is == null) + return null; + return new AudioInputStream(is, format, data.capacity()); + } + + public ModelByteBuffer getDataBuffer() { + return data; + } + + public AudioFormat getFormat() { + return format; + } + + public void setFormat(AudioFormat format) { + this.format = format; + } + + public void setData(ModelByteBuffer data) { + this.data = data; + } + + public void setData(byte[] data) { + this.data = new ModelByteBuffer(data); + } + + public void setData(byte[] data, int offset, int length) { + this.data = new ModelByteBuffer(data, offset, length); + } + + public String getName() { + return info.name; + } + + public void setName(String name) { + info.name = name; + } + + public DLSSampleOptions getSampleoptions() { + return sampleoptions; + } + + public void setSampleoptions(DLSSampleOptions sampleOptions) { + this.sampleoptions = sampleOptions; + } + + public String toString() { + return "Sample: " + info.name; + } + + public byte[] getGuid() { + return guid; + } + + public void setGuid(byte[] guid) { + this.guid = guid; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSSampleLoop.java b/jdk/src/share/classes/com/sun/media/sound/DLSSampleLoop.java new file mode 100644 index 00000000000..ee78d64fce0 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSSampleLoop.java @@ -0,0 +1,63 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * This class is used to store loop points inside DLSSampleOptions class. + * + * @author Karl Helgason + */ +public class DLSSampleLoop { + + public final static int LOOP_TYPE_FORWARD = 0; + public final static int LOOP_TYPE_RELEASE = 1; + protected long type; + protected long start; + protected long length; + + public long getLength() { + return length; + } + + public void setLength(long length) { + this.length = length; + } + + public long getStart() { + return start; + } + + public void setStart(long start) { + this.start = start; + } + + public long getType() { + return type; + } + + public void setType(long type) { + this.type = type; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSSampleOptions.java b/jdk/src/share/classes/com/sun/media/sound/DLSSampleOptions.java new file mode 100644 index 00000000000..849644b6cc7 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSSampleOptions.java @@ -0,0 +1,80 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class stores options how to playback sampled data like pitch/tuning, + * attenuation and loops. + * It is stored as a "wsmp" chunk inside DLS files. + * + * @author Karl Helgason + */ +public class DLSSampleOptions { + + protected int unitynote; + protected short finetune; + protected int attenuation; + protected long options; + protected List loops = new ArrayList(); + + public int getAttenuation() { + return attenuation; + } + + public void setAttenuation(int attenuation) { + this.attenuation = attenuation; + } + + public short getFinetune() { + return finetune; + } + + public void setFinetune(short finetune) { + this.finetune = finetune; + } + + public List getLoops() { + return loops; + } + + public long getOptions() { + return options; + } + + public void setOptions(long options) { + this.options = options; + } + + public int getUnitynote() { + return unitynote; + } + + public void setUnitynote(int unitynote) { + this.unitynote = unitynote; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java b/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java new file mode 100644 index 00000000000..027fa75b472 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSSoundbank.java @@ -0,0 +1,1287 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Stack; + +import javax.sound.midi.Instrument; +import javax.sound.midi.Patch; +import javax.sound.midi.Soundbank; +import javax.sound.midi.SoundbankResource; +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.AudioFormat.Encoding; + +/** + * A DLS Level 1 and Level 2 soundbank reader (from files/url/streams). + * + * @author Karl Helgason + */ +public class DLSSoundbank implements Soundbank { + + static private class DLSID { + long i1; + int s1; + int s2; + int x1; + int x2; + int x3; + int x4; + int x5; + int x6; + int x7; + int x8; + + private DLSID() { + } + + public DLSID(long i1, int s1, int s2, int x1, int x2, int x3, int x4, + int x5, int x6, int x7, int x8) { + this.i1 = i1; + this.s1 = s1; + this.s2 = s2; + this.x1 = x1; + this.x2 = x2; + this.x3 = x3; + this.x4 = x4; + this.x5 = x5; + this.x6 = x6; + this.x7 = x7; + this.x8 = x8; + } + + public static DLSID read(RIFFReader riff) throws IOException { + DLSID d = new DLSID(); + d.i1 = riff.readUnsignedInt(); + d.s1 = riff.readUnsignedShort(); + d.s2 = riff.readUnsignedShort(); + d.x1 = riff.readUnsignedByte(); + d.x2 = riff.readUnsignedByte(); + d.x3 = riff.readUnsignedByte(); + d.x4 = riff.readUnsignedByte(); + d.x5 = riff.readUnsignedByte(); + d.x6 = riff.readUnsignedByte(); + d.x7 = riff.readUnsignedByte(); + d.x8 = riff.readUnsignedByte(); + return d; + } + + public int hashCode() { + return (int)i1; + } + + public boolean equals(Object obj) { + if (!(obj instanceof DLSID)) { + return false; + } + DLSID t = (DLSID) obj; + return i1 == t.i1 && s1 == t.s1 && s2 == t.s2 + && x1 == t.x1 && x2 == t.x2 && x3 == t.x3 && x4 == t.x4 + && x5 == t.x5 && x6 == t.x6 && x7 == t.x7 && x8 == t.x8; + } + } + + /** X = X & Y */ + private static final int DLS_CDL_AND = 0x0001; + /** X = X | Y */ + private static final int DLS_CDL_OR = 0x0002; + /** X = X ^ Y */ + private static final int DLS_CDL_XOR = 0x0003; + /** X = X + Y */ + private static final int DLS_CDL_ADD = 0x0004; + /** X = X - Y */ + private static final int DLS_CDL_SUBTRACT = 0x0005; + /** X = X * Y */ + private static final int DLS_CDL_MULTIPLY = 0x0006; + /** X = X / Y */ + private static final int DLS_CDL_DIVIDE = 0x0007; + /** X = X && Y */ + private static final int DLS_CDL_LOGICAL_AND = 0x0008; + /** X = X || Y */ + private static final int DLS_CDL_LOGICAL_OR = 0x0009; + /** X = (X < Y) */ + private static final int DLS_CDL_LT = 0x000A; + /** X = (X <= Y) */ + private static final int DLS_CDL_LE = 0x000B; + /** X = (X > Y) */ + private static final int DLS_CDL_GT = 0x000C; + /** X = (X >= Y) */ + private static final int DLS_CDL_GE = 0x000D; + /** X = (X == Y) */ + private static final int DLS_CDL_EQ = 0x000E; + /** X = !X */ + private static final int DLS_CDL_NOT = 0x000F; + /** 32-bit constant */ + private static final int DLS_CDL_CONST = 0x0010; + /** 32-bit value returned from query */ + private static final int DLS_CDL_QUERY = 0x0011; + /** 32-bit value returned from query */ + private static final int DLS_CDL_QUERYSUPPORTED = 0x0012; + + private static final DLSID DLSID_GMInHardware = new DLSID(0x178f2f24, + 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + private static final DLSID DLSID_GSInHardware = new DLSID(0x178f2f25, + 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + private static final DLSID DLSID_XGInHardware = new DLSID(0x178f2f26, + 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + private static final DLSID DLSID_SupportsDLS1 = new DLSID(0x178f2f27, + 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + private static final DLSID DLSID_SupportsDLS2 = new DLSID(0xf14599e5, + 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); + private static final DLSID DLSID_SampleMemorySize = new DLSID(0x178f2f28, + 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + private static final DLSID DLSID_ManufacturersID = new DLSID(0xb03e1181, + 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); + private static final DLSID DLSID_ProductID = new DLSID(0xb03e1182, + 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); + private static final DLSID DLSID_SamplePlaybackRate = new DLSID(0x2a91f713, + 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); + + private long major = -1; + private long minor = -1; + + private DLSInfo info = new DLSInfo(); + + private List instruments = new ArrayList(); + private List samples = new ArrayList(); + + private boolean largeFormat = false; + private File sampleFile; + + public DLSSoundbank() { + } + + public DLSSoundbank(URL url) throws IOException { + InputStream is = url.openStream(); + try { + readSoundbank(is); + } finally { + is.close(); + } + } + + public DLSSoundbank(File file) throws IOException { + largeFormat = true; + sampleFile = file; + InputStream is = new FileInputStream(file); + try { + readSoundbank(is); + } finally { + is.close(); + } + } + + public DLSSoundbank(InputStream inputstream) throws IOException { + readSoundbank(inputstream); + } + + private void readSoundbank(InputStream inputstream) throws IOException { + RIFFReader riff = new RIFFReader(inputstream); + if (!riff.getFormat().equals("RIFF")) { + throw new RIFFInvalidFormatException( + "Input stream is not a valid RIFF stream!"); + } + if (!riff.getType().equals("DLS ")) { + throw new RIFFInvalidFormatException( + "Input stream is not a valid DLS soundbank!"); + } + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + if (chunk.getFormat().equals("LIST")) { + if (chunk.getType().equals("INFO")) + readInfoChunk(chunk); + if (chunk.getType().equals("lins")) + readLinsChunk(chunk); + if (chunk.getType().equals("wvpl")) + readWvplChunk(chunk); + } else { + if (chunk.getFormat().equals("cdl ")) { + if (!readCdlChunk(chunk)) { + throw new RIFFInvalidFormatException( + "DLS file isn't supported!"); + } + } + if (chunk.getFormat().equals("colh")) { + // skipped because we will load the entire bank into memory + // long instrumentcount = chunk.readUnsignedInt(); + // System.out.println("instrumentcount = "+ instrumentcount); + } + if (chunk.getFormat().equals("ptbl")) { + // Pool Table Chunk + // skipped because we will load the entire bank into memory + } + if (chunk.getFormat().equals("vers")) { + major = chunk.readUnsignedInt(); + minor = chunk.readUnsignedInt(); + } + } + } + + for (Map.Entry entry : temp_rgnassign.entrySet()) { + entry.getKey().sample = samples.get((int)entry.getValue().longValue()); + } + + temp_rgnassign = null; + } + + private boolean cdlIsQuerySupported(DLSID uuid) { + return uuid.equals(DLSID_GMInHardware) + || uuid.equals(DLSID_GSInHardware) + || uuid.equals(DLSID_XGInHardware) + || uuid.equals(DLSID_SupportsDLS1) + || uuid.equals(DLSID_SupportsDLS2) + || uuid.equals(DLSID_SampleMemorySize) + || uuid.equals(DLSID_ManufacturersID) + || uuid.equals(DLSID_ProductID) + || uuid.equals(DLSID_SamplePlaybackRate); + } + + private long cdlQuery(DLSID uuid) { + if (uuid.equals(DLSID_GMInHardware)) + return 1; + if (uuid.equals(DLSID_GSInHardware)) + return 0; + if (uuid.equals(DLSID_XGInHardware)) + return 0; + if (uuid.equals(DLSID_SupportsDLS1)) + return 1; + if (uuid.equals(DLSID_SupportsDLS2)) + return 1; + if (uuid.equals(DLSID_SampleMemorySize)) + return Runtime.getRuntime().totalMemory(); + if (uuid.equals(DLSID_ManufacturersID)) + return 0; + if (uuid.equals(DLSID_ProductID)) + return 0; + if (uuid.equals(DLSID_SamplePlaybackRate)) + return 44100; + return 0; + } + + + // Reading cdl-ck Chunk + // "cdl " chunk can only appear inside : DLS,lart,lar2,rgn,rgn2 + private boolean readCdlChunk(RIFFReader riff) throws IOException { + + DLSID uuid; + long x; + long y; + Stack stack = new Stack(); + + while (riff.available() != 0) { + int opcode = riff.readUnsignedShort(); + switch (opcode) { + case DLS_CDL_AND: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(((x != 0) && (y != 0)) ? 1 : 0)); + break; + case DLS_CDL_OR: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(((x != 0) || (y != 0)) ? 1 : 0)); + break; + case DLS_CDL_XOR: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(((x != 0) ^ (y != 0)) ? 1 : 0)); + break; + case DLS_CDL_ADD: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(x + y)); + break; + case DLS_CDL_SUBTRACT: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(x - y)); + break; + case DLS_CDL_MULTIPLY: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(x * y)); + break; + case DLS_CDL_DIVIDE: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(x / y)); + break; + case DLS_CDL_LOGICAL_AND: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(((x != 0) && (y != 0)) ? 1 : 0)); + break; + case DLS_CDL_LOGICAL_OR: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf(((x != 0) || (y != 0)) ? 1 : 0)); + break; + case DLS_CDL_LT: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf((x < y) ? 1 : 0)); + break; + case DLS_CDL_LE: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf((x <= y) ? 1 : 0)); + break; + case DLS_CDL_GT: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf((x > y) ? 1 : 0)); + break; + case DLS_CDL_GE: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf((x >= y) ? 1 : 0)); + break; + case DLS_CDL_EQ: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf((x == y) ? 1 : 0)); + break; + case DLS_CDL_NOT: + x = stack.pop(); + y = stack.pop(); + stack.push(Long.valueOf((x == 0) ? 1 : 0)); + break; + case DLS_CDL_CONST: + stack.push(Long.valueOf(riff.readUnsignedInt())); + break; + case DLS_CDL_QUERY: + uuid = DLSID.read(riff); + stack.push(cdlQuery(uuid)); + break; + case DLS_CDL_QUERYSUPPORTED: + uuid = DLSID.read(riff); + stack.push(Long.valueOf(cdlIsQuerySupported(uuid) ? 1 : 0)); + break; + default: + break; + } + } + if (stack.isEmpty()) + return false; + + return stack.pop() == 1; + } + + private void readInfoChunk(RIFFReader riff) throws IOException { + info.name = null; + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + String format = chunk.getFormat(); + if (format.equals("INAM")) + info.name = chunk.readString(chunk.available()); + else if (format.equals("ICRD")) + info.creationDate = chunk.readString(chunk.available()); + else if (format.equals("IENG")) + info.engineers = chunk.readString(chunk.available()); + else if (format.equals("IPRD")) + info.product = chunk.readString(chunk.available()); + else if (format.equals("ICOP")) + info.copyright = chunk.readString(chunk.available()); + else if (format.equals("ICMT")) + info.comments = chunk.readString(chunk.available()); + else if (format.equals("ISFT")) + info.tools = chunk.readString(chunk.available()); + else if (format.equals("IARL")) + info.archival_location = chunk.readString(chunk.available()); + else if (format.equals("IART")) + info.artist = chunk.readString(chunk.available()); + else if (format.equals("ICMS")) + info.commissioned = chunk.readString(chunk.available()); + else if (format.equals("IGNR")) + info.genre = chunk.readString(chunk.available()); + else if (format.equals("IKEY")) + info.keywords = chunk.readString(chunk.available()); + else if (format.equals("IMED")) + info.medium = chunk.readString(chunk.available()); + else if (format.equals("ISBJ")) + info.subject = chunk.readString(chunk.available()); + else if (format.equals("ISRC")) + info.source = chunk.readString(chunk.available()); + else if (format.equals("ISRF")) + info.source_form = chunk.readString(chunk.available()); + else if (format.equals("ITCH")) + info.technician = chunk.readString(chunk.available()); + } + } + + private void readLinsChunk(RIFFReader riff) throws IOException { + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + if (chunk.getFormat().equals("LIST")) { + if (chunk.getType().equals("ins ")) + readInsChunk(chunk); + } + } + } + + private void readInsChunk(RIFFReader riff) throws IOException { + DLSInstrument instrument = new DLSInstrument(this); + + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + String format = chunk.getFormat(); + if (format.equals("LIST")) { + if (chunk.getType().equals("INFO")) { + readInsInfoChunk(instrument, chunk); + } + if (chunk.getType().equals("lrgn")) { + while (chunk.hasNextChunk()) { + RIFFReader subchunk = chunk.nextChunk(); + if (subchunk.getFormat().equals("LIST")) { + if (subchunk.getType().equals("rgn ")) { + DLSRegion split = new DLSRegion(); + if (readRgnChunk(split, subchunk)) + instrument.getRegions().add(split); + } + if (subchunk.getType().equals("rgn2")) { + // support for DLS level 2 regions + DLSRegion split = new DLSRegion(); + if (readRgnChunk(split, subchunk)) + instrument.getRegions().add(split); + } + } + } + } + if (chunk.getType().equals("lart")) { + List modlist = new ArrayList(); + while (chunk.hasNextChunk()) { + RIFFReader subchunk = chunk.nextChunk(); + if (chunk.getFormat().equals("cdl ")) { + if (!readCdlChunk(chunk)) { + modlist.clear(); + break; + } + } + if (subchunk.getFormat().equals("art1")) + readArt1Chunk(modlist, subchunk); + } + instrument.getModulators().addAll(modlist); + } + if (chunk.getType().equals("lar2")) { + // support for DLS level 2 ART + List modlist = new ArrayList(); + while (chunk.hasNextChunk()) { + RIFFReader subchunk = chunk.nextChunk(); + if (chunk.getFormat().equals("cdl ")) { + if (!readCdlChunk(chunk)) { + modlist.clear(); + break; + } + } + if (subchunk.getFormat().equals("art2")) + readArt2Chunk(modlist, subchunk); + } + instrument.getModulators().addAll(modlist); + } + } else { + if (format.equals("dlid")) { + instrument.guid = new byte[16]; + chunk.readFully(instrument.guid); + } + if (format.equals("insh")) { + chunk.readUnsignedInt(); // Read Region Count - ignored + + int bank = chunk.read(); // LSB + bank += (chunk.read() & 127) << 7; // MSB + chunk.read(); // Read Reserved byte + int drumins = chunk.read(); // Drum Instrument + + int id = chunk.read() & 127; // Read only first 7 bits + chunk.read(); // Read Reserved byte + chunk.read(); // Read Reserved byte + chunk.read(); // Read Reserved byte + + instrument.bank = bank; + instrument.preset = (int) id; + instrument.druminstrument = (drumins & 128) > 0; + //System.out.println("bank="+bank+" drumkit="+drumkit + // +" id="+id); + } + + } + } + instruments.add(instrument); + } + + private void readArt1Chunk(List modulators, RIFFReader riff) + throws IOException { + long size = riff.readUnsignedInt(); + long count = riff.readUnsignedInt(); + + if (size - 8 != 0) + riff.skipBytes(size - 8); + + for (int i = 0; i < count; i++) { + DLSModulator modulator = new DLSModulator(); + modulator.version = 1; + modulator.source = riff.readUnsignedShort(); + modulator.control = riff.readUnsignedShort(); + modulator.destination = riff.readUnsignedShort(); + modulator.transform = riff.readUnsignedShort(); + modulator.scale = riff.readInt(); + modulators.add(modulator); + } + } + + private void readArt2Chunk(List modulators, RIFFReader riff) + throws IOException { + long size = riff.readUnsignedInt(); + long count = riff.readUnsignedInt(); + + if (size - 8 != 0) + riff.skipBytes(size - 8); + + for (int i = 0; i < count; i++) { + DLSModulator modulator = new DLSModulator(); + modulator.version = 2; + modulator.source = riff.readUnsignedShort(); + modulator.control = riff.readUnsignedShort(); + modulator.destination = riff.readUnsignedShort(); + modulator.transform = riff.readUnsignedShort(); + modulator.scale = riff.readInt(); + modulators.add(modulator); + } + } + + private Map temp_rgnassign = new HashMap(); + + private boolean readRgnChunk(DLSRegion split, RIFFReader riff) + throws IOException { + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + String format = chunk.getFormat(); + if (format.equals("LIST")) { + if (chunk.getType().equals("lart")) { + List modlist = new ArrayList(); + while (chunk.hasNextChunk()) { + RIFFReader subchunk = chunk.nextChunk(); + if (chunk.getFormat().equals("cdl ")) { + if (!readCdlChunk(chunk)) { + modlist.clear(); + break; + } + } + if (subchunk.getFormat().equals("art1")) + readArt1Chunk(modlist, subchunk); + } + split.getModulators().addAll(modlist); + } + if (chunk.getType().equals("lar2")) { + // support for DLS level 2 ART + List modlist = new ArrayList(); + while (chunk.hasNextChunk()) { + RIFFReader subchunk = chunk.nextChunk(); + if (chunk.getFormat().equals("cdl ")) { + if (!readCdlChunk(chunk)) { + modlist.clear(); + break; + } + } + if (subchunk.getFormat().equals("art2")) + readArt2Chunk(modlist, subchunk); + } + split.getModulators().addAll(modlist); + } + } else { + + if (format.equals("cdl ")) { + if (!readCdlChunk(chunk)) + return false; + } + if (format.equals("rgnh")) { + split.keyfrom = chunk.readUnsignedShort(); + split.keyto = chunk.readUnsignedShort(); + split.velfrom = chunk.readUnsignedShort(); + split.velto = chunk.readUnsignedShort(); + split.options = chunk.readUnsignedShort(); + split.exclusiveClass = chunk.readUnsignedShort(); + } + if (format.equals("wlnk")) { + split.fusoptions = chunk.readUnsignedShort(); + split.phasegroup = chunk.readUnsignedShort(); + split.channel = chunk.readUnsignedInt(); + long sampleid = chunk.readUnsignedInt(); + temp_rgnassign.put(split, sampleid); + } + if (format.equals("wsmp")) { + split.sampleoptions = new DLSSampleOptions(); + readWsmpChunk(split.sampleoptions, chunk); + } + } + } + return true; + } + + private void readWsmpChunk(DLSSampleOptions sampleOptions, RIFFReader riff) + throws IOException { + long size = riff.readUnsignedInt(); + sampleOptions.unitynote = riff.readUnsignedShort(); + sampleOptions.finetune = riff.readShort(); + sampleOptions.attenuation = riff.readInt(); + sampleOptions.options = riff.readUnsignedInt(); + long loops = riff.readInt(); + + if (size > 20) + riff.skipBytes(size - 20); + + for (int i = 0; i < loops; i++) { + DLSSampleLoop loop = new DLSSampleLoop(); + long size2 = riff.readUnsignedInt(); + loop.type = riff.readUnsignedInt(); + loop.start = riff.readUnsignedInt(); + loop.length = riff.readUnsignedInt(); + sampleOptions.loops.add(loop); + if (size2 > 16) + riff.skipBytes(size2 - 16); + } + } + + private void readInsInfoChunk(DLSInstrument dlsinstrument, RIFFReader riff) + throws IOException { + dlsinstrument.info.name = null; + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + String format = chunk.getFormat(); + if (format.equals("INAM")) { + dlsinstrument.info.name = chunk.readString(chunk.available()); + } else if (format.equals("ICRD")) { + dlsinstrument.info.creationDate = + chunk.readString(chunk.available()); + } else if (format.equals("IENG")) { + dlsinstrument.info.engineers = + chunk.readString(chunk.available()); + } else if (format.equals("IPRD")) { + dlsinstrument.info.product = chunk.readString(chunk.available()); + } else if (format.equals("ICOP")) { + dlsinstrument.info.copyright = + chunk.readString(chunk.available()); + } else if (format.equals("ICMT")) { + dlsinstrument.info.comments = + chunk.readString(chunk.available()); + } else if (format.equals("ISFT")) { + dlsinstrument.info.tools = chunk.readString(chunk.available()); + } else if (format.equals("IARL")) { + dlsinstrument.info.archival_location = + chunk.readString(chunk.available()); + } else if (format.equals("IART")) { + dlsinstrument.info.artist = chunk.readString(chunk.available()); + } else if (format.equals("ICMS")) { + dlsinstrument.info.commissioned = + chunk.readString(chunk.available()); + } else if (format.equals("IGNR")) { + dlsinstrument.info.genre = chunk.readString(chunk.available()); + } else if (format.equals("IKEY")) { + dlsinstrument.info.keywords = + chunk.readString(chunk.available()); + } else if (format.equals("IMED")) { + dlsinstrument.info.medium = chunk.readString(chunk.available()); + } else if (format.equals("ISBJ")) { + dlsinstrument.info.subject = chunk.readString(chunk.available()); + } else if (format.equals("ISRC")) { + dlsinstrument.info.source = chunk.readString(chunk.available()); + } else if (format.equals("ISRF")) { + dlsinstrument.info.source_form = + chunk.readString(chunk.available()); + } else if (format.equals("ITCH")) { + dlsinstrument.info.technician = + chunk.readString(chunk.available()); + } + } + } + + private void readWvplChunk(RIFFReader riff) throws IOException { + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + if (chunk.getFormat().equals("LIST")) { + if (chunk.getType().equals("wave")) + readWaveChunk(chunk); + } + } + } + + private void readWaveChunk(RIFFReader riff) throws IOException { + DLSSample sample = new DLSSample(this); + + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + String format = chunk.getFormat(); + if (format.equals("LIST")) { + if (chunk.getType().equals("INFO")) { + readWaveInfoChunk(sample, chunk); + } + } else { + if (format.equals("dlid")) { + sample.guid = new byte[16]; + chunk.readFully(sample.guid); + } + + if (format.equals("fmt ")) { + int sampleformat = chunk.readUnsignedShort(); + if (sampleformat != 1 && sampleformat != 3) { + throw new RIFFInvalidDataException( + "Only PCM samples are supported!"); + } + int channels = chunk.readUnsignedShort(); + long samplerate = chunk.readUnsignedInt(); + // bytes per sec + /* long framerate = */ chunk.readUnsignedInt(); + // block align, framesize + int framesize = chunk.readUnsignedShort(); + int bits = chunk.readUnsignedShort(); + AudioFormat audioformat = null; + if (sampleformat == 1) { + if (bits == 8) { + audioformat = new AudioFormat( + Encoding.PCM_UNSIGNED, samplerate, bits, + channels, framesize, samplerate, false); + } else { + audioformat = new AudioFormat( + Encoding.PCM_SIGNED, samplerate, bits, + channels, framesize, samplerate, false); + } + } + if (sampleformat == 3) { + audioformat = new AudioFormat( + AudioFloatConverter.PCM_FLOAT, samplerate, bits, + channels, framesize, samplerate, false); + } + + sample.format = audioformat; + } + + if (format.equals("data")) { + if (largeFormat) { + sample.setData(new ModelByteBuffer(sampleFile, + chunk.getFilePointer(), chunk.available())); + } else { + byte[] buffer = new byte[chunk.available()]; + // chunk.read(buffer); + sample.setData(buffer); + + int read = 0; + int avail = chunk.available(); + while (read != avail) { + if (avail - read > 65536) { + chunk.readFully(buffer, read, 65536); + read += 65536; + } else { + chunk.readFully(buffer, read, avail - read); + read = avail; + } + } + } + } + + if (format.equals("wsmp")) { + sample.sampleoptions = new DLSSampleOptions(); + readWsmpChunk(sample.sampleoptions, chunk); + } + } + } + + samples.add(sample); + + } + + private void readWaveInfoChunk(DLSSample dlssample, RIFFReader riff) + throws IOException { + dlssample.info.name = null; + while (riff.hasNextChunk()) { + RIFFReader chunk = riff.nextChunk(); + String format = chunk.getFormat(); + if (format.equals("INAM")) { + dlssample.info.name = chunk.readString(chunk.available()); + } else if (format.equals("ICRD")) { + dlssample.info.creationDate = + chunk.readString(chunk.available()); + } else if (format.equals("IENG")) { + dlssample.info.engineers = chunk.readString(chunk.available()); + } else if (format.equals("IPRD")) { + dlssample.info.product = chunk.readString(chunk.available()); + } else if (format.equals("ICOP")) { + dlssample.info.copyright = chunk.readString(chunk.available()); + } else if (format.equals("ICMT")) { + dlssample.info.comments = chunk.readString(chunk.available()); + } else if (format.equals("ISFT")) { + dlssample.info.tools = chunk.readString(chunk.available()); + } else if (format.equals("IARL")) { + dlssample.info.archival_location = + chunk.readString(chunk.available()); + } else if (format.equals("IART")) { + dlssample.info.artist = chunk.readString(chunk.available()); + } else if (format.equals("ICMS")) { + dlssample.info.commissioned = + chunk.readString(chunk.available()); + } else if (format.equals("IGNR")) { + dlssample.info.genre = chunk.readString(chunk.available()); + } else if (format.equals("IKEY")) { + dlssample.info.keywords = chunk.readString(chunk.available()); + } else if (format.equals("IMED")) { + dlssample.info.medium = chunk.readString(chunk.available()); + } else if (format.equals("ISBJ")) { + dlssample.info.subject = chunk.readString(chunk.available()); + } else if (format.equals("ISRC")) { + dlssample.info.source = chunk.readString(chunk.available()); + } else if (format.equals("ISRF")) { + dlssample.info.source_form = chunk.readString(chunk.available()); + } else if (format.equals("ITCH")) { + dlssample.info.technician = chunk.readString(chunk.available()); + } + } + } + + public void save(String name) throws IOException { + writeSoundbank(new RIFFWriter(name, "DLS ")); + } + + public void save(File file) throws IOException { + writeSoundbank(new RIFFWriter(file, "DLS ")); + } + + public void save(OutputStream out) throws IOException { + writeSoundbank(new RIFFWriter(out, "DLS ")); + } + + private void writeSoundbank(RIFFWriter writer) throws IOException { + RIFFWriter colh_chunk = writer.writeChunk("colh"); + colh_chunk.writeUnsignedInt(instruments.size()); + + if (major != -1 && minor != -1) { + RIFFWriter vers_chunk = writer.writeChunk("vers"); + vers_chunk.writeUnsignedInt(major); + vers_chunk.writeUnsignedInt(minor); + } + + writeInstruments(writer.writeList("lins")); + + RIFFWriter ptbl = writer.writeChunk("ptbl"); + ptbl.writeUnsignedInt(8); + ptbl.writeUnsignedInt(samples.size()); + long ptbl_offset = writer.getFilePointer(); + for (int i = 0; i < samples.size(); i++) + ptbl.writeUnsignedInt(0); + + RIFFWriter wvpl = writer.writeList("wvpl"); + long off = wvpl.getFilePointer(); + List offsettable = new ArrayList(); + for (DLSSample sample : samples) { + offsettable.add(Long.valueOf(wvpl.getFilePointer() - off)); + writeSample(wvpl.writeList("wave"), sample); + } + + // small cheat, we are going to rewrite data back in wvpl + long bak = writer.getFilePointer(); + writer.seek(ptbl_offset); + writer.setWriteOverride(true); + for (Long offset : offsettable) + writer.writeUnsignedInt(offset.longValue()); + writer.setWriteOverride(false); + writer.seek(bak); + + writeInfo(writer.writeList("INFO"), info); + + writer.close(); + } + + private void writeSample(RIFFWriter writer, DLSSample sample) + throws IOException { + + AudioFormat audioformat = sample.getFormat(); + + Encoding encoding = audioformat.getEncoding(); + float sampleRate = audioformat.getSampleRate(); + int sampleSizeInBits = audioformat.getSampleSizeInBits(); + int channels = audioformat.getChannels(); + int frameSize = audioformat.getFrameSize(); + float frameRate = audioformat.getFrameRate(); + boolean bigEndian = audioformat.isBigEndian(); + + boolean convert_needed = false; + + if (audioformat.getSampleSizeInBits() == 8) { + if (!encoding.equals(Encoding.PCM_UNSIGNED)) { + encoding = Encoding.PCM_UNSIGNED; + convert_needed = true; + } + } else { + if (!encoding.equals(Encoding.PCM_SIGNED)) { + encoding = Encoding.PCM_SIGNED; + convert_needed = true; + } + if (bigEndian) { + bigEndian = false; + convert_needed = true; + } + } + + if (convert_needed) { + audioformat = new AudioFormat(encoding, sampleRate, + sampleSizeInBits, channels, frameSize, frameRate, bigEndian); + } + + // fmt + RIFFWriter fmt_chunk = writer.writeChunk("fmt "); + int sampleformat = 0; + if (audioformat.getEncoding().equals(Encoding.PCM_UNSIGNED)) + sampleformat = 1; + else if (audioformat.getEncoding().equals(Encoding.PCM_SIGNED)) + sampleformat = 1; + else if (audioformat.getEncoding().equals(AudioFloatConverter.PCM_FLOAT)) + sampleformat = 3; + + fmt_chunk.writeUnsignedShort(sampleformat); + fmt_chunk.writeUnsignedShort(audioformat.getChannels()); + fmt_chunk.writeUnsignedInt((long) audioformat.getSampleRate()); + long srate = ((long)audioformat.getFrameRate())*audioformat.getFrameSize(); + fmt_chunk.writeUnsignedInt(srate); + fmt_chunk.writeUnsignedShort(audioformat.getFrameSize()); + fmt_chunk.writeUnsignedShort(audioformat.getSampleSizeInBits()); + fmt_chunk.write(0); + fmt_chunk.write(0); + + writeSampleOptions(writer.writeChunk("wsmp"), sample.sampleoptions); + + if (convert_needed) { + RIFFWriter data_chunk = writer.writeChunk("data"); + AudioInputStream stream = AudioSystem.getAudioInputStream( + audioformat, (AudioInputStream)sample.getData()); + byte[] buff = new byte[1024]; + int ret; + while ((ret = stream.read(buff)) != -1) { + data_chunk.write(buff, 0, ret); + } + } else { + RIFFWriter data_chunk = writer.writeChunk("data"); + ModelByteBuffer databuff = sample.getDataBuffer(); + databuff.writeTo(data_chunk); + /* + data_chunk.write(databuff.array(), + databuff.arrayOffset(), + databuff.capacity()); + */ + } + + writeInfo(writer.writeList("INFO"), sample.info); + } + + private void writeInstruments(RIFFWriter writer) throws IOException { + for (DLSInstrument instrument : instruments) { + writeInstrument(writer.writeList("ins "), instrument); + } + } + + private void writeInstrument(RIFFWriter writer, DLSInstrument instrument) + throws IOException { + + int art1_count = 0; + int art2_count = 0; + for (DLSModulator modulator : instrument.getModulators()) { + if (modulator.version == 1) + art1_count++; + if (modulator.version == 2) + art2_count++; + } + for (DLSRegion region : instrument.regions) { + for (DLSModulator modulator : region.getModulators()) { + if (modulator.version == 1) + art1_count++; + if (modulator.version == 2) + art2_count++; + } + } + + int version = 1; + if (art2_count > 0) + version = 2; + + RIFFWriter insh_chunk = writer.writeChunk("insh"); + insh_chunk.writeUnsignedInt(instrument.getRegions().size()); + insh_chunk.writeUnsignedInt(instrument.bank + + (instrument.druminstrument ? 2147483648L : 0)); + insh_chunk.writeUnsignedInt(instrument.preset); + + RIFFWriter lrgn = writer.writeList("lrgn"); + for (DLSRegion region: instrument.regions) + writeRegion(lrgn, region, version); + + writeArticulators(writer, instrument.getModulators()); + + writeInfo(writer.writeList("INFO"), instrument.info); + + } + + private void writeArticulators(RIFFWriter writer, + List modulators) throws IOException { + int art1_count = 0; + int art2_count = 0; + for (DLSModulator modulator : modulators) { + if (modulator.version == 1) + art1_count++; + if (modulator.version == 2) + art2_count++; + } + if (art1_count > 0) { + RIFFWriter lar1 = writer.writeList("lart"); + RIFFWriter art1 = lar1.writeChunk("art1"); + art1.writeUnsignedInt(8); + art1.writeUnsignedInt(art1_count); + for (DLSModulator modulator : modulators) { + if (modulator.version == 1) { + art1.writeUnsignedShort(modulator.source); + art1.writeUnsignedShort(modulator.control); + art1.writeUnsignedShort(modulator.destination); + art1.writeUnsignedShort(modulator.transform); + art1.writeInt(modulator.scale); + } + } + } + if (art2_count > 0) { + RIFFWriter lar2 = writer.writeList("lar2"); + RIFFWriter art2 = lar2.writeChunk("art2"); + art2.writeUnsignedInt(8); + art2.writeUnsignedInt(art2_count); + for (DLSModulator modulator : modulators) { + if (modulator.version == 2) { + art2.writeUnsignedShort(modulator.source); + art2.writeUnsignedShort(modulator.control); + art2.writeUnsignedShort(modulator.destination); + art2.writeUnsignedShort(modulator.transform); + art2.writeInt(modulator.scale); + } + } + } + } + + private void writeRegion(RIFFWriter writer, DLSRegion region, int version) + throws IOException { + RIFFWriter rgns = null; + if (version == 1) + rgns = writer.writeList("rgn "); + if (version == 2) + rgns = writer.writeList("rgn2"); + if (rgns == null) + return; + + RIFFWriter rgnh = rgns.writeChunk("rgnh"); + rgnh.writeUnsignedShort(region.keyfrom); + rgnh.writeUnsignedShort(region.keyto); + rgnh.writeUnsignedShort(region.velfrom); + rgnh.writeUnsignedShort(region.velto); + rgnh.writeUnsignedShort(region.options); + rgnh.writeUnsignedShort(region.exclusiveClass); + + if (region.sampleoptions != null) + writeSampleOptions(rgns.writeChunk("wsmp"), region.sampleoptions); + + if (region.sample != null) { + if (samples.indexOf(region.sample) != -1) { + RIFFWriter wlnk = rgns.writeChunk("wlnk"); + wlnk.writeUnsignedShort(region.fusoptions); + wlnk.writeUnsignedShort(region.phasegroup); + wlnk.writeUnsignedInt(region.channel); + wlnk.writeUnsignedInt(samples.indexOf(region.sample)); + } + } + writeArticulators(rgns, region.getModulators()); + rgns.close(); + } + + private void writeSampleOptions(RIFFWriter wsmp, + DLSSampleOptions sampleoptions) throws IOException { + wsmp.writeUnsignedInt(20); + wsmp.writeUnsignedShort(sampleoptions.unitynote); + wsmp.writeShort(sampleoptions.finetune); + wsmp.writeInt(sampleoptions.attenuation); + wsmp.writeUnsignedInt(sampleoptions.options); + wsmp.writeInt(sampleoptions.loops.size()); + + for (DLSSampleLoop loop : sampleoptions.loops) { + wsmp.writeUnsignedInt(16); + wsmp.writeUnsignedInt(loop.type); + wsmp.writeUnsignedInt(loop.start); + wsmp.writeUnsignedInt(loop.length); + } + } + + private void writeInfoStringChunk(RIFFWriter writer, + String name, String value) throws IOException { + if (value == null) + return; + RIFFWriter chunk = writer.writeChunk(name); + chunk.writeString(value); + int len = value.getBytes("ascii").length; + chunk.write(0); + len++; + if (len % 2 != 0) + chunk.write(0); + } + + private void writeInfo(RIFFWriter writer, DLSInfo info) throws IOException { + writeInfoStringChunk(writer, "INAM", info.name); + writeInfoStringChunk(writer, "ICRD", info.creationDate); + writeInfoStringChunk(writer, "IENG", info.engineers); + writeInfoStringChunk(writer, "IPRD", info.product); + writeInfoStringChunk(writer, "ICOP", info.copyright); + writeInfoStringChunk(writer, "ICMT", info.comments); + writeInfoStringChunk(writer, "ISFT", info.tools); + writeInfoStringChunk(writer, "IARL", info.archival_location); + writeInfoStringChunk(writer, "IART", info.artist); + writeInfoStringChunk(writer, "ICMS", info.commissioned); + writeInfoStringChunk(writer, "IGNR", info.genre); + writeInfoStringChunk(writer, "IKEY", info.keywords); + writeInfoStringChunk(writer, "IMED", info.medium); + writeInfoStringChunk(writer, "ISBJ", info.subject); + writeInfoStringChunk(writer, "ISRC", info.source); + writeInfoStringChunk(writer, "ISRF", info.source_form); + writeInfoStringChunk(writer, "ITCH", info.technician); + } + + public DLSInfo getInfo() { + return info; + } + + public String getName() { + return info.name; + } + + public String getVersion() { + return major + "." + minor; + } + + public String getVendor() { + return info.engineers; + } + + public String getDescription() { + return info.comments; + } + + public void setName(String s) { + info.name = s; + } + + public void setVendor(String s) { + info.engineers = s; + } + + public void setDescription(String s) { + info.comments = s; + } + + public SoundbankResource[] getResources() { + SoundbankResource[] resources = new SoundbankResource[samples.size()]; + int j = 0; + for (int i = 0; i < samples.size(); i++) + resources[j++] = samples.get(i); + return resources; + } + + public DLSInstrument[] getInstruments() { + DLSInstrument[] inslist_array = + instruments.toArray(new DLSInstrument[instruments.size()]); + Arrays.sort(inslist_array, new ModelInstrumentComparator()); + return inslist_array; + } + + public DLSSample[] getSamples() { + return samples.toArray(new DLSSample[samples.size()]); + } + + public Instrument getInstrument(Patch patch) { + int program = patch.getProgram(); + int bank = patch.getBank(); + boolean percussion = false; + if (patch instanceof ModelPatch) + percussion = ((ModelPatch) patch).isPercussion(); + for (Instrument instrument : instruments) { + Patch patch2 = instrument.getPatch(); + int program2 = patch2.getProgram(); + int bank2 = patch2.getBank(); + if (program == program2 && bank == bank2) { + boolean percussion2 = false; + if (patch2 instanceof ModelPatch) + percussion2 = ((ModelPatch) patch2).isPercussion(); + if (percussion == percussion2) + return instrument; + } + } + return null; + } + + public void addResource(SoundbankResource resource) { + if (resource instanceof DLSInstrument) + instruments.add((DLSInstrument) resource); + if (resource instanceof DLSSample) + samples.add((DLSSample) resource); + } + + public void removeResource(SoundbankResource resource) { + if (resource instanceof DLSInstrument) + instruments.remove((DLSInstrument) resource); + if (resource instanceof DLSSample) + samples.remove((DLSSample) resource); + } + + public void addInstrument(DLSInstrument resource) { + instruments.add(resource); + } + + public void removeInstrument(DLSInstrument resource) { + instruments.remove(resource); + } + + public long getMajor() { + return major; + } + + public void setMajor(long major) { + this.major = major; + } + + public long getMinor() { + return minor; + } + + public void setMinor(long minor) { + this.minor = minor; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java b/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java new file mode 100644 index 00000000000..294384976af --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/DLSSoundbankReader.java @@ -0,0 +1,74 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ + +package com.sun.media.sound; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import javax.sound.midi.InvalidMidiDataException; +import javax.sound.midi.Soundbank; +import javax.sound.midi.spi.SoundbankReader; + +/** + * This class is used to connect the DLSSoundBank class + * to the SoundbankReader SPI interface. + * + * @author Karl Helgason + */ +public class DLSSoundbankReader extends SoundbankReader { + + public Soundbank getSoundbank(URL url) + throws InvalidMidiDataException, IOException { + try { + return new DLSSoundbank(url); + } catch (RIFFInvalidFormatException e) { + return null; + } catch(IOException ioe) { + return null; + } + } + + public Soundbank getSoundbank(InputStream stream) + throws InvalidMidiDataException, IOException { + try { + stream.mark(512); + return new DLSSoundbank(stream); + } catch (RIFFInvalidFormatException e) { + stream.reset(); + return null; + } + } + + public Soundbank getSoundbank(File file) + throws InvalidMidiDataException, IOException { + try { + return new DLSSoundbank(file); + } catch (RIFFInvalidFormatException e) { + return null; + } + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java b/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java index 754aebf6a44..7a4289b1a30 100644 --- a/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java +++ b/jdk/src/share/classes/com/sun/media/sound/DirectAudioDevice.java @@ -394,7 +394,12 @@ class DirectAudioDevice extends AbstractMixer { private float leftGain, rightGain; protected volatile boolean noService = false; // do not run the nService method + // Guards all native calls. protected Object lockNative = new Object(); + // Guards the lastOpened static variable in implOpen and implClose. + protected static Object lockLast = new Object(); + // Keeps track of last opened line, see implOpen "trick". + protected static DirectDL lastOpened; // CONSTRUCTOR protected DirectDL(DataLine.Info info, @@ -496,20 +501,50 @@ class DirectAudioDevice extends AbstractMixer { // align buffer to full frames bufferSize = ((int) bufferSize / format.getFrameSize()) * format.getFrameSize(); - id = nOpen(mixerIndex, deviceID, isSource, - encoding, - hardwareFormat.getSampleRate(), - hardwareFormat.getSampleSizeInBits(), - hardwareFormat.getFrameSize(), - hardwareFormat.getChannels(), - hardwareFormat.getEncoding().equals(AudioFormat.Encoding.PCM_SIGNED), - hardwareFormat.isBigEndian(), - bufferSize); + synchronized(lockLast) { + id = nOpen(mixerIndex, deviceID, isSource, + encoding, + hardwareFormat.getSampleRate(), + hardwareFormat.getSampleSizeInBits(), + hardwareFormat.getFrameSize(), + hardwareFormat.getChannels(), + hardwareFormat.getEncoding().equals( + AudioFormat.Encoding.PCM_SIGNED), + hardwareFormat.isBigEndian(), + bufferSize); - if (id == 0) { - // TODO: nicer error messages... - throw new LineUnavailableException("line with format "+format+" not supported."); + if (id == 0) { + // Bah... Dirty trick. The most likely cause is an application + // already having a line open for this particular hardware + // format and forgetting about it. If so, silently close that + // implementation and try again. Unfortuantely we can only + // open one line per hardware format currently. + if (lastOpened != null + && hardwareFormat.matches(lastOpened.hardwareFormat)) { + lastOpened.implClose(); + lastOpened = null; + + id = nOpen(mixerIndex, deviceID, isSource, + encoding, + hardwareFormat.getSampleRate(), + hardwareFormat.getSampleSizeInBits(), + hardwareFormat.getFrameSize(), + hardwareFormat.getChannels(), + hardwareFormat.getEncoding().equals( + AudioFormat.Encoding.PCM_SIGNED), + hardwareFormat.isBigEndian(), + bufferSize); + } + + if (id == 0) { + // TODO: nicer error messages... + throw new LineUnavailableException( + "line with format "+format+" not supported."); + } + } + lastOpened = this; } + this.bufferSize = nGetBufferSize(id, isSource); if (this.bufferSize < 1) { // this is an error! @@ -580,12 +615,12 @@ class DirectAudioDevice extends AbstractMixer { } synchronized (lockNative) { nStop(id, isSource); - } - // need to set doIO to false before notifying the - // read/write thread, that's why isStartedRunning() - // cannot be used - doIO = false; + // need to set doIO to false before notifying the + // read/write thread, that's why isStartedRunning() + // cannot be used + doIO = false; + } // wake up any waiting threads synchronized(lock) { lock.notifyAll(); @@ -614,8 +649,12 @@ class DirectAudioDevice extends AbstractMixer { doIO = false; long oldID = id; id = 0; - synchronized (lockNative) { - nClose(oldID, isSource); + synchronized (lockLast) { + synchronized (lockNative) { + nClose(oldID, isSource); + if (lastOpened == this) + lastOpened = null; + } } bytePosition = 0; softwareConversionSize = 0; @@ -630,7 +669,8 @@ class DirectAudioDevice extends AbstractMixer { } int a = 0; synchronized (lockNative) { - a = nAvailable(id, isSource); + if (doIO) + a = nAvailable(id, isSource); } return a; } @@ -644,9 +684,9 @@ class DirectAudioDevice extends AbstractMixer { int counter = 0; long startPos = getLongFramePosition(); boolean posChanged = false; - while (!drained && doIO) { + while (!drained) { synchronized (lockNative) { - if ((id == 0) || !nIsStillDraining(id, isSource)) + if ((id == 0) || (!doIO) || !nIsStillDraining(id, isSource)) break; } // check every now and then for a new position @@ -686,7 +726,7 @@ class DirectAudioDevice extends AbstractMixer { lock.notifyAll(); } synchronized (lockNative) { - if (id != 0) { + if (id != 0 && doIO) { // then flush native buffers nFlush(id, isSource); } @@ -697,9 +737,10 @@ class DirectAudioDevice extends AbstractMixer { // replacement for getFramePosition (see AbstractDataLine) public long getLongFramePosition() { - long pos; + long pos = 0; synchronized (lockNative) { - pos = nGetBytePosition(id, isSource, bytePosition); + if (doIO) + pos = nGetBytePosition(id, isSource, bytePosition); } // hack because ALSA sometimes reports wrong framepos if (pos < 0) { @@ -745,11 +786,12 @@ class DirectAudioDevice extends AbstractMixer { } int written = 0; while (!flushing) { - int thisWritten; + int thisWritten = 0; synchronized (lockNative) { - thisWritten = nWrite(id, b, off, len, - softwareConversionSize, - leftGain, rightGain); + if (doIO) + thisWritten = nWrite(id, b, off, len, + softwareConversionSize, + leftGain, rightGain); if (thisWritten < 0) { // error in native layer break; @@ -972,9 +1014,10 @@ class DirectAudioDevice extends AbstractMixer { } int read = 0; while (doIO && !flushing) { - int thisRead; + int thisRead = 0; synchronized (lockNative) { - thisRead = nRead(id, b, off, len, softwareConversionSize); + if (doIO) + thisRead = nRead(id, b, off, len, softwareConversionSize); if (thisRead < 0) { // error in native layer break; @@ -1209,7 +1252,8 @@ class DirectAudioDevice extends AbstractMixer { // set new native position (if necessary) // this must come after the flush! synchronized (lockNative) { - nSetBytePosition(id, isSource, frames * frameSize); + if (doIO) + nSetBytePosition(id, isSource, frames * frameSize); } if (Printer.debug) Printer.debug(" DirectClip.setFramePosition: " diff --git a/jdk/src/share/classes/com/sun/media/sound/EmergencySoundbank.java b/jdk/src/share/classes/com/sun/media/sound/EmergencySoundbank.java new file mode 100644 index 00000000000..9e248641c05 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/EmergencySoundbank.java @@ -0,0 +1,2695 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.util.Random; + +import javax.sound.midi.Patch; +import javax.sound.sampled.AudioFormat; + +/** + * Emergency Soundbank generator. + * Used when no other default soundbank can be found. + * + * @author Karl Helgason + */ +public class EmergencySoundbank { + + private final static String[] general_midi_instruments = { + "Acoustic Grand Piano", + "Bright Acoustic Piano", + "Electric Grand Piano", + "Honky-tonk Piano", + "Electric Piano 1", + "Electric Piano 2", + "Harpsichord", + "Clavi", + "Celesta", + "Glockenspiel", + "Music Box", + "Vibraphone", + "Marimba", + "Xylophone", + "Tubular Bells", + "Dulcimer", + "Drawbar Organ", + "Percussive Organ", + "Rock Organ", + "Church Organ", + "Reed Organ", + "Accordion", + "Harmonica", + "Tango Accordion", + "Acoustic Guitar (nylon)", + "Acoustic Guitar (steel)", + "Electric Guitar (jazz)", + "Electric Guitar (clean)", + "Electric Guitar (muted)", + "Overdriven Guitar", + "Distortion Guitar", + "Guitar harmonics", + "Acoustic Bass", + "Electric Bass (finger)", + "Electric Bass (pick)", + "Fretless Bass", + "Slap Bass 1", + "Slap Bass 2", + "Synth Bass 1", + "Synth Bass 2", + "Violin", + "Viola", + "Cello", + "Contrabass", + "Tremolo Strings", + "Pizzicato Strings", + "Orchestral Harp", + "Timpani", + "String Ensemble 1", + "String Ensemble 2", + "SynthStrings 1", + "SynthStrings 2", + "Choir Aahs", + "Voice Oohs", + "Synth Voice", + "Orchestra Hit", + "Trumpet", + "Trombone", + "Tuba", + "Muted Trumpet", + "French Horn", + "Brass Section", + "SynthBrass 1", + "SynthBrass 2", + "Soprano Sax", + "Alto Sax", + "Tenor Sax", + "Baritone Sax", + "Oboe", + "English Horn", + "Bassoon", + "Clarinet", + "Piccolo", + "Flute", + "Recorder", + "Pan Flute", + "Blown Bottle", + "Shakuhachi", + "Whistle", + "Ocarina", + "Lead 1 (square)", + "Lead 2 (sawtooth)", + "Lead 3 (calliope)", + "Lead 4 (chiff)", + "Lead 5 (charang)", + "Lead 6 (voice)", + "Lead 7 (fifths)", + "Lead 8 (bass + lead)", + "Pad 1 (new age)", + "Pad 2 (warm)", + "Pad 3 (polysynth)", + "Pad 4 (choir)", + "Pad 5 (bowed)", + "Pad 6 (metallic)", + "Pad 7 (halo)", + "Pad 8 (sweep)", + "FX 1 (rain)", + "FX 2 (soundtrack)", + "FX 3 (crystal)", + "FX 4 (atmosphere)", + "FX 5 (brightness)", + "FX 6 (goblins)", + "FX 7 (echoes)", + "FX 8 (sci-fi)", + "Sitar", + "Banjo", + "Shamisen", + "Koto", + "Kalimba", + "Bag pipe", + "Fiddle", + "Shanai", + "Tinkle Bell", + "Agogo", + "Steel Drums", + "Woodblock", + "Taiko Drum", + "Melodic Tom", + "Synth Drum", + "Reverse Cymbal", + "Guitar Fret Noise", + "Breath Noise", + "Seashore", + "Bird Tweet", + "Telephone Ring", + "Helicopter", + "Applause", + "Gunshot" + }; + + public static SF2Soundbank createSoundbank() throws Exception { + SF2Soundbank sf2 = new SF2Soundbank(); + sf2.setName("Emergency GM sound set"); + sf2.setVendor("Generated"); + sf2.setDescription("Emergency generated soundbank"); + + /* + * percussion instruments + */ + + SF2Layer bass_drum = new_bass_drum(sf2); + SF2Layer snare_drum = new_snare_drum(sf2); + SF2Layer tom = new_tom(sf2); + SF2Layer open_hihat = new_open_hihat(sf2); + SF2Layer closed_hihat = new_closed_hihat(sf2); + SF2Layer crash_cymbal = new_crash_cymbal(sf2); + SF2Layer side_stick = new_side_stick(sf2); + + SF2Layer[] drums = new SF2Layer[128]; + drums[35] = bass_drum; + drums[36] = bass_drum; + drums[38] = snare_drum; + drums[40] = snare_drum; + drums[41] = tom; + drums[43] = tom; + drums[45] = tom; + drums[47] = tom; + drums[48] = tom; + drums[50] = tom; + drums[42] = closed_hihat; + drums[44] = closed_hihat; + drums[46] = open_hihat; + drums[49] = crash_cymbal; + drums[51] = crash_cymbal; + drums[52] = crash_cymbal; + drums[55] = crash_cymbal; + drums[57] = crash_cymbal; + drums[59] = crash_cymbal; + + // Use side_stick for missing drums: + drums[37] = side_stick; + drums[39] = side_stick; + drums[53] = side_stick; + drums[54] = side_stick; + drums[56] = side_stick; + drums[58] = side_stick; + drums[69] = side_stick; + drums[70] = side_stick; + drums[75] = side_stick; + drums[60] = side_stick; + drums[61] = side_stick; + drums[62] = side_stick; + drums[63] = side_stick; + drums[64] = side_stick; + drums[65] = side_stick; + drums[66] = side_stick; + drums[67] = side_stick; + drums[68] = side_stick; + drums[71] = side_stick; + drums[72] = side_stick; + drums[73] = side_stick; + drums[74] = side_stick; + drums[76] = side_stick; + drums[77] = side_stick; + drums[78] = side_stick; + drums[79] = side_stick; + drums[80] = side_stick; + drums[81] = side_stick; + + + SF2Instrument drum_instrument = new SF2Instrument(sf2); + drum_instrument.setName("Standard Kit"); + drum_instrument.setPatch(new ModelPatch(0, 0, true)); + sf2.addInstrument(drum_instrument); + for (int i = 0; i < drums.length; i++) { + if (drums[i] != null) { + SF2InstrumentRegion region = new SF2InstrumentRegion(); + region.setLayer(drums[i]); + region.putBytes(SF2InstrumentRegion.GENERATOR_KEYRANGE, + new byte[]{(byte) i, (byte) i}); + drum_instrument.getRegions().add(region); + } + } + + + /* + * melodic instruments + */ + + SF2Layer gpiano = new_gpiano(sf2); + SF2Layer gpiano2 = new_gpiano2(sf2); + SF2Layer gpiano_hammer = new_piano_hammer(sf2); + SF2Layer piano1 = new_piano1(sf2); + SF2Layer epiano1 = new_epiano1(sf2); + SF2Layer epiano2 = new_epiano2(sf2); + + SF2Layer guitar = new_guitar1(sf2); + SF2Layer guitar_pick = new_guitar_pick(sf2); + SF2Layer guitar_dist = new_guitar_dist(sf2); + SF2Layer bass1 = new_bass1(sf2); + SF2Layer bass2 = new_bass2(sf2); + SF2Layer synthbass = new_synthbass(sf2); + SF2Layer string2 = new_string2(sf2); + SF2Layer orchhit = new_orchhit(sf2); + SF2Layer choir = new_choir(sf2); + SF2Layer solostring = new_solostring(sf2); + SF2Layer organ = new_organ(sf2); + SF2Layer ch_organ = new_ch_organ(sf2); + SF2Layer bell = new_bell(sf2); + SF2Layer flute = new_flute(sf2); + + SF2Layer timpani = new_timpani(sf2); + SF2Layer melodic_toms = new_melodic_toms(sf2); + SF2Layer trumpet = new_trumpet(sf2); + SF2Layer trombone = new_trombone(sf2); + SF2Layer brass_section = new_brass_section(sf2); + SF2Layer horn = new_horn(sf2); + SF2Layer sax = new_sax(sf2); + SF2Layer oboe = new_oboe(sf2); + SF2Layer bassoon = new_bassoon(sf2); + SF2Layer clarinet = new_clarinet(sf2); + SF2Layer reverse_cymbal = new_reverse_cymbal(sf2); + + SF2Layer defaultsound = piano1; + + newInstrument(sf2, "Piano", new Patch(0, 0), gpiano, gpiano_hammer); + newInstrument(sf2, "Piano", new Patch(0, 1), gpiano2, gpiano_hammer); + newInstrument(sf2, "Piano", new Patch(0, 2), piano1); + { + SF2Instrument ins = newInstrument(sf2, "Honky-tonk Piano", + new Patch(0, 3), piano1, piano1); + SF2InstrumentRegion region = ins.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 80); + region.putInteger(SF2Region.GENERATOR_FINETUNE, 30); + region = ins.getRegions().get(1); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 30); + } + newInstrument(sf2, "Rhodes", new Patch(0, 4), epiano2); + newInstrument(sf2, "Rhodes", new Patch(0, 5), epiano2); + newInstrument(sf2, "Clavinet", new Patch(0, 6), epiano1); + newInstrument(sf2, "Clavinet", new Patch(0, 7), epiano1); + newInstrument(sf2, "Rhodes", new Patch(0, 8), epiano2); + newInstrument(sf2, "Bell", new Patch(0, 9), bell); + newInstrument(sf2, "Bell", new Patch(0, 10), bell); + newInstrument(sf2, "Vibraphone", new Patch(0, 11), bell); + newInstrument(sf2, "Marimba", new Patch(0, 12), bell); + newInstrument(sf2, "Marimba", new Patch(0, 13), bell); + newInstrument(sf2, "Bell", new Patch(0, 14), bell); + newInstrument(sf2, "Rock Organ", new Patch(0, 15), organ); + newInstrument(sf2, "Rock Organ", new Patch(0, 16), organ); + newInstrument(sf2, "Perc Organ", new Patch(0, 17), organ); + newInstrument(sf2, "Rock Organ", new Patch(0, 18), organ); + newInstrument(sf2, "Church Organ", new Patch(0, 19), ch_organ); + newInstrument(sf2, "Accordion", new Patch(0, 20), organ); + newInstrument(sf2, "Accordion", new Patch(0, 21), organ); + newInstrument(sf2, "Accordion", new Patch(0, 22), organ); + newInstrument(sf2, "Accordion", new Patch(0, 23), organ); + newInstrument(sf2, "Guitar", new Patch(0, 24), guitar, guitar_pick); + newInstrument(sf2, "Guitar", new Patch(0, 25), guitar, guitar_pick); + newInstrument(sf2, "Guitar", new Patch(0, 26), guitar, guitar_pick); + newInstrument(sf2, "Guitar", new Patch(0, 27), guitar, guitar_pick); + newInstrument(sf2, "Guitar", new Patch(0, 28), guitar, guitar_pick); + newInstrument(sf2, "Distorted Guitar", new Patch(0, 29), guitar_dist); + newInstrument(sf2, "Distorted Guitar", new Patch(0, 30), guitar_dist); + newInstrument(sf2, "Guitar", new Patch(0, 31), guitar, guitar_pick); + newInstrument(sf2, "Finger Bass", new Patch(0, 32), bass1); + newInstrument(sf2, "Finger Bass", new Patch(0, 33), bass1); + newInstrument(sf2, "Finger Bass", new Patch(0, 34), bass1); + newInstrument(sf2, "Frettless Bass", new Patch(0, 35), bass2); + newInstrument(sf2, "Frettless Bass", new Patch(0, 36), bass2); + newInstrument(sf2, "Frettless Bass", new Patch(0, 37), bass2); + newInstrument(sf2, "Synth Bass1", new Patch(0, 38), synthbass); + newInstrument(sf2, "Synth Bass2", new Patch(0, 39), synthbass); + newInstrument(sf2, "Solo String", new Patch(0, 40), string2, solostring); + newInstrument(sf2, "Solo String", new Patch(0, 41), string2, solostring); + newInstrument(sf2, "Solo String", new Patch(0, 42), string2, solostring); + newInstrument(sf2, "Solo String", new Patch(0, 43), string2, solostring); + newInstrument(sf2, "Solo String", new Patch(0, 44), string2, solostring); + newInstrument(sf2, "Def", new Patch(0, 45), defaultsound); + newInstrument(sf2, "Harp", new Patch(0, 46), bell); + newInstrument(sf2, "Timpani", new Patch(0, 47), timpani); + newInstrument(sf2, "Strings", new Patch(0, 48), string2); + SF2Instrument slow_strings = + newInstrument(sf2, "Slow Strings", new Patch(0, 49), string2); + SF2InstrumentRegion region = slow_strings.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, 2500); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 2000); + newInstrument(sf2, "Synth Strings", new Patch(0, 50), string2); + newInstrument(sf2, "Synth Strings", new Patch(0, 51), string2); + + + newInstrument(sf2, "Choir", new Patch(0, 52), choir); + newInstrument(sf2, "Choir", new Patch(0, 53), choir); + newInstrument(sf2, "Choir", new Patch(0, 54), choir); + { + SF2Instrument ins = newInstrument(sf2, "Orch Hit", + new Patch(0, 55), orchhit, orchhit, timpani); + region = ins.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_COARSETUNE, -12); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + } + newInstrument(sf2, "Trumpet", new Patch(0, 56), trumpet); + newInstrument(sf2, "Trombone", new Patch(0, 57), trombone); + newInstrument(sf2, "Trombone", new Patch(0, 58), trombone); + newInstrument(sf2, "Trumpet", new Patch(0, 59), trumpet); + newInstrument(sf2, "Horn", new Patch(0, 60), horn); + newInstrument(sf2, "Brass Section", new Patch(0, 61), brass_section); + newInstrument(sf2, "Brass Section", new Patch(0, 62), brass_section); + newInstrument(sf2, "Brass Section", new Patch(0, 63), brass_section); + newInstrument(sf2, "Sax", new Patch(0, 64), sax); + newInstrument(sf2, "Sax", new Patch(0, 65), sax); + newInstrument(sf2, "Sax", new Patch(0, 66), sax); + newInstrument(sf2, "Sax", new Patch(0, 67), sax); + newInstrument(sf2, "Oboe", new Patch(0, 68), oboe); + newInstrument(sf2, "Horn", new Patch(0, 69), horn); + newInstrument(sf2, "Bassoon", new Patch(0, 70), bassoon); + newInstrument(sf2, "Clarinet", new Patch(0, 71), clarinet); + newInstrument(sf2, "Flute", new Patch(0, 72), flute); + newInstrument(sf2, "Flute", new Patch(0, 73), flute); + newInstrument(sf2, "Flute", new Patch(0, 74), flute); + newInstrument(sf2, "Flute", new Patch(0, 75), flute); + newInstrument(sf2, "Flute", new Patch(0, 76), flute); + newInstrument(sf2, "Flute", new Patch(0, 77), flute); + newInstrument(sf2, "Flute", new Patch(0, 78), flute); + newInstrument(sf2, "Flute", new Patch(0, 79), flute); + newInstrument(sf2, "Organ", new Patch(0, 80), organ); + newInstrument(sf2, "Organ", new Patch(0, 81), organ); + newInstrument(sf2, "Flute", new Patch(0, 82), flute); + newInstrument(sf2, "Organ", new Patch(0, 83), organ); + newInstrument(sf2, "Organ", new Patch(0, 84), organ); + newInstrument(sf2, "Choir", new Patch(0, 85), choir); + newInstrument(sf2, "Organ", new Patch(0, 86), organ); + newInstrument(sf2, "Organ", new Patch(0, 87), organ); + newInstrument(sf2, "Synth Strings", new Patch(0, 88), string2); + newInstrument(sf2, "Organ", new Patch(0, 89), organ); + newInstrument(sf2, "Def", new Patch(0, 90), defaultsound); + newInstrument(sf2, "Choir", new Patch(0, 91), choir); + newInstrument(sf2, "Organ", new Patch(0, 92), organ); + newInstrument(sf2, "Organ", new Patch(0, 93), organ); + newInstrument(sf2, "Organ", new Patch(0, 94), organ); + newInstrument(sf2, "Organ", new Patch(0, 95), organ); + newInstrument(sf2, "Organ", new Patch(0, 96), organ); + newInstrument(sf2, "Organ", new Patch(0, 97), organ); + newInstrument(sf2, "Bell", new Patch(0, 98), bell); + newInstrument(sf2, "Organ", new Patch(0, 99), organ); + newInstrument(sf2, "Organ", new Patch(0, 100), organ); + newInstrument(sf2, "Organ", new Patch(0, 101), organ); + newInstrument(sf2, "Def", new Patch(0, 102), defaultsound); + newInstrument(sf2, "Synth Strings", new Patch(0, 103), string2); + newInstrument(sf2, "Def", new Patch(0, 104), defaultsound); + newInstrument(sf2, "Def", new Patch(0, 105), defaultsound); + newInstrument(sf2, "Def", new Patch(0, 106), defaultsound); + newInstrument(sf2, "Def", new Patch(0, 107), defaultsound); + newInstrument(sf2, "Marimba", new Patch(0, 108), bell); + newInstrument(sf2, "Sax", new Patch(0, 109), sax); + newInstrument(sf2, "Solo String", new Patch(0, 110), string2, solostring); + newInstrument(sf2, "Oboe", new Patch(0, 111), oboe); + newInstrument(sf2, "Bell", new Patch(0, 112), bell); + newInstrument(sf2, "Melodic Toms", new Patch(0, 113), melodic_toms); + newInstrument(sf2, "Marimba", new Patch(0, 114), bell); + newInstrument(sf2, "Melodic Toms", new Patch(0, 115), melodic_toms); + newInstrument(sf2, "Melodic Toms", new Patch(0, 116), melodic_toms); + newInstrument(sf2, "Melodic Toms", new Patch(0, 117), melodic_toms); + newInstrument(sf2, "Reverse Cymbal", new Patch(0, 118), reverse_cymbal); + newInstrument(sf2, "Reverse Cymbal", new Patch(0, 119), reverse_cymbal); + newInstrument(sf2, "Guitar", new Patch(0, 120), guitar); + newInstrument(sf2, "Def", new Patch(0, 121), defaultsound); + { + SF2Instrument ins = newInstrument(sf2, "Seashore/Reverse Cymbal", + new Patch(0, 122), reverse_cymbal); + region = ins.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 18500); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 4500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, -4500); + } + { + SF2Instrument ins = newInstrument(sf2, "Bird/Flute", + new Patch(0, 123), flute); + region = ins.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_COARSETUNE, 24); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, -3000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + } + newInstrument(sf2, "Def", new Patch(0, 124), side_stick); + { + SF2Instrument ins = newInstrument(sf2, "Seashore/Reverse Cymbal", + new Patch(0, 125), reverse_cymbal); + region = ins.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 18500); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 4500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, -4500); + } + newInstrument(sf2, "Applause/crash_cymbal", + new Patch(0, 126), crash_cymbal); + newInstrument(sf2, "Gunshot/side_stick", new Patch(0, 127), side_stick); + + for (SF2Instrument instrument : sf2.getInstruments()) { + Patch patch = instrument.getPatch(); + if (patch instanceof ModelPatch) { + if (((ModelPatch) patch).isPercussion()) + continue; + } + instrument.setName(general_midi_instruments[patch.getProgram()]); + } + + return sf2; + + } + + public static SF2Layer new_bell(SF2Soundbank sf2) { + Random random = new Random(102030201); + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.01; + double end_w = 0.05; + double start_a = 0.2; + double end_a = 0.00001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + double detune = 1 + (random.nextDouble() * 2 - 1) * 0.01; + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1) * detune, w, a); + a *= a_step; + } + SF2Sample sample = newSimpleFFTSample(sf2, "EPiano", data, base); + SF2Layer layer = newLayer(sf2, "EPiano", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, 1200); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -9000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 16000); + return layer; + } + + public static SF2Layer new_guitar1(SF2Soundbank sf2) { + + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.01; + double end_w = 0.01; + double start_a = 2; + double end_a = 0.01; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + + double[] aa = new double[40]; + for (int i = 0; i < 40; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] = 2; + aa[1] = 0.5; + aa[2] = 0.45; + aa[3] = 0.2; + aa[4] = 1; + aa[5] = 0.5; + aa[6] = 2; + aa[7] = 1; + aa[8] = 0.5; + aa[9] = 1; + aa[9] = 0.5; + aa[10] = 0.2; + aa[11] = 1; + aa[12] = 0.7; + aa[13] = 0.5; + aa[14] = 1; + + for (int i = 0; i < 40; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + } + + SF2Sample sample = newSimpleFFTSample(sf2, "Guitar", data, base); + SF2Layer layer = newLayer(sf2, "Guitar", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 2400); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -100); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -6000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 16000); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -20); + return layer; + } + + public static SF2Layer new_guitar_dist(SF2Soundbank sf2) { + + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.01; + double end_w = 0.01; + double start_a = 2; + double end_a = 0.01; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + + double[] aa = new double[40]; + for (int i = 0; i < 40; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] = 5; + aa[1] = 2; + aa[2] = 0.45; + aa[3] = 0.2; + aa[4] = 1; + aa[5] = 0.5; + aa[6] = 2; + aa[7] = 1; + aa[8] = 0.5; + aa[9] = 1; + aa[9] = 0.5; + aa[10] = 0.2; + aa[11] = 1; + aa[12] = 0.7; + aa[13] = 0.5; + aa[14] = 1; + + for (int i = 0; i < 40; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + } + + + SF2Sample sample = newSimpleFFTSample_dist(sf2, "Distorted Guitar", + data, base, 10000.0); + + + SF2Layer layer = newLayer(sf2, "Distorted Guitar", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + //region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 2400); + //region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 200); + + //region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -100); + //region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + //region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -1000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 8000); + //region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -20); + return layer; + } + + public static SF2Layer new_guitar_pick(SF2Soundbank sf2) { + + double datab[]; + + // Make treble part + { + int m = 2; + int fftlen = 4096 * m; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)); + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 0; i < 2048 * m; i++) { + data[i] *= Math.exp(-Math.abs((i - 23) / ((double) m)) * 1.2) + + Math.exp(-Math.abs((i - 40) / ((double) m)) * 0.9); + } + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.8); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9994; + } + datab = data; + + fadeUp(data, 80); + } + + SF2Sample sample = newSimpleDrumSample(sf2, "Guitar Noise", datab); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Guitar Noise"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + //region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); +// region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); +/* + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, 0); + region.putInteger(SF2Region.GENERATOR_SUSTAINMODENV, 1000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -11000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 12000); + */ + + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_gpiano(SF2Soundbank sf2) { + //Random random = new Random(302030201); + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 15.0); + + double[] aa = new double[30]; + for (int i = 0; i < 30; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 2; + //aa[2] *= 0.1; + aa[4] *= 2; + + + aa[12] *= 0.9; + aa[13] *= 0.7; + for (int i = 14; i < 30; i++) { + aa[i] *= 0.5; + } + + + for (int i = 0; i < 30; i++) { + //double detune = 1 + (random.nextDouble()*2 - 1)*0.0001; + double w = 0.2; + double ai = aa[i]; + if (i > 10) { + w = 5; + ai *= 10; + } + int adjust = 0; + if (i > 5) { + adjust = (i - 5) * 7; + } + complexGaussianDist(data, base * (i + 1) + adjust, w, ai); + } + + SF2Sample sample = newSimpleFFTSample(sf2, "Grand Piano", data, base, 200); + SF2Layer layer = newLayer(sf2, "Grand Piano", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -7000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -5500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 18000); + return layer; + } + + public static SF2Layer new_gpiano2(SF2Soundbank sf2) { + //Random random = new Random(302030201); + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 20.0); + + double[] aa = new double[30]; + for (int i = 0; i < 30; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 1; + //aa[2] *= 0.1; + aa[4] *= 2; + + + aa[12] *= 0.9; + aa[13] *= 0.7; + for (int i = 14; i < 30; i++) { + aa[i] *= 0.5; + } + + + for (int i = 0; i < 30; i++) { + //double detune = 1 + (random.nextDouble()*2 - 1)*0.0001; + double w = 0.2; + double ai = aa[i]; + if (i > 10) { + w = 5; + ai *= 10; + } + int adjust = 0; + if (i > 5) { + adjust = (i - 5) * 7; + } + complexGaussianDist(data, base * (i + 1) + adjust, w, ai); + } + + SF2Sample sample = newSimpleFFTSample(sf2, "Grand Piano", data, base, 200); + SF2Layer layer = newLayer(sf2, "Grand Piano", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -7000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -5500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 18000); + return layer; + } + + public static SF2Layer new_piano_hammer(SF2Soundbank sf2) { + + double datab[]; + + // Make treble part + { + int m = 2; + int fftlen = 4096 * m; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)); + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 0; i < 2048 * m; i++) + data[i] *= Math.exp(-Math.abs((i - 37) / ((double) m)) * 0.05); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.6); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9997; + } + datab = data; + + fadeUp(data, 80); + } + + SF2Sample sample = newSimpleDrumSample(sf2, "Piano Hammer", datab); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Piano Hammer"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + //region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); +/* + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, 0); + region.putInteger(SF2Region.GENERATOR_SUSTAINMODENV, 1000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -11000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 12000); + */ + + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_piano1(SF2Soundbank sf2) { + //Random random = new Random(302030201); + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_a = 0.2; + double end_a = 0.0001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + + double[] aa = new double[30]; + for (int i = 0; i < 30; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 5; + aa[2] *= 0.1; + aa[7] *= 5; + + + for (int i = 0; i < 30; i++) { + //double detune = 1 + (random.nextDouble()*2 - 1)*0.0001; + double w = 0.2; + double ai = aa[i]; + if (i > 12) { + w = 5; + ai *= 10; + } + int adjust = 0; + if (i > 5) { + adjust = (i - 5) * 7; + } + complexGaussianDist(data, base * (i + 1) + adjust, w, ai); + } + + complexGaussianDist(data, base * (15.5), 1, 0.1); + complexGaussianDist(data, base * (17.5), 1, 0.01); + + SF2Sample sample = newSimpleFFTSample(sf2, "EPiano", data, base, 200); + SF2Layer layer = newLayer(sf2, "EPiano", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -1200); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -5500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 16000); + return layer; + } + + public static SF2Layer new_epiano1(SF2Soundbank sf2) { + Random random = new Random(302030201); + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.05; + double end_w = 0.05; + double start_a = 0.2; + double end_a = 0.0001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + double detune = 1 + (random.nextDouble() * 2 - 1) * 0.0001; + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1) * detune, w, a); + a *= a_step; + } + + + + SF2Sample sample = newSimpleFFTSample(sf2, "EPiano", data, base); + SF2Layer layer = newLayer(sf2, "EPiano", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, 1200); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -9000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 16000); + return layer; + } + + public static SF2Layer new_epiano2(SF2Soundbank sf2) { + Random random = new Random(302030201); + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.01; + double end_w = 0.05; + double start_a = 0.2; + double end_a = 0.00001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + double detune = 1 + (random.nextDouble() * 2 - 1) * 0.0001; + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1) * detune, w, a); + a *= a_step; + } + + SF2Sample sample = newSimpleFFTSample(sf2, "EPiano", data, base); + SF2Layer layer = newLayer(sf2, "EPiano", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 8000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, 2400); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -9000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 16000); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + return layer; + } + + public static SF2Layer new_bass1(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.05; + double end_w = 0.05; + double start_a = 0.2; + double end_a = 0.02; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 25.0); + + double[] aa = new double[25]; + for (int i = 0; i < 25; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 8; + aa[1] *= 4; + aa[3] *= 8; + aa[5] *= 8; + + for (int i = 0; i < 25; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + } + + + SF2Sample sample = newSimpleFFTSample(sf2, "Bass", data, base); + SF2Layer layer = newLayer(sf2, "Bass", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -3000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -5000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 11000); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + return layer; + } + + public static SF2Layer new_synthbass(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.05; + double end_w = 0.05; + double start_a = 0.2; + double end_a = 0.02; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 25.0); + + double[] aa = new double[25]; + for (int i = 0; i < 25; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 16; + aa[1] *= 4; + aa[3] *= 16; + aa[5] *= 8; + + for (int i = 0; i < 25; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + } + + + SF2Sample sample = newSimpleFFTSample(sf2, "Bass", data, base); + SF2Layer layer = newLayer(sf2, "Bass", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -3000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, -3000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERQ, 100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 8000); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + return layer; + } + + public static SF2Layer new_bass2(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 0.05; + double end_w = 0.05; + double start_a = 0.2; + double end_a = 0.002; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 25.0); + + double[] aa = new double[25]; + for (int i = 0; i < 25; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 8; + aa[1] *= 4; + aa[3] *= 8; + aa[5] *= 8; + + for (int i = 0; i < 25; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + } + + + SF2Sample sample = newSimpleFFTSample(sf2, "Bass2", data, base); + SF2Layer layer = newLayer(sf2, "Bass2", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -8000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 5000); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + return layer; + } + + public static SF2Layer new_solostring(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 2; + double end_w = 2; + double start_a = 0.2; + double end_a = 0.01; + + double[] aa = new double[18]; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < aa.length; i++) { + a *= a_step; + aa[i] = a; + } + + aa[0] *= 5; + aa[1] *= 5; + aa[2] *= 5; + aa[3] *= 4; + aa[4] *= 4; + aa[5] *= 3; + aa[6] *= 3; + aa[7] *= 2; + + for (int i = 0; i < aa.length; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, a); + } + SF2Sample sample = newSimpleFFTSample(sf2, "Strings", data, base); + SF2Layer layer = newLayer(sf2, "Strings", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -5000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + region.putInteger(SF2Region.GENERATOR_FREQVIBLFO, -1000); + region.putInteger(SF2Region.GENERATOR_VIBLFOTOPITCH, 15); + return layer; + + } + + public static SF2Layer new_orchhit(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 2; + double end_w = 80; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, a); + a *= a_step; + } + complexGaussianDist(data, base * 4, 300, 1); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Och Strings", data, base); + SF2Layer layer = newLayer(sf2, "Och Strings", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -5000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 200); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 200); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_string2(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 2; + double end_w = 80; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, a); + a *= a_step; + } + SF2Sample sample = newSimpleFFTSample(sf2, "Strings", data, base); + SF2Layer layer = newLayer(sf2, "Strings", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -5000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_choir(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 25; + double start_w = 2; + double end_w = 80; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + double[] aa = new double[40]; + for (int i = 0; i < aa.length; i++) { + a *= a_step; + aa[i] = a; + } + + aa[5] *= 0.1; + aa[6] *= 0.01; + aa[7] *= 0.1; + aa[8] *= 0.1; + + for (int i = 0; i < aa.length; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + } + SF2Sample sample = newSimpleFFTSample(sf2, "Strings", data, base); + SF2Layer layer = newLayer(sf2, "Strings", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -5000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_organ(SF2Soundbank sf2) { + Random random = new Random(102030201); + int x = 1; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + double start_w = 0.01; + double end_w = 0.01; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + + for (int i = 0; i < 12; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, + a * (0.5 + 3 * (random.nextDouble()))); + a *= a_step; + } + SF2Sample sample = newSimpleFFTSample(sf2, "Organ", data, base); + SF2Layer layer = newLayer(sf2, "Organ", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_ch_organ(SF2Soundbank sf2) { + int x = 1; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + double start_w = 0.01; + double end_w = 0.01; + double start_a = 0.2; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 60.0); + + double[] aa = new double[60]; + for (int i = 0; i < aa.length; i++) { + a *= a_step; + aa[i] = a; + } + + aa[0] *= 5; + aa[1] *= 2; + aa[2] = 0; + aa[4] = 0; + aa[5] = 0; + aa[7] *= 7; + aa[9] = 0; + aa[10] = 0; + aa[12] = 0; + aa[15] *= 7; + aa[18] = 0; + aa[20] = 0; + aa[24] = 0; + aa[27] *= 5; + aa[29] = 0; + aa[30] = 0; + aa[33] = 0; + aa[36] *= 4; + aa[37] = 0; + aa[39] = 0; + aa[42] = 0; + aa[43] = 0; + aa[47] = 0; + aa[50] *= 4; + aa[52] = 0; + aa[55] = 0; + aa[57] = 0; + + + aa[10] *= 0.1; + aa[11] *= 0.1; + aa[12] *= 0.1; + aa[13] *= 0.1; + + aa[17] *= 0.1; + aa[18] *= 0.1; + aa[19] *= 0.1; + aa[20] *= 0.1; + + for (int i = 0; i < 60; i++) { + double w = start_w + (end_w - start_w) * (i / 40.0); + complexGaussianDist(data, base * (i + 1), w, aa[i]); + a *= a_step; + } + SF2Sample sample = newSimpleFFTSample(sf2, "Organ", data, base); + SF2Layer layer = newLayer(sf2, "Organ", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -10000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + return layer; + + } + + public static SF2Layer new_flute(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + complexGaussianDist(data, base * 1, 0.001, 0.5); + complexGaussianDist(data, base * 2, 0.001, 0.5); + complexGaussianDist(data, base * 3, 0.001, 0.5); + complexGaussianDist(data, base * 4, 0.01, 0.5); + + complexGaussianDist(data, base * 4, 100, 120); + complexGaussianDist(data, base * 6, 100, 40); + complexGaussianDist(data, base * 8, 100, 80); + + complexGaussianDist(data, base * 5, 0.001, 0.05); + complexGaussianDist(data, base * 6, 0.001, 0.06); + complexGaussianDist(data, base * 7, 0.001, 0.04); + complexGaussianDist(data, base * 8, 0.005, 0.06); + complexGaussianDist(data, base * 9, 0.005, 0.06); + complexGaussianDist(data, base * 10, 0.01, 0.1); + complexGaussianDist(data, base * 11, 0.08, 0.7); + complexGaussianDist(data, base * 12, 0.08, 0.6); + complexGaussianDist(data, base * 13, 0.08, 0.6); + complexGaussianDist(data, base * 14, 0.08, 0.6); + complexGaussianDist(data, base * 15, 0.08, 0.5); + complexGaussianDist(data, base * 16, 0.08, 0.5); + complexGaussianDist(data, base * 17, 0.08, 0.2); + + + complexGaussianDist(data, base * 1, 10, 8); + complexGaussianDist(data, base * 2, 10, 8); + complexGaussianDist(data, base * 3, 10, 8); + complexGaussianDist(data, base * 4, 10, 8); + complexGaussianDist(data, base * 5, 10, 8); + complexGaussianDist(data, base * 6, 20, 9); + complexGaussianDist(data, base * 7, 20, 9); + complexGaussianDist(data, base * 8, 20, 9); + complexGaussianDist(data, base * 9, 20, 8); + complexGaussianDist(data, base * 10, 30, 8); + complexGaussianDist(data, base * 11, 30, 9); + complexGaussianDist(data, base * 12, 30, 9); + complexGaussianDist(data, base * 13, 30, 8); + complexGaussianDist(data, base * 14, 30, 8); + complexGaussianDist(data, base * 15, 30, 7); + complexGaussianDist(data, base * 16, 30, 7); + complexGaussianDist(data, base * 17, 30, 6); + + SF2Sample sample = newSimpleFFTSample(sf2, "Flute", data, base); + SF2Layer layer = newLayer(sf2, "Flute", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_horn(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + double start_a = 0.5; + double end_a = 0.00000000001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + if (i == 0) + complexGaussianDist(data, base * (i + 1), 0.1, a * 0.2); + else + complexGaussianDist(data, base * (i + 1), 0.1, a); + a *= a_step; + } + + complexGaussianDist(data, base * 2, 100, 1); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Horn", data, base); + SF2Layer layer = newLayer(sf2, "Horn", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -500); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, 5000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 4500); + return layer; + + } + + public static SF2Layer new_trumpet(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + double start_a = 0.5; + double end_a = 0.00001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 80.0); + double[] aa = new double[80]; + for (int i = 0; i < 80; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 0.05; + aa[1] *= 0.2; + aa[2] *= 0.5; + aa[3] *= 0.85; + + for (int i = 0; i < 80; i++) { + complexGaussianDist(data, base * (i + 1), 0.1, aa[i]); + } + + complexGaussianDist(data, base * 5, 300, 3); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Trumpet", data, base); + SF2Layer layer = newLayer(sf2, "Trumpet", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -10000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 0); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -4000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, -2500); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, 5000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 4500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERQ, 10); + return layer; + + } + + public static SF2Layer new_brass_section(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + double start_a = 0.5; + double end_a = 0.005; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 30.0); + double[] aa = new double[30]; + for (int i = 0; i < 30; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 0.8; + aa[1] *= 0.9; + + double w = 5; + for (int i = 0; i < 30; i++) { + complexGaussianDist(data, base * (i + 1), 0.1 * w, aa[i] * w); + w += 6; //*= w_step; + } + + complexGaussianDist(data, base * 6, 300, 2); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Brass Section", data, base); + SF2Layer layer = newLayer(sf2, "Brass Section", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -9200); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -3000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, 5000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 4500); + return layer; + + } + + public static SF2Layer new_trombone(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + double start_a = 0.5; + double end_a = 0.001; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 80.0); + double[] aa = new double[80]; + for (int i = 0; i < 80; i++) { + aa[i] = a; + a *= a_step; + } + + aa[0] *= 0.3; + aa[1] *= 0.7; + + for (int i = 0; i < 80; i++) { + complexGaussianDist(data, base * (i + 1), 0.1, aa[i]); + } + + complexGaussianDist(data, base * 6, 300, 2); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Trombone", data, base); + SF2Layer layer = newLayer(sf2, "Trombone", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -8000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -2000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, 5000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 4500); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERQ, 10); + return layer; + + } + + public static SF2Layer new_sax(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + double start_a = 0.5; + double end_a = 0.01; + double a = start_a; + double a_step = Math.pow(end_a / start_a, 1.0 / 40.0); + for (int i = 0; i < 40; i++) { + if (i == 0 || i == 2) + complexGaussianDist(data, base * (i + 1), 0.1, a * 4); + else + complexGaussianDist(data, base * (i + 1), 0.1, a); + a *= a_step; + } + + complexGaussianDist(data, base * 4, 200, 1); + + SF2Sample sample = newSimpleFFTSample(sf2, "Sax", data, base); + SF2Layer layer = newLayer(sf2, "Sax", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + + region.putInteger(SF2Region.GENERATOR_ATTACKMODENV, -3000); + region.putInteger(SF2Region.GENERATOR_RELEASEMODENV, 12000); + region.putInteger(SF2Region.GENERATOR_MODENVTOFILTERFC, 5000); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 4500); + return layer; + + } + + public static SF2Layer new_oboe(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + complexGaussianDist(data, base * 5, 100, 80); + + + complexGaussianDist(data, base * 1, 0.01, 0.53); + complexGaussianDist(data, base * 2, 0.01, 0.51); + complexGaussianDist(data, base * 3, 0.01, 0.48); + complexGaussianDist(data, base * 4, 0.01, 0.49); + complexGaussianDist(data, base * 5, 0.01, 5); + complexGaussianDist(data, base * 6, 0.01, 0.51); + complexGaussianDist(data, base * 7, 0.01, 0.50); + complexGaussianDist(data, base * 8, 0.01, 0.59); + complexGaussianDist(data, base * 9, 0.01, 0.61); + complexGaussianDist(data, base * 10, 0.01, 0.52); + complexGaussianDist(data, base * 11, 0.01, 0.49); + complexGaussianDist(data, base * 12, 0.01, 0.51); + complexGaussianDist(data, base * 13, 0.01, 0.48); + complexGaussianDist(data, base * 14, 0.01, 0.51); + complexGaussianDist(data, base * 15, 0.01, 0.46); + complexGaussianDist(data, base * 16, 0.01, 0.35); + complexGaussianDist(data, base * 17, 0.01, 0.20); + complexGaussianDist(data, base * 18, 0.01, 0.10); + complexGaussianDist(data, base * 19, 0.01, 0.5); + complexGaussianDist(data, base * 20, 0.01, 0.1); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Oboe", data, base); + SF2Layer layer = newLayer(sf2, "Oboe", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_bassoon(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + complexGaussianDist(data, base * 2, 100, 40); + complexGaussianDist(data, base * 4, 100, 20); + + complexGaussianDist(data, base * 1, 0.01, 0.53); + complexGaussianDist(data, base * 2, 0.01, 5); + complexGaussianDist(data, base * 3, 0.01, 0.51); + complexGaussianDist(data, base * 4, 0.01, 0.48); + complexGaussianDist(data, base * 5, 0.01, 1.49); + complexGaussianDist(data, base * 6, 0.01, 0.51); + complexGaussianDist(data, base * 7, 0.01, 0.50); + complexGaussianDist(data, base * 8, 0.01, 0.59); + complexGaussianDist(data, base * 9, 0.01, 0.61); + complexGaussianDist(data, base * 10, 0.01, 0.52); + complexGaussianDist(data, base * 11, 0.01, 0.49); + complexGaussianDist(data, base * 12, 0.01, 0.51); + complexGaussianDist(data, base * 13, 0.01, 0.48); + complexGaussianDist(data, base * 14, 0.01, 0.51); + complexGaussianDist(data, base * 15, 0.01, 0.46); + complexGaussianDist(data, base * 16, 0.01, 0.35); + complexGaussianDist(data, base * 17, 0.01, 0.20); + complexGaussianDist(data, base * 18, 0.01, 0.10); + complexGaussianDist(data, base * 19, 0.01, 0.5); + complexGaussianDist(data, base * 20, 0.01, 0.1); + + + SF2Sample sample = newSimpleFFTSample(sf2, "Flute", data, base); + SF2Layer layer = newLayer(sf2, "Flute", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_clarinet(SF2Soundbank sf2) { + int x = 8; + int fftsize = 4096 * x; + double[] data = new double[fftsize * 2]; + double base = x * 15; + + complexGaussianDist(data, base * 1, 0.001, 0.5); + complexGaussianDist(data, base * 2, 0.001, 0.02); + complexGaussianDist(data, base * 3, 0.001, 0.2); + complexGaussianDist(data, base * 4, 0.01, 0.1); + + complexGaussianDist(data, base * 4, 100, 60); + complexGaussianDist(data, base * 6, 100, 20); + complexGaussianDist(data, base * 8, 100, 20); + + complexGaussianDist(data, base * 5, 0.001, 0.1); + complexGaussianDist(data, base * 6, 0.001, 0.09); + complexGaussianDist(data, base * 7, 0.001, 0.02); + complexGaussianDist(data, base * 8, 0.005, 0.16); + complexGaussianDist(data, base * 9, 0.005, 0.96); + complexGaussianDist(data, base * 10, 0.01, 0.9); + complexGaussianDist(data, base * 11, 0.08, 1.2); + complexGaussianDist(data, base * 12, 0.08, 1.8); + complexGaussianDist(data, base * 13, 0.08, 1.6); + complexGaussianDist(data, base * 14, 0.08, 1.2); + complexGaussianDist(data, base * 15, 0.08, 0.9); + complexGaussianDist(data, base * 16, 0.08, 0.5); + complexGaussianDist(data, base * 17, 0.08, 0.2); + + + complexGaussianDist(data, base * 1, 10, 8); + complexGaussianDist(data, base * 2, 10, 8); + complexGaussianDist(data, base * 3, 10, 8); + complexGaussianDist(data, base * 4, 10, 8); + complexGaussianDist(data, base * 5, 10, 8); + complexGaussianDist(data, base * 6, 20, 9); + complexGaussianDist(data, base * 7, 20, 9); + complexGaussianDist(data, base * 8, 20, 9); + complexGaussianDist(data, base * 9, 20, 8); + complexGaussianDist(data, base * 10, 30, 8); + complexGaussianDist(data, base * 11, 30, 9); + complexGaussianDist(data, base * 12, 30, 9); + complexGaussianDist(data, base * 13, 30, 8); + complexGaussianDist(data, base * 14, 30, 8); + complexGaussianDist(data, base * 15, 30, 7); + complexGaussianDist(data, base * 16, 30, 7); + complexGaussianDist(data, base * 17, 30, 6); + + SF2Sample sample = newSimpleFFTSample(sf2, "Clarinet", data, base); + SF2Layer layer = newLayer(sf2, "Clarinet", sample); + SF2Region region = layer.getRegions().get(0); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -6000); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 4000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, -100); + region.putInteger(SF2Region.GENERATOR_INITIALFILTERFC, 9500); + return layer; + + } + + public static SF2Layer new_timpani(SF2Soundbank sf2) { + + double datab[]; + double datah[]; + + // Make Bass Part + { + int fftlen = 4096 * 8; + double[] data = new double[2 * fftlen]; + double base = 48; + complexGaussianDist(data, base * 2, 0.2, 1); + complexGaussianDist(data, base * 3, 0.2, 0.7); + complexGaussianDist(data, base * 5, 10, 1); + complexGaussianDist(data, base * 6, 9, 1); + complexGaussianDist(data, base * 8, 15, 1); + complexGaussianDist(data, base * 9, 18, 0.8); + complexGaussianDist(data, base * 11, 21, 0.5); + complexGaussianDist(data, base * 13, 28, 0.3); + complexGaussianDist(data, base * 14, 22, 0.1); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.5); + data = realPart(data); + + double d_len = data.length; + for (int i = 0; i < data.length; i++) { + double g = (1.0 - (i / d_len)); + data[i] *= g * g; + } + fadeUp(data, 40); + datab = data; + } + + // Make treble part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) { + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + } + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024 * 4; i < 2048 * 4; i++) + data[i] = 1.0 - (i - 4096) / 4096.0; + for (int i = 0; i < 300; i++) { + double g = (1.0 - (i / 300.0)); + data[i] *= 1.0 + 20 * g * g; + } + for (int i = 0; i < 24; i++) + data[i] = 0; + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9998; + } + datah = data; + } + + for (int i = 0; i < datah.length; i++) + datab[i] += datah[i] * 0.02; + + normalize(datab, 0.9); + + SF2Sample sample = newSimpleDrumSample(sf2, "Timpani", datab); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Timpani"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_melodic_toms(SF2Soundbank sf2) { + + double datab[]; + double datah[]; + + // Make Bass Part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + complexGaussianDist(data, 30, 0.5, 1); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.8); + data = realPart(data); + + double d_len = data.length; + for (int i = 0; i < data.length; i++) + data[i] *= (1.0 - (i / d_len)); + datab = data; + } + + // Make treble part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024 * 4; i < 2048 * 4; i++) + data[i] = 1.0 - (i - 4096) / 4096.0; + for (int i = 0; i < 200; i++) { + double g = (1.0 - (i / 200.0)); + data[i] *= 1.0 + 20 * g * g; + } + for (int i = 0; i < 30; i++) + data[i] = 0; + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9996; + } + datah = data; + } + + for (int i = 0; i < datah.length; i++) + datab[i] += datah[i] * 0.5; + for (int i = 0; i < 5; i++) + datab[i] *= i / 5.0; + + normalize(datab, 0.99); + + SF2Sample sample = newSimpleDrumSample(sf2, "Melodic Toms", datab); + sample.setOriginalPitch(63); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Melodic Toms"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + //region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_reverse_cymbal(SF2Soundbank sf2) { + double datah[]; + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)); + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 0; i < 100; i++) + data[i] = 0; + + for (int i = 0; i < 512 * 2; i++) { + double gain = (i / (512.0 * 2.0)); + data[i] = 1 - gain; + } + datah = data; + } + + SF2Sample sample = newSimpleFFTSample(sf2, "Reverse Cymbal", + datah, 100, 20); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Reverse Cymbal"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_ATTACKVOLENV, -200); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, -12000); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, -1000); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_snare_drum(SF2Soundbank sf2) { + + double datab[]; + double datah[]; + + // Make Bass Part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + complexGaussianDist(data, 24, 0.5, 1); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.5); + data = realPart(data); + + double d_len = data.length; + for (int i = 0; i < data.length; i++) + data[i] *= (1.0 - (i / d_len)); + datab = data; + } + + // Make treble part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024 * 4; i < 2048 * 4; i++) + data[i] = 1.0 - (i - 4096) / 4096.0; + for (int i = 0; i < 300; i++) { + double g = (1.0 - (i / 300.0)); + data[i] *= 1.0 + 20 * g * g; + } + for (int i = 0; i < 24; i++) + data[i] = 0; + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9998; + } + datah = data; + } + + for (int i = 0; i < datah.length; i++) + datab[i] += datah[i]; + for (int i = 0; i < 5; i++) + datab[i] *= i / 5.0; + + SF2Sample sample = newSimpleDrumSample(sf2, "Snare Drum", datab); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Snare Drum"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_bass_drum(SF2Soundbank sf2) { + + double datab[]; + double datah[]; + + // Make Bass Part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + complexGaussianDist(data, 1.8 * 5 + 1, 2, 1); + complexGaussianDist(data, 1.8 * 9 + 1, 2, 1); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double d_len = data.length; + for (int i = 0; i < data.length; i++) + data[i] *= (1.0 - (i / d_len)); + datab = data; + } + + // Make treble part + { + int fftlen = 4096; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024; i < 2048; i++) + data[i] = 1.0 - (i - 1024) / 1024.0; + for (int i = 0; i < 512; i++) + data[i] = 10 * i / 512.0; + for (int i = 0; i < 10; i++) + data[i] = 0; + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.999; + } + datah = data; + } + + for (int i = 0; i < datah.length; i++) + datab[i] += datah[i] * 0.5; + for (int i = 0; i < 5; i++) + datab[i] *= i / 5.0; + + SF2Sample sample = newSimpleDrumSample(sf2, "Bass Drum", datab); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Bass Drum"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_tom(SF2Soundbank sf2) { + + double datab[]; + double datah[]; + + // Make Bass Part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + complexGaussianDist(data, 30, 0.5, 1); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.8); + data = realPart(data); + + double d_len = data.length; + for (int i = 0; i < data.length; i++) + data[i] *= (1.0 - (i / d_len)); + datab = data; + } + + // Make treble part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024 * 4; i < 2048 * 4; i++) + data[i] = 1.0 - (i - 4096) / 4096.0; + for (int i = 0; i < 200; i++) { + double g = (1.0 - (i / 200.0)); + data[i] *= 1.0 + 20 * g * g; + } + for (int i = 0; i < 30; i++) + data[i] = 0; + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9996; + } + datah = data; + } + + for (int i = 0; i < datah.length; i++) + datab[i] += datah[i] * 0.5; + for (int i = 0; i < 5; i++) + datab[i] *= i / 5.0; + + normalize(datab, 0.99); + + SF2Sample sample = newSimpleDrumSample(sf2, "Tom", datab); + sample.setOriginalPitch(50); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Tom"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + //region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -100); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_closed_hihat(SF2Soundbank sf2) { + double datah[]; + + // Make treble part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024 * 4; i < 2048 * 4; i++) + data[i] = 1.0 - (i - 4096) / 4096.0; + for (int i = 0; i < 2048; i++) + data[i] = 0.2 + 0.8 * (i / 2048.0); + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9996; + } + datah = data; + } + + for (int i = 0; i < 5; i++) + datah[i] *= i / 5.0; + SF2Sample sample = newSimpleDrumSample(sf2, "Closed Hi-Hat", datah); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Closed Hi-Hat"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_EXCLUSIVECLASS, 1); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_open_hihat(SF2Soundbank sf2) { + double datah[]; + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)); + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 0; i < 200; i++) + data[i] = 0; + for (int i = 0; i < 2048 * 4; i++) { + double gain = (i / (2048.0 * 4.0)); + data[i] = gain; + } + datah = data; + } + + SF2Sample sample = newSimpleFFTSample(sf2, "Open Hi-Hat", datah, 1000, 5); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Open Hi-Hat"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 1500); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 1500); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_EXCLUSIVECLASS, 1); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_crash_cymbal(SF2Soundbank sf2) { + double datah[]; + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)); + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 0; i < 100; i++) + data[i] = 0; + for (int i = 0; i < 512 * 2; i++) { + double gain = (i / (512.0 * 2.0)); + data[i] = gain; + } + datah = data; + } + + SF2Sample sample = newSimpleFFTSample(sf2, "Crash Cymbal", datah, 1000, 5); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Crash Cymbal"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_DECAYVOLENV, 1800); + region.putInteger(SF2Region.GENERATOR_SAMPLEMODES, 1); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 1800); + region.putInteger(SF2Region.GENERATOR_SUSTAINVOLENV, 1000); + region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + } + + public static SF2Layer new_side_stick(SF2Soundbank sf2) { + double datab[]; + + // Make treble part + { + int fftlen = 4096 * 4; + double[] data = new double[2 * fftlen]; + Random random = new Random(3049912); + for (int i = 0; i < data.length; i += 2) + data[i] = (2.0 * (random.nextDouble() - 0.5)) * 0.1; + fft(data); + // Remove all negative frequency + for (int i = fftlen / 2; i < data.length; i++) + data[i] = 0; + for (int i = 1024 * 4; i < 2048 * 4; i++) + data[i] = 1.0 - (i - 4096) / 4096.0; + for (int i = 0; i < 200; i++) { + double g = (1.0 - (i / 200.0)); + data[i] *= 1.0 + 20 * g * g; + } + for (int i = 0; i < 30; i++) + data[i] = 0; + randomPhase(data, new Random(3049912)); + ifft(data); + normalize(data, 0.9); + data = realPart(data); + double gain = 1.0; + for (int i = 0; i < data.length; i++) { + data[i] *= gain; + gain *= 0.9996; + } + datab = data; + } + + for (int i = 0; i < 10; i++) + datab[i] *= i / 10.0; + + SF2Sample sample = newSimpleDrumSample(sf2, "Side Stick", datab); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName("Side Stick"); + + SF2GlobalRegion global = new SF2GlobalRegion(); + layer.setGlobalZone(global); + sf2.addResource(layer); + + SF2LayerRegion region = new SF2LayerRegion(); + region.putInteger(SF2Region.GENERATOR_RELEASEVOLENV, 12000); + region.putInteger(SF2Region.GENERATOR_SCALETUNING, 0); + region.putInteger(SF2Region.GENERATOR_INITIALATTENUATION, -50); + region.setSample(sample); + layer.getRegions().add(region); + + return layer; + + } + + public static SF2Sample newSimpleFFTSample(SF2Soundbank sf2, String name, + double[] data, double base) { + return newSimpleFFTSample(sf2, name, data, base, 10); + } + + public static SF2Sample newSimpleFFTSample(SF2Soundbank sf2, String name, + double[] data, double base, int fadeuptime) { + + int fftsize = data.length / 2; + AudioFormat format = new AudioFormat(44100, 16, 1, true, false); + double basefreq = (base / fftsize) * format.getSampleRate() * 0.5; + + randomPhase(data); + ifft(data); + data = realPart(data); + normalize(data, 0.9); + float[] fdata = toFloat(data); + fdata = loopExtend(fdata, fdata.length + 512); + fadeUp(fdata, fadeuptime); + byte[] bdata = toBytes(fdata, format); + + /* + * Create SoundFont2 sample. + */ + SF2Sample sample = new SF2Sample(sf2); + sample.setName(name); + sample.setData(bdata); + sample.setStartLoop(256); + sample.setEndLoop(fftsize + 256); + sample.setSampleRate((long) format.getSampleRate()); + double orgnote = (69 + 12) + + (12 * Math.log(basefreq / 440.0) / Math.log(2)); + sample.setOriginalPitch((int) orgnote); + sample.setPitchCorrection((byte) (-(orgnote - (int) orgnote) * 100.0)); + sf2.addResource(sample); + + return sample; + } + + public static SF2Sample newSimpleFFTSample_dist(SF2Soundbank sf2, + String name, double[] data, double base, double preamp) { + + int fftsize = data.length / 2; + AudioFormat format = new AudioFormat(44100, 16, 1, true, false); + double basefreq = (base / fftsize) * format.getSampleRate() * 0.5; + + randomPhase(data); + ifft(data); + data = realPart(data); + + for (int i = 0; i < data.length; i++) { + data[i] = (1 - Math.exp(-Math.abs(data[i] * preamp))) + * Math.signum(data[i]); + } + + normalize(data, 0.9); + float[] fdata = toFloat(data); + fdata = loopExtend(fdata, fdata.length + 512); + fadeUp(fdata, 80); + byte[] bdata = toBytes(fdata, format); + + /* + * Create SoundFont2 sample. + */ + SF2Sample sample = new SF2Sample(sf2); + sample.setName(name); + sample.setData(bdata); + sample.setStartLoop(256); + sample.setEndLoop(fftsize + 256); + sample.setSampleRate((long) format.getSampleRate()); + double orgnote = (69 + 12) + + (12 * Math.log(basefreq / 440.0) / Math.log(2)); + sample.setOriginalPitch((int) orgnote); + sample.setPitchCorrection((byte) (-(orgnote - (int) orgnote) * 100.0)); + sf2.addResource(sample); + + return sample; + } + + public static SF2Sample newSimpleDrumSample(SF2Soundbank sf2, String name, + double[] data) { + + int fftsize = data.length; + AudioFormat format = new AudioFormat(44100, 16, 1, true, false); + + byte[] bdata = toBytes(toFloat(realPart(data)), format); + + /* + * Create SoundFont2 sample. + */ + SF2Sample sample = new SF2Sample(sf2); + sample.setName(name); + sample.setData(bdata); + sample.setStartLoop(256); + sample.setEndLoop(fftsize + 256); + sample.setSampleRate((long) format.getSampleRate()); + sample.setOriginalPitch(60); + sf2.addResource(sample); + + return sample; + } + + public static SF2Layer newLayer(SF2Soundbank sf2, String name, SF2Sample sample) { + SF2LayerRegion region = new SF2LayerRegion(); + region.setSample(sample); + + SF2Layer layer = new SF2Layer(sf2); + layer.setName(name); + layer.getRegions().add(region); + sf2.addResource(layer); + + return layer; + } + + public static SF2Instrument newInstrument(SF2Soundbank sf2, String name, + Patch patch, SF2Layer... layers) { + + /* + * Create SoundFont2 instrument. + */ + SF2Instrument ins = new SF2Instrument(sf2); + ins.setPatch(patch); + ins.setName(name); + sf2.addInstrument(ins); + + /* + * Create region for instrument. + */ + for (int i = 0; i < layers.length; i++) { + SF2InstrumentRegion insregion = new SF2InstrumentRegion(); + insregion.setLayer(layers[i]); + ins.getRegions().add(insregion); + } + + return ins; + } + + static public void ifft(double[] data) { + new FFT(data.length / 2, 1).transform(data); + } + + static public void fft(double[] data) { + new FFT(data.length / 2, -1).transform(data); + } + + public static void complexGaussianDist(double[] cdata, double m, + double s, double v) { + for (int x = 0; x < cdata.length / 4; x++) { + cdata[x * 2] += v * (1.0 / (s * Math.sqrt(2 * Math.PI)) + * Math.exp((-1.0 / 2.0) * Math.pow((x - m) / s, 2.0))); + } + } + + static public void randomPhase(double[] data) { + for (int i = 0; i < data.length; i += 2) { + double phase = Math.random() * 2 * Math.PI; + double d = data[i]; + data[i] = Math.sin(phase) * d; + data[i + 1] = Math.cos(phase) * d; + } + } + + static public void randomPhase(double[] data, Random random) { + for (int i = 0; i < data.length; i += 2) { + double phase = random.nextDouble() * 2 * Math.PI; + double d = data[i]; + data[i] = Math.sin(phase) * d; + data[i + 1] = Math.cos(phase) * d; + } + } + + static public void normalize(double[] data, double target) { + double maxvalue = 0; + for (int i = 0; i < data.length; i++) { + if (data[i] > maxvalue) + maxvalue = data[i]; + if (-data[i] > maxvalue) + maxvalue = -data[i]; + } + if (maxvalue == 0) + return; + double gain = target / maxvalue; + for (int i = 0; i < data.length; i++) + data[i] *= gain; + } + + static public void normalize(float[] data, double target) { + double maxvalue = 0.5; + for (int i = 0; i < data.length; i++) { + if (data[i * 2] > maxvalue) + maxvalue = data[i * 2]; + if (-data[i * 2] > maxvalue) + maxvalue = -data[i * 2]; + } + double gain = target / maxvalue; + for (int i = 0; i < data.length; i++) + data[i * 2] *= gain; + } + + static public double[] realPart(double[] in) { + double[] out = new double[in.length / 2]; + for (int i = 0; i < out.length; i++) { + out[i] = in[i * 2]; + } + return out; + } + + static public double[] imgPart(double[] in) { + double[] out = new double[in.length / 2]; + for (int i = 0; i < out.length; i++) { + out[i] = in[i * 2]; + } + return out; + } + + static public float[] toFloat(double[] in) { + float[] out = new float[in.length]; + for (int i = 0; i < out.length; i++) { + out[i] = (float) in[i]; + } + return out; + } + + static public byte[] toBytes(float[] in, AudioFormat format) { + byte[] out = new byte[in.length * format.getFrameSize()]; + return AudioFloatConverter.getConverter(format).toByteArray(in, out); + } + + static public void fadeUp(double[] data, int samples) { + double dsamples = samples; + for (int i = 0; i < samples; i++) + data[i] *= i / dsamples; + } + + static public void fadeUp(float[] data, int samples) { + double dsamples = samples; + for (int i = 0; i < samples; i++) + data[i] *= i / dsamples; + } + + static public double[] loopExtend(double[] data, int newsize) { + double[] outdata = new double[newsize]; + int p_len = data.length; + int p_ps = 0; + for (int i = 0; i < outdata.length; i++) { + outdata[i] = data[p_ps]; + p_ps++; + if (p_ps == p_len) + p_ps = 0; + } + return outdata; + } + + static public float[] loopExtend(float[] data, int newsize) { + float[] outdata = new float[newsize]; + int p_len = data.length; + int p_ps = 0; + for (int i = 0; i < outdata.length; i++) { + outdata[i] = data[p_ps]; + p_ps++; + if (p_ps == p_len) + p_ps = 0; + } + return outdata; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/FFT.java b/jdk/src/share/classes/com/sun/media/sound/FFT.java new file mode 100644 index 00000000000..2e297e127d7 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/FFT.java @@ -0,0 +1,748 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * Fast Fourier Transformer. + * + * @author Karl Helgason + */ +public final class FFT { + + private double[] w; + private int fftFrameSize; + private int sign; + private int[] bitm_array; + private int fftFrameSize2; + + // Sign = -1 is FFT, 1 is IFFT (inverse FFT) + // Data = Interlaced double array to be transformed. + // The order is: real (sin), complex (cos) + // Framesize must be power of 2 + public FFT(int fftFrameSize, int sign) { + w = computeTwiddleFactors(fftFrameSize, sign); + + this.fftFrameSize = fftFrameSize; + this.sign = sign; + fftFrameSize2 = fftFrameSize << 1; + + // Pre-process Bit-Reversal + bitm_array = new int[fftFrameSize2]; + for (int i = 2; i < fftFrameSize2; i += 2) { + int j; + int bitm; + for (bitm = 2, j = 0; bitm < fftFrameSize2; bitm <<= 1) { + if ((i & bitm) != 0) + j++; + j <<= 1; + } + bitm_array[i] = j; + } + + } + + public void transform(double[] data) { + bitreversal(data); + calc(fftFrameSize, data, sign, w); + } + + private final static double[] computeTwiddleFactors(int fftFrameSize, + int sign) { + + int imax = (int) (Math.log(fftFrameSize) / Math.log(2.)); + + double[] warray = new double[(fftFrameSize - 1) * 4]; + int w_index = 0; + + for (int i = 0, nstep = 2; i < imax; i++) { + int jmax = nstep; + nstep <<= 1; + + double wr = 1.0; + double wi = 0.0; + + double arg = Math.PI / (jmax >> 1); + double wfr = Math.cos(arg); + double wfi = sign * Math.sin(arg); + + for (int j = 0; j < jmax; j += 2) { + warray[w_index++] = wr; + warray[w_index++] = wi; + + double tempr = wr; + wr = tempr * wfr - wi * wfi; + wi = tempr * wfi + wi * wfr; + } + } + + // PRECOMPUTATION of wwr1, wwi1 for factor 4 Decomposition (3 * complex + // operators and 8 +/- complex operators) + { + w_index = 0; + int w_index2 = warray.length >> 1; + for (int i = 0, nstep = 2; i < (imax - 1); i++) { + int jmax = nstep; + nstep *= 2; + + int ii = w_index + jmax; + for (int j = 0; j < jmax; j += 2) { + double wr = warray[w_index++]; + double wi = warray[w_index++]; + double wr1 = warray[ii++]; + double wi1 = warray[ii++]; + warray[w_index2++] = wr * wr1 - wi * wi1; + warray[w_index2++] = wr * wi1 + wi * wr1; + } + } + + } + + return warray; + } + + private final static void calc(int fftFrameSize, double[] data, int sign, + double[] w) { + + final int fftFrameSize2 = fftFrameSize << 1; + + int nstep = 2; + + if (nstep >= fftFrameSize2) + return; + int i = nstep - 2; + if (sign == -1) + calcF4F(fftFrameSize, data, i, nstep, w); + else + calcF4I(fftFrameSize, data, i, nstep, w); + + } + + private final static void calcF2E(int fftFrameSize, double[] data, int i, + int nstep, double[] w) { + int jmax = nstep; + for (int n = 0; n < jmax; n += 2) { + double wr = w[i++]; + double wi = w[i++]; + int m = n + jmax; + double datam_r = data[m]; + double datam_i = data[m + 1]; + double datan_r = data[n]; + double datan_i = data[n + 1]; + double tempr = datam_r * wr - datam_i * wi; + double tempi = datam_r * wi + datam_i * wr; + data[m] = datan_r - tempr; + data[m + 1] = datan_i - tempi; + data[n] = datan_r + tempr; + data[n + 1] = datan_i + tempi; + } + return; + + } + + // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/- + // complex operators + private final static void calcF4F(int fftFrameSize, double[] data, int i, + int nstep, double[] w) { + final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize; + // Factor-4 Decomposition + + int w_len = w.length >> 1; + while (nstep < fftFrameSize2) { + + if (nstep << 2 == fftFrameSize2) { + // Goto Factor-4 Final Decomposition + // calcF4E(data, i, nstep, -1, w); + calcF4FE(fftFrameSize, data, i, nstep, w); + return; + } + int jmax = nstep; + int nnstep = nstep << 1; + if (nnstep == fftFrameSize2) { + // Factor-4 Decomposition not possible + calcF2E(fftFrameSize, data, i, nstep, w); + return; + } + nstep <<= 2; + int ii = i + jmax; + int iii = i + w_len; + + { + i += 2; + ii += 2; + iii += 2; + + for (int n = 0; n < fftFrameSize2; n += nstep) { + int m = n + jmax; + + double datam1_r = data[m]; + double datam1_i = data[m + 1]; + double datan1_r = data[n]; + double datan1_i = data[n + 1]; + + n += nnstep; + m += nnstep; + double datam2_r = data[m]; + double datam2_i = data[m + 1]; + double datan2_r = data[n]; + double datan2_i = data[n + 1]; + + double tempr = datam1_r; + double tempi = datam1_i; + + datam1_r = datan1_r - tempr; + datam1_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + double n2w1r = datan2_r; + double n2w1i = datan2_i; + double m2ww1r = datam2_r; + double m2ww1i = datam2_i; + + tempr = m2ww1r - n2w1r; + tempi = m2ww1i - n2w1i; + + datam2_r = datam1_r + tempi; + datam2_i = datam1_i - tempr; + datam1_r = datam1_r - tempi; + datam1_i = datam1_i + tempr; + + tempr = n2w1r + m2ww1r; + tempi = n2w1i + m2ww1i; + + datan2_r = datan1_r - tempr; + datan2_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + data[m] = datam2_r; + data[m + 1] = datam2_i; + data[n] = datan2_r; + data[n + 1] = datan2_i; + + n -= nnstep; + m -= nnstep; + data[m] = datam1_r; + data[m + 1] = datam1_i; + data[n] = datan1_r; + data[n + 1] = datan1_i; + + } + } + + for (int j = 2; j < jmax; j += 2) { + double wr = w[i++]; + double wi = w[i++]; + double wr1 = w[ii++]; + double wi1 = w[ii++]; + double wwr1 = w[iii++]; + double wwi1 = w[iii++]; + // double wwr1 = wr * wr1 - wi * wi1; // these numbers can be + // precomputed!!! + // double wwi1 = wr * wi1 + wi * wr1; + + for (int n = j; n < fftFrameSize2; n += nstep) { + int m = n + jmax; + + double datam1_r = data[m]; + double datam1_i = data[m + 1]; + double datan1_r = data[n]; + double datan1_i = data[n + 1]; + + n += nnstep; + m += nnstep; + double datam2_r = data[m]; + double datam2_i = data[m + 1]; + double datan2_r = data[n]; + double datan2_i = data[n + 1]; + + double tempr = datam1_r * wr - datam1_i * wi; + double tempi = datam1_r * wi + datam1_i * wr; + + datam1_r = datan1_r - tempr; + datam1_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + double n2w1r = datan2_r * wr1 - datan2_i * wi1; + double n2w1i = datan2_r * wi1 + datan2_i * wr1; + double m2ww1r = datam2_r * wwr1 - datam2_i * wwi1; + double m2ww1i = datam2_r * wwi1 + datam2_i * wwr1; + + tempr = m2ww1r - n2w1r; + tempi = m2ww1i - n2w1i; + + datam2_r = datam1_r + tempi; + datam2_i = datam1_i - tempr; + datam1_r = datam1_r - tempi; + datam1_i = datam1_i + tempr; + + tempr = n2w1r + m2ww1r; + tempi = n2w1i + m2ww1i; + + datan2_r = datan1_r - tempr; + datan2_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + data[m] = datam2_r; + data[m + 1] = datam2_i; + data[n] = datan2_r; + data[n + 1] = datan2_i; + + n -= nnstep; + m -= nnstep; + data[m] = datam1_r; + data[m + 1] = datam1_i; + data[n] = datan1_r; + data[n + 1] = datan1_i; + } + } + + i += jmax << 1; + + } + + calcF2E(fftFrameSize, data, i, nstep, w); + + } + + // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/- + // complex operators + private final static void calcF4I(int fftFrameSize, double[] data, int i, + int nstep, double[] w) { + final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize; + // Factor-4 Decomposition + + int w_len = w.length >> 1; + while (nstep < fftFrameSize2) { + + if (nstep << 2 == fftFrameSize2) { + // Goto Factor-4 Final Decomposition + // calcF4E(data, i, nstep, 1, w); + calcF4IE(fftFrameSize, data, i, nstep, w); + return; + } + int jmax = nstep; + int nnstep = nstep << 1; + if (nnstep == fftFrameSize2) { + // Factor-4 Decomposition not possible + calcF2E(fftFrameSize, data, i, nstep, w); + return; + } + nstep <<= 2; + int ii = i + jmax; + int iii = i + w_len; + { + i += 2; + ii += 2; + iii += 2; + + for (int n = 0; n < fftFrameSize2; n += nstep) { + int m = n + jmax; + + double datam1_r = data[m]; + double datam1_i = data[m + 1]; + double datan1_r = data[n]; + double datan1_i = data[n + 1]; + + n += nnstep; + m += nnstep; + double datam2_r = data[m]; + double datam2_i = data[m + 1]; + double datan2_r = data[n]; + double datan2_i = data[n + 1]; + + double tempr = datam1_r; + double tempi = datam1_i; + + datam1_r = datan1_r - tempr; + datam1_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + double n2w1r = datan2_r; + double n2w1i = datan2_i; + double m2ww1r = datam2_r; + double m2ww1i = datam2_i; + + tempr = n2w1r - m2ww1r; + tempi = n2w1i - m2ww1i; + + datam2_r = datam1_r + tempi; + datam2_i = datam1_i - tempr; + datam1_r = datam1_r - tempi; + datam1_i = datam1_i + tempr; + + tempr = n2w1r + m2ww1r; + tempi = n2w1i + m2ww1i; + + datan2_r = datan1_r - tempr; + datan2_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + data[m] = datam2_r; + data[m + 1] = datam2_i; + data[n] = datan2_r; + data[n + 1] = datan2_i; + + n -= nnstep; + m -= nnstep; + data[m] = datam1_r; + data[m + 1] = datam1_i; + data[n] = datan1_r; + data[n + 1] = datan1_i; + + } + + } + for (int j = 2; j < jmax; j += 2) { + double wr = w[i++]; + double wi = w[i++]; + double wr1 = w[ii++]; + double wi1 = w[ii++]; + double wwr1 = w[iii++]; + double wwi1 = w[iii++]; + // double wwr1 = wr * wr1 - wi * wi1; // these numbers can be + // precomputed!!! + // double wwi1 = wr * wi1 + wi * wr1; + + for (int n = j; n < fftFrameSize2; n += nstep) { + int m = n + jmax; + + double datam1_r = data[m]; + double datam1_i = data[m + 1]; + double datan1_r = data[n]; + double datan1_i = data[n + 1]; + + n += nnstep; + m += nnstep; + double datam2_r = data[m]; + double datam2_i = data[m + 1]; + double datan2_r = data[n]; + double datan2_i = data[n + 1]; + + double tempr = datam1_r * wr - datam1_i * wi; + double tempi = datam1_r * wi + datam1_i * wr; + + datam1_r = datan1_r - tempr; + datam1_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + double n2w1r = datan2_r * wr1 - datan2_i * wi1; + double n2w1i = datan2_r * wi1 + datan2_i * wr1; + double m2ww1r = datam2_r * wwr1 - datam2_i * wwi1; + double m2ww1i = datam2_r * wwi1 + datam2_i * wwr1; + + tempr = n2w1r - m2ww1r; + tempi = n2w1i - m2ww1i; + + datam2_r = datam1_r + tempi; + datam2_i = datam1_i - tempr; + datam1_r = datam1_r - tempi; + datam1_i = datam1_i + tempr; + + tempr = n2w1r + m2ww1r; + tempi = n2w1i + m2ww1i; + + datan2_r = datan1_r - tempr; + datan2_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + data[m] = datam2_r; + data[m + 1] = datam2_i; + data[n] = datan2_r; + data[n + 1] = datan2_i; + + n -= nnstep; + m -= nnstep; + data[m] = datam1_r; + data[m + 1] = datam1_i; + data[n] = datan1_r; + data[n + 1] = datan1_i; + + } + } + + i += jmax << 1; + + } + + calcF2E(fftFrameSize, data, i, nstep, w); + + } + + // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/- + // complex operators + private final static void calcF4FE(int fftFrameSize, double[] data, int i, + int nstep, double[] w) { + final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize; + // Factor-4 Decomposition + + int w_len = w.length >> 1; + while (nstep < fftFrameSize2) { + + int jmax = nstep; + int nnstep = nstep << 1; + if (nnstep == fftFrameSize2) { + // Factor-4 Decomposition not possible + calcF2E(fftFrameSize, data, i, nstep, w); + return; + } + nstep <<= 2; + int ii = i + jmax; + int iii = i + w_len; + for (int n = 0; n < jmax; n += 2) { + double wr = w[i++]; + double wi = w[i++]; + double wr1 = w[ii++]; + double wi1 = w[ii++]; + double wwr1 = w[iii++]; + double wwi1 = w[iii++]; + // double wwr1 = wr * wr1 - wi * wi1; // these numbers can be + // precomputed!!! + // double wwi1 = wr * wi1 + wi * wr1; + + int m = n + jmax; + + double datam1_r = data[m]; + double datam1_i = data[m + 1]; + double datan1_r = data[n]; + double datan1_i = data[n + 1]; + + n += nnstep; + m += nnstep; + double datam2_r = data[m]; + double datam2_i = data[m + 1]; + double datan2_r = data[n]; + double datan2_i = data[n + 1]; + + double tempr = datam1_r * wr - datam1_i * wi; + double tempi = datam1_r * wi + datam1_i * wr; + + datam1_r = datan1_r - tempr; + datam1_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + double n2w1r = datan2_r * wr1 - datan2_i * wi1; + double n2w1i = datan2_r * wi1 + datan2_i * wr1; + double m2ww1r = datam2_r * wwr1 - datam2_i * wwi1; + double m2ww1i = datam2_r * wwi1 + datam2_i * wwr1; + + tempr = m2ww1r - n2w1r; + tempi = m2ww1i - n2w1i; + + datam2_r = datam1_r + tempi; + datam2_i = datam1_i - tempr; + datam1_r = datam1_r - tempi; + datam1_i = datam1_i + tempr; + + tempr = n2w1r + m2ww1r; + tempi = n2w1i + m2ww1i; + + datan2_r = datan1_r - tempr; + datan2_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + data[m] = datam2_r; + data[m + 1] = datam2_i; + data[n] = datan2_r; + data[n + 1] = datan2_i; + + n -= nnstep; + m -= nnstep; + data[m] = datam1_r; + data[m + 1] = datam1_i; + data[n] = datan1_r; + data[n + 1] = datan1_i; + + } + + i += jmax << 1; + + } + + } + + // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/- + // complex operators + private final static void calcF4IE(int fftFrameSize, double[] data, int i, + int nstep, double[] w) { + final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize; + // Factor-4 Decomposition + + int w_len = w.length >> 1; + while (nstep < fftFrameSize2) { + + int jmax = nstep; + int nnstep = nstep << 1; + if (nnstep == fftFrameSize2) { + // Factor-4 Decomposition not possible + calcF2E(fftFrameSize, data, i, nstep, w); + return; + } + nstep <<= 2; + int ii = i + jmax; + int iii = i + w_len; + for (int n = 0; n < jmax; n += 2) { + double wr = w[i++]; + double wi = w[i++]; + double wr1 = w[ii++]; + double wi1 = w[ii++]; + double wwr1 = w[iii++]; + double wwi1 = w[iii++]; + // double wwr1 = wr * wr1 - wi * wi1; // these numbers can be + // precomputed!!! + // double wwi1 = wr * wi1 + wi * wr1; + + int m = n + jmax; + + double datam1_r = data[m]; + double datam1_i = data[m + 1]; + double datan1_r = data[n]; + double datan1_i = data[n + 1]; + + n += nnstep; + m += nnstep; + double datam2_r = data[m]; + double datam2_i = data[m + 1]; + double datan2_r = data[n]; + double datan2_i = data[n + 1]; + + double tempr = datam1_r * wr - datam1_i * wi; + double tempi = datam1_r * wi + datam1_i * wr; + + datam1_r = datan1_r - tempr; + datam1_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + double n2w1r = datan2_r * wr1 - datan2_i * wi1; + double n2w1i = datan2_r * wi1 + datan2_i * wr1; + double m2ww1r = datam2_r * wwr1 - datam2_i * wwi1; + double m2ww1i = datam2_r * wwi1 + datam2_i * wwr1; + + tempr = n2w1r - m2ww1r; + tempi = n2w1i - m2ww1i; + + datam2_r = datam1_r + tempi; + datam2_i = datam1_i - tempr; + datam1_r = datam1_r - tempi; + datam1_i = datam1_i + tempr; + + tempr = n2w1r + m2ww1r; + tempi = n2w1i + m2ww1i; + + datan2_r = datan1_r - tempr; + datan2_i = datan1_i - tempi; + datan1_r = datan1_r + tempr; + datan1_i = datan1_i + tempi; + + data[m] = datam2_r; + data[m + 1] = datam2_i; + data[n] = datan2_r; + data[n + 1] = datan2_i; + + n -= nnstep; + m -= nnstep; + data[m] = datam1_r; + data[m + 1] = datam1_i; + data[n] = datan1_r; + data[n + 1] = datan1_i; + + } + + i += jmax << 1; + + } + + } + + private final void bitreversal(double[] data) { + if (fftFrameSize < 4) + return; + + int inverse = fftFrameSize2 - 2; + for (int i = 0; i < fftFrameSize; i += 4) { + int j = bitm_array[i]; + + // Performing Bit-Reversal, even v.s. even, O(2N) + if (i < j) { + + int n = i; + int m = j; + + // COMPLEX: SWAP(data[n], data[m]) + // Real Part + double tempr = data[n]; + data[n] = data[m]; + data[m] = tempr; + // Imagery Part + n++; + m++; + double tempi = data[n]; + data[n] = data[m]; + data[m] = tempi; + + n = inverse - i; + m = inverse - j; + + // COMPLEX: SWAP(data[n], data[m]) + // Real Part + tempr = data[n]; + data[n] = data[m]; + data[m] = tempr; + // Imagery Part + n++; + m++; + tempi = data[n]; + data[n] = data[m]; + data[m] = tempi; + } + + // Performing Bit-Reversal, odd v.s. even, O(N) + + int m = j + fftFrameSize; // bitm_array[i+2]; + // COMPLEX: SWAP(data[n], data[m]) + // Real Part + int n = i + 2; + double tempr = data[n]; + data[n] = data[m]; + data[m] = tempr; + // Imagery Part + n++; + m++; + double tempi = data[n]; + data[n] = data[m]; + data[m] = tempi; + } + + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/InvalidDataException.java b/jdk/src/share/classes/com/sun/media/sound/InvalidDataException.java new file mode 100644 index 00000000000..ab46ef370d5 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/InvalidDataException.java @@ -0,0 +1,45 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.IOException; + +/** + * This exception is used when a file contains illegal or unexpected data. + * + * @author Karl Helgason + */ +public class InvalidDataException extends IOException { + + private static final long serialVersionUID = 1L; + + public InvalidDataException() { + super("Invalid Data!"); + } + + public InvalidDataException(String s) { + super(s); + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/InvalidFormatException.java b/jdk/src/share/classes/com/sun/media/sound/InvalidFormatException.java new file mode 100644 index 00000000000..96aaa02250e --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/InvalidFormatException.java @@ -0,0 +1,44 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * This exception is used when a reader is used to read file of a format + * it doesn't unterstand or support. + * + * @author Karl Helgason + */ +public class InvalidFormatException extends InvalidDataException { + + private static final long serialVersionUID = 1L; + + public InvalidFormatException() { + super("Invalid format!"); + } + + public InvalidFormatException(String s) { + super(s); + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/JARSoundbankReader.java b/jdk/src/share/classes/com/sun/media/sound/JARSoundbankReader.java new file mode 100644 index 00000000000..442fe72c31a --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/JARSoundbankReader.java @@ -0,0 +1,120 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import javax.sound.midi.InvalidMidiDataException; +import javax.sound.midi.Soundbank; +import javax.sound.midi.spi.SoundbankReader; + +/** + * JarSoundbankReader is used to read sounbank object from jar files. + * + * @author Karl Helgason + */ +public class JARSoundbankReader extends SoundbankReader { + + public boolean isZIP(URL url) { + boolean ok = false; + try { + InputStream stream = url.openStream(); + try { + byte[] buff = new byte[4]; + ok = stream.read(buff) == 4; + if (ok) { + ok = (buff[0] == 0x50 + && buff[1] == 0x4b + && buff[2] == 0x03 + && buff[3] == 0x04); + } + } finally { + stream.close(); + } + } catch (IOException e) { + } + return ok; + } + + public Soundbank getSoundbank(URL url) + throws InvalidMidiDataException, IOException { + if (!isZIP(url)) + return null; + ArrayList soundbanks = new ArrayList(); + URLClassLoader ucl = URLClassLoader.newInstance(new URL[]{url}); + InputStream stream = ucl.getResourceAsStream( + "META-INF/services/javax.sound.midi.Soundbank"); + if (stream == null) + return null; + try + { + BufferedReader r = new BufferedReader(new InputStreamReader(stream)); + String line = r.readLine(); + while (line != null) { + if (!line.startsWith("#")) { + try { + Class c = Class.forName(line.trim(), true, ucl); + Object o = c.newInstance(); + if (o instanceof Soundbank) { + soundbanks.add((Soundbank) o); + } + } catch (ClassNotFoundException e) { + } catch (InstantiationException e) { + } catch (IllegalAccessException e) { + } + } + line = r.readLine(); + } + } + finally + { + stream.close(); + } + if (soundbanks.size() == 0) + return null; + if (soundbanks.size() == 1) + return soundbanks.get(0); + SimpleSoundbank sbk = new SimpleSoundbank(); + for (Soundbank soundbank : soundbanks) + sbk.addAllInstruments(soundbank); + return sbk; + } + + public Soundbank getSoundbank(InputStream stream) + throws InvalidMidiDataException, IOException { + return null; + } + + public Soundbank getSoundbank(File file) + throws InvalidMidiDataException, IOException { + return getSoundbank(file.toURI().toURL()); + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/ModelAbstractChannelMixer.java b/jdk/src/share/classes/com/sun/media/sound/ModelAbstractChannelMixer.java new file mode 100644 index 00000000000..37b14fe1a74 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/ModelAbstractChannelMixer.java @@ -0,0 +1,126 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +/** + * ModelAbstractChannelMixer is ready for use class to implement + * ModelChannelMixer interface. + * + * @author Karl Helgason + */ +public abstract class ModelAbstractChannelMixer implements ModelChannelMixer { + + public abstract boolean process(float[][] buffer, int offset, int len); + + public abstract void stop(); + + public void allNotesOff() { + } + + public void allSoundOff() { + } + + public void controlChange(int controller, int value) { + } + + public int getChannelPressure() { + return 0; + } + + public int getController(int controller) { + return 0; + } + + public boolean getMono() { + return false; + } + + public boolean getMute() { + return false; + } + + public boolean getOmni() { + return false; + } + + public int getPitchBend() { + return 0; + } + + public int getPolyPressure(int noteNumber) { + return 0; + } + + public int getProgram() { + return 0; + } + + public boolean getSolo() { + return false; + } + + public boolean localControl(boolean on) { + return false; + } + + public void noteOff(int noteNumber) { + } + + public void noteOff(int noteNumber, int velocity) { + } + + public void noteOn(int noteNumber, int velocity) { + } + + public void programChange(int program) { + } + + public void programChange(int bank, int program) { + } + + public void resetAllControllers() { + } + + public void setChannelPressure(int pressure) { + } + + public void setMono(boolean on) { + } + + public void setMute(boolean mute) { + } + + public void setOmni(boolean on) { + } + + public void setPitchBend(int bend) { + } + + public void setPolyPressure(int noteNumber, int pressure) { + } + + public void setSolo(boolean soloState) { + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/ModelAbstractOscillator.java b/jdk/src/share/classes/com/sun/media/sound/ModelAbstractOscillator.java new file mode 100644 index 00000000000..5d5c7e937af --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/ModelAbstractOscillator.java @@ -0,0 +1,200 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.IOException; +import javax.sound.midi.Instrument; +import javax.sound.midi.MidiChannel; +import javax.sound.midi.Patch; +import javax.sound.midi.Soundbank; +import javax.sound.midi.SoundbankResource; +import javax.sound.midi.VoiceStatus; + +/** + * A abstract class used to simplify creating custom ModelOscillator. + * + * @author Karl Helgason + */ +public abstract class ModelAbstractOscillator + implements ModelOscillator, ModelOscillatorStream, Soundbank { + + protected float pitch = 6000; + protected float samplerate; + protected MidiChannel channel; + protected VoiceStatus voice; + protected int noteNumber; + protected int velocity; + protected boolean on = false; + + public void init() { + } + + public void close() throws IOException { + } + + public void noteOff(int velocity) { + on = false; + } + + public void noteOn(MidiChannel channel, VoiceStatus voice, int noteNumber, + int velocity) { + this.channel = channel; + this.voice = voice; + this.noteNumber = noteNumber; + this.velocity = velocity; + on = true; + } + + public int read(float[][] buffer, int offset, int len) throws IOException { + return -1; + } + + public MidiChannel getChannel() { + return channel; + } + + public VoiceStatus getVoice() { + return voice; + } + + public int getNoteNumber() { + return noteNumber; + } + + public int getVelocity() { + return velocity; + } + + public boolean isOn() { + return on; + } + + public void setPitch(float pitch) { + this.pitch = pitch; + } + + public float getPitch() { + return pitch; + } + + public void setSampleRate(float samplerate) { + this.samplerate = samplerate; + } + + public float getSampleRate() { + return samplerate; + } + + public float getAttenuation() { + return 0; + } + + public int getChannels() { + return 1; + } + + public String getName() { + return getClass().getName(); + } + + public Patch getPatch() { + return new Patch(0, 0); + } + + public ModelOscillatorStream open(float samplerate) { + ModelAbstractOscillator oscs; + try { + oscs = this.getClass().newInstance(); + } catch (InstantiationException e) { + throw new IllegalArgumentException(e); + } catch (IllegalAccessException e) { + throw new IllegalArgumentException(e); + } + oscs.setSampleRate(samplerate); + oscs.init(); + return oscs; + } + + public ModelPerformer getPerformer() { + // Create performer for my custom oscillirator + ModelPerformer performer = new ModelPerformer(); + performer.getOscillators().add(this); + return performer; + + } + + public ModelInstrument getInstrument() { + // Create Instrument object around my performer + SimpleInstrument ins = new SimpleInstrument(); + ins.setName(getName()); + ins.add(getPerformer()); + ins.setPatch(getPatch()); + return ins; + + } + + public Soundbank getSoundBank() { + // Create Soundbank object around the instrument + SimpleSoundbank sbk = new SimpleSoundbank(); + sbk.addInstrument(getInstrument()); + return sbk; + } + + public String getDescription() { + return getName(); + } + + public Instrument getInstrument(Patch patch) { + Instrument ins = getInstrument(); + Patch p = ins.getPatch(); + if (p.getBank() != patch.getBank()) + return null; + if (p.getProgram() != patch.getProgram()) + return null; + if (p instanceof ModelPatch && patch instanceof ModelPatch) { + if (((ModelPatch)p).isPercussion() + != ((ModelPatch)patch).isPercussion()) { + return null; + } + } + return ins; + } + + public Instrument[] getInstruments() { + return new Instrument[]{getInstrument()}; + } + + public SoundbankResource[] getResources() { + return new SoundbankResource[0]; + } + + public String getVendor() { + return null; + } + + public String getVersion() { + return null; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/ModelByteBuffer.java b/jdk/src/share/classes/com/sun/media/sound/ModelByteBuffer.java new file mode 100644 index 00000000000..16c1125fb61 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/ModelByteBuffer.java @@ -0,0 +1,329 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.ByteArrayInputStream; +import java.io.DataInputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.RandomAccessFile; +import java.util.Collection; + +/** + * This class is a pointer to a binary array either in memory or on disk. + * + * @author Karl Helgason + */ +public class ModelByteBuffer { + + private ModelByteBuffer root = this; + private File file; + private long fileoffset; + private byte[] buffer; + private long offset; + private final long len; + + private class RandomFileInputStream extends InputStream { + + private RandomAccessFile raf; + private long left; + private long mark = 0; + private long markleft = 0; + + public RandomFileInputStream() throws IOException { + raf = new RandomAccessFile(root.file, "r"); + raf.seek(root.fileoffset + arrayOffset()); + left = capacity(); + } + + public int available() throws IOException { + if (left > Integer.MAX_VALUE) + return Integer.MAX_VALUE; + return (int)left; + } + + public synchronized void mark(int readlimit) { + try { + mark = raf.getFilePointer(); + markleft = left; + } catch (IOException e) { + //e.printStackTrace(); + } + } + + public boolean markSupported() { + return true; + } + + public synchronized void reset() throws IOException { + raf.seek(mark); + left = markleft; + } + + public long skip(long n) throws IOException { + if( n < 0) + return 0; + if (n > left) + n = left; + long p = raf.getFilePointer(); + raf.seek(p + n); + left -= n; + return n; + } + + public int read(byte b[], int off, int len) throws IOException { + if (len > left) + len = (int)left; + if (left == 0) + return -1; + len = raf.read(b, off, len); + if (len == -1) + return -1; + left -= len; + return len; + } + + public int read(byte[] b) throws IOException { + int len = b.length; + if (len > left) + len = (int)left; + if (left == 0) + return -1; + len = raf.read(b, 0, len); + if (len == -1) + return -1; + left -= len; + return len; + } + + public int read() throws IOException { + if (left == 0) + return -1; + int b = raf.read(); + if (b == -1) + return -1; + left--; + return b; + } + + public void close() throws IOException { + raf.close(); + } + } + + private ModelByteBuffer(ModelByteBuffer parent, + long beginIndex, long endIndex, boolean independent) { + this.root = parent.root; + this.offset = 0; + long parent_len = parent.len; + if (beginIndex < 0) + beginIndex = 0; + if (beginIndex > parent_len) + beginIndex = parent_len; + if (endIndex < 0) + endIndex = 0; + if (endIndex > parent_len) + endIndex = parent_len; + if (beginIndex > endIndex) + beginIndex = endIndex; + offset = beginIndex; + len = endIndex - beginIndex; + if (independent) { + buffer = root.buffer; + if (root.file != null) { + file = root.file; + fileoffset = root.fileoffset + arrayOffset(); + offset = 0; + } else + offset = arrayOffset(); + root = this; + } + } + + public ModelByteBuffer(byte[] buffer) { + this.buffer = buffer; + this.offset = 0; + this.len = buffer.length; + } + + public ModelByteBuffer(byte[] buffer, int offset, int len) { + this.buffer = buffer; + this.offset = offset; + this.len = len; + } + + public ModelByteBuffer(File file) { + this.file = file; + this.fileoffset = 0; + this.len = file.length(); + } + + public ModelByteBuffer(File file, long offset, long len) { + this.file = file; + this.fileoffset = offset; + this.len = len; + } + + public void writeTo(OutputStream out) throws IOException { + if (root.file != null && root.buffer == null) { + InputStream is = getInputStream(); + byte[] buff = new byte[1024]; + int ret; + while ((ret = is.read(buff)) != -1) + out.write(buff, 0, ret); + } else + out.write(array(), (int) arrayOffset(), (int) capacity()); + } + + public InputStream getInputStream() { + if (root.file != null && root.buffer == null) { + try { + return new RandomFileInputStream(); + } catch (IOException e) { + //e.printStackTrace(); + return null; + } + } + return new ByteArrayInputStream(array(), + (int)arrayOffset(), (int)capacity()); + } + + public ModelByteBuffer subbuffer(long beginIndex) { + return subbuffer(beginIndex, capacity()); + } + + public ModelByteBuffer subbuffer(long beginIndex, long endIndex) { + return subbuffer(beginIndex, endIndex, false); + } + + public ModelByteBuffer subbuffer(long beginIndex, long endIndex, + boolean independent) { + return new ModelByteBuffer(this, beginIndex, endIndex, independent); + } + + public byte[] array() { + return root.buffer; + } + + public long arrayOffset() { + if (root != this) + return root.arrayOffset() + offset; + return offset; + } + + public long capacity() { + return len; + } + + public ModelByteBuffer getRoot() { + return root; + } + + public File getFile() { + return file; + } + + public long getFilePointer() { + return fileoffset; + } + + public static void loadAll(Collection col) + throws IOException { + File selfile = null; + RandomAccessFile raf = null; + try { + for (ModelByteBuffer mbuff : col) { + mbuff = mbuff.root; + if (mbuff.file == null) + continue; + if (mbuff.buffer != null) + continue; + if (selfile == null || !selfile.equals(mbuff.file)) { + if (raf != null) { + raf.close(); + raf = null; + } + selfile = mbuff.file; + raf = new RandomAccessFile(mbuff.file, "r"); + } + raf.seek(mbuff.fileoffset); + byte[] buffer = new byte[(int) mbuff.capacity()]; + + int read = 0; + int avail = buffer.length; + while (read != avail) { + if (avail - read > 65536) { + raf.readFully(buffer, read, 65536); + read += 65536; + } else { + raf.readFully(buffer, read, avail - read); + read = avail; + } + + } + + mbuff.buffer = buffer; + mbuff.offset = 0; + } + } finally { + if (raf != null) + raf.close(); + } + } + + public void load() throws IOException { + if (root != this) { + root.load(); + return; + } + if (buffer != null) + return; + if (file == null) { + throw new IllegalStateException( + "No file associated with this ByteBuffer!"); + } + + DataInputStream is = new DataInputStream(getInputStream()); + buffer = new byte[(int) capacity()]; + offset = 0; + is.readFully(buffer); + is.close(); + + } + + public void unload() { + if (root != this) { + root.unload(); + return; + } + if (file == null) { + throw new IllegalStateException( + "No file associated with this ByteBuffer!"); + } + root.buffer = null; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java b/jdk/src/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java new file mode 100644 index 00000000000..d7da52a7643 --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/ModelByteBufferWavetable.java @@ -0,0 +1,281 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import java.io.IOException; +import java.io.InputStream; +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; +import javax.sound.sampled.AudioFormat.Encoding; + +/** + * Wavetable oscillator for pre-loaded data. + * + * @author Karl Helgason + */ +public class ModelByteBufferWavetable implements ModelWavetable { + + private class Buffer8PlusInputStream extends InputStream { + + private boolean bigendian; + private int framesize_pc; + int pos = 0; + int pos2 = 0; + int markpos = 0; + int markpos2 = 0; + + public Buffer8PlusInputStream() { + framesize_pc = format.getFrameSize() / format.getChannels(); + bigendian = format.isBigEndian(); + } + + public int read(byte[] b, int off, int len) throws IOException { + int avail = available(); + if (avail <= 0) + return -1; + if (len > avail) + len = avail; + byte[] buff1 = buffer.array(); + byte[] buff2 = buffer8.array(); + pos += buffer.arrayOffset(); + pos2 += buffer8.arrayOffset(); + if (bigendian) { + for (int i = 0; i < len; i += (framesize_pc + 1)) { + System.arraycopy(buff1, pos, b, i, framesize_pc); + System.arraycopy(buff2, pos2, b, i + framesize_pc, 1); + pos += framesize_pc; + pos2 += 1; + } + } else { + for (int i = 0; i < len; i += (framesize_pc + 1)) { + System.arraycopy(buff2, pos2, b, i, 1); + System.arraycopy(buff1, pos, b, i + 1, framesize_pc); + pos += framesize_pc; + pos2 += 1; + } + } + pos -= buffer.arrayOffset(); + pos2 -= buffer8.arrayOffset(); + return len; + } + + public long skip(long n) throws IOException { + int avail = available(); + if (avail <= 0) + return -1; + if (n > avail) + n = avail; + pos += (n / (framesize_pc + 1)) * (framesize_pc); + pos2 += n / (framesize_pc + 1); + return super.skip(n); + } + + public int read(byte[] b) throws IOException { + return read(b, 0, b.length); + } + + public int read() throws IOException { + byte[] b = new byte[1]; + int ret = read(b, 0, 1); + if (ret == -1) + return -1; + return 0 & 0xFF; + } + + public boolean markSupported() { + return true; + } + + public int available() throws IOException { + return (int)buffer.capacity() + (int)buffer8.capacity() - pos - pos2; + } + + public synchronized void mark(int readlimit) { + markpos = pos; + markpos2 = pos2; + } + + public synchronized void reset() throws IOException { + pos = markpos; + pos2 = markpos2; + + } + } + + private float loopStart = -1; + private float loopLength = -1; + private ModelByteBuffer buffer; + private ModelByteBuffer buffer8 = null; + private AudioFormat format = null; + private float pitchcorrection = 0; + private float attenuation = 0; + private int loopType = LOOP_TYPE_OFF; + + public ModelByteBufferWavetable(ModelByteBuffer buffer) { + this.buffer = buffer; + } + + public ModelByteBufferWavetable(ModelByteBuffer buffer, + float pitchcorrection) { + this.buffer = buffer; + this.pitchcorrection = pitchcorrection; + } + + public ModelByteBufferWavetable(ModelByteBuffer buffer, AudioFormat format) { + this.format = format; + this.buffer = buffer; + } + + public ModelByteBufferWavetable(ModelByteBuffer buffer, AudioFormat format, + float pitchcorrection) { + this.format = format; + this.buffer = buffer; + this.pitchcorrection = pitchcorrection; + } + + public void set8BitExtensionBuffer(ModelByteBuffer buffer) { + buffer8 = buffer; + } + + public ModelByteBuffer get8BitExtensionBuffer() { + return buffer8; + } + + public ModelByteBuffer getBuffer() { + return buffer; + } + + public AudioFormat getFormat() { + if (format == null) { + if (buffer == null) + return null; + InputStream is = buffer.getInputStream(); + AudioFormat format = null; + try { + format = AudioSystem.getAudioFileFormat(is).getFormat(); + } catch (Exception e) { + //e.printStackTrace(); + } + try { + is.close(); + } catch (IOException e) { + //e.printStackTrace(); + } + return format; + } + return format; + } + + public AudioFloatInputStream openStream() { + if (buffer == null) + return null; + if (format == null) { + InputStream is = buffer.getInputStream(); + AudioInputStream ais = null; + try { + ais = AudioSystem.getAudioInputStream(is); + } catch (Exception e) { + //e.printStackTrace(); + return null; + } + return AudioFloatInputStream.getInputStream(ais); + } + if (buffer.array() == null) { + return AudioFloatInputStream.getInputStream(new AudioInputStream( + buffer.getInputStream(), format, buffer.capacity())); + } + if (buffer8 != null) { + if (format.getEncoding().equals(Encoding.PCM_SIGNED) + || format.getEncoding().equals(Encoding.PCM_UNSIGNED)) { + InputStream is = new Buffer8PlusInputStream(); + AudioFormat format2 = new AudioFormat( + format.getEncoding(), + format.getSampleRate(), + format.getSampleSizeInBits() + 8, + format.getChannels(), + format.getFrameSize() + (1 * format.getChannels()), + format.getFrameRate(), + format.isBigEndian()); + + AudioInputStream ais = new AudioInputStream(is, format2, + buffer.capacity() / format.getFrameSize()); + return AudioFloatInputStream.getInputStream(ais); + } + } + return AudioFloatInputStream.getInputStream(format, buffer.array(), + (int)buffer.arrayOffset(), (int)buffer.capacity()); + } + + public int getChannels() { + return getFormat().getChannels(); + } + + public ModelOscillatorStream open(float samplerate) { + // ModelWavetableOscillator doesn't support ModelOscillatorStream + return null; + } + + // attenuation is in cB + public float getAttenuation() { + return attenuation; + } + // attenuation is in cB + public void setAttenuation(float attenuation) { + this.attenuation = attenuation; + } + + public float getLoopLength() { + return loopLength; + } + + public void setLoopLength(float loopLength) { + this.loopLength = loopLength; + } + + public float getLoopStart() { + return loopStart; + } + + public void setLoopStart(float loopStart) { + this.loopStart = loopStart; + } + + public void setLoopType(int loopType) { + this.loopType = loopType; + } + + public int getLoopType() { + return loopType; + } + + public float getPitchcorrection() { + return pitchcorrection; + } + + public void setPitchcorrection(float pitchcorrection) { + this.pitchcorrection = pitchcorrection; + } +} diff --git a/jdk/src/share/classes/com/sun/media/sound/ModelChannelMixer.java b/jdk/src/share/classes/com/sun/media/sound/ModelChannelMixer.java new file mode 100644 index 00000000000..1f6dfd6e97d --- /dev/null +++ b/jdk/src/share/classes/com/sun/media/sound/ModelChannelMixer.java @@ -0,0 +1,50 @@ +/* + * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, + * CA 95054 USA or visit www.sun.com if you need additional information or + * have any questions. + */ +package com.sun.media.sound; + +import javax.sound.midi.MidiChannel; + +/** + * ModelChannelMixer is used to process channel voice mix output before going + * to master output.
+ * It can be used to:
+ *