changeset 547:38e32b2db431

6706121: makefile: unnecessary Motif classes compilation in JDK7 Summary: removed 80 obsolete .c and .java files, temporary modified some more Reviewed-by: denis
author yan
date Thu, 19 Jun 2008 11:26:54 +0400
parents 321f5f269836
children fae7c1f5ba78
files make/sun/awt/FILES_c_unix.gmk make/sun/awt/FILES_export_unix.gmk make/sun/awt/mapfile-mawt-vers make/sun/awt/mapfile-vers-linux make/sun/awt/mawt.gmk make/sun/jawt/Makefile src/solaris/classes/sun/awt/motif/MButtonPeer.java src/solaris/classes/sun/awt/motif/MCanvasPeer.java src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java src/solaris/classes/sun/awt/motif/MCheckboxPeer.java src/solaris/classes/sun/awt/motif/MChoicePeer.java src/solaris/classes/sun/awt/motif/MComponentPeer.java src/solaris/classes/sun/awt/motif/MCustomCursor.java src/solaris/classes/sun/awt/motif/MDataTransferer.java src/solaris/classes/sun/awt/motif/MDialogPeer.java src/solaris/classes/sun/awt/motif/MDragSourceContextPeer.java src/solaris/classes/sun/awt/motif/MDropTargetContextPeer.java src/solaris/classes/sun/awt/motif/MEmbedCanvasPeer.java src/solaris/classes/sun/awt/motif/MEmbeddedFrame.java src/solaris/classes/sun/awt/motif/MEmbeddedFramePeer.java src/solaris/classes/sun/awt/motif/MFileDialogPeer.java src/solaris/classes/sun/awt/motif/MFramePeer.java src/solaris/classes/sun/awt/motif/MGlobalCursorManager.java src/solaris/classes/sun/awt/motif/MInputMethod.java src/solaris/classes/sun/awt/motif/MInputMethodControl.java src/solaris/classes/sun/awt/motif/MInputMethodDescriptor.java src/solaris/classes/sun/awt/motif/MLabelPeer.java src/solaris/classes/sun/awt/motif/MListPeer.java src/solaris/classes/sun/awt/motif/MMenuBarPeer.java src/solaris/classes/sun/awt/motif/MMenuItemPeer.java src/solaris/classes/sun/awt/motif/MMenuPeer.java src/solaris/classes/sun/awt/motif/MMouseDragGestureRecognizer.java src/solaris/classes/sun/awt/motif/MPanelPeer.java src/solaris/classes/sun/awt/motif/MPopupMenuPeer.java src/solaris/classes/sun/awt/motif/MRobotPeer.java src/solaris/classes/sun/awt/motif/MScrollPanePeer.java src/solaris/classes/sun/awt/motif/MScrollbarPeer.java src/solaris/classes/sun/awt/motif/MTextAreaPeer.java src/solaris/classes/sun/awt/motif/MTextFieldPeer.java src/solaris/classes/sun/awt/motif/MToolkit.java src/solaris/classes/sun/awt/motif/MWindowPeer.java src/solaris/classes/sun/awt/motif/X11Clipboard.java src/solaris/classes/sun/awt/motif/X11DragSourceContextPeer.java src/solaris/classes/sun/awt/motif/X11DropTargetContextPeer.java src/solaris/classes/sun/awt/motif/X11Selection.java src/solaris/classes/sun/awt/motif/X11SelectionHolder.java src/solaris/native/sun/awt/awt_Button.c src/solaris/native/sun/awt/awt_Canvas.c src/solaris/native/sun/awt/awt_Checkbox.c src/solaris/native/sun/awt/awt_Choice12.c src/solaris/native/sun/awt/awt_Choice21.c src/solaris/native/sun/awt/awt_Component.c src/solaris/native/sun/awt/awt_Cursor.c src/solaris/native/sun/awt/awt_DataTransferer.c src/solaris/native/sun/awt/awt_DataTransferer.h src/solaris/native/sun/awt/awt_DrawingSurface.c src/solaris/native/sun/awt/awt_FileDialog.c src/solaris/native/sun/awt/awt_GlobalCursorManager.c src/solaris/native/sun/awt/awt_KeyboardFocusManager.c src/solaris/native/sun/awt/awt_Label.c src/solaris/native/sun/awt/awt_List.c src/solaris/native/sun/awt/awt_MToolkit.c src/solaris/native/sun/awt/awt_Menu.c src/solaris/native/sun/awt/awt_Menu.h src/solaris/native/sun/awt/awt_MenuBar.c src/solaris/native/sun/awt/awt_MenuBar.h src/solaris/native/sun/awt/awt_MenuComponent.c src/solaris/native/sun/awt/awt_MenuItem.c src/solaris/native/sun/awt/awt_PopupMenu.c src/solaris/native/sun/awt/awt_Robot.c src/solaris/native/sun/awt/awt_ScrollPane.c src/solaris/native/sun/awt/awt_Scrollbar.c src/solaris/native/sun/awt/awt_Selection.c src/solaris/native/sun/awt/awt_TextArea.c src/solaris/native/sun/awt/awt_TextArea.h src/solaris/native/sun/awt/awt_TextField.c src/solaris/native/sun/awt/awt_TextField.h src/solaris/native/sun/awt/awt_TopLevel.c src/solaris/native/sun/awt/awt_XmDnD.c src/solaris/native/sun/awt/awt_XmDnD.h src/solaris/native/sun/awt/awt_dnd.c src/solaris/native/sun/awt/awt_dnd.h src/solaris/native/sun/awt/awt_dnd_ds.c src/solaris/native/sun/awt/awt_dnd_dt.c src/solaris/native/sun/awt/awt_motif.c src/solaris/native/sun/awt/awt_motif12.c src/solaris/native/sun/awt/awt_motif21.c src/solaris/native/sun/awt/awt_p.h src/solaris/native/sun/awt/awt_xembed.c src/solaris/native/sun/awt/canvas.c src/solaris/native/sun/awt/cursor.c src/solaris/native/sun/awt/initIDs.c src/solaris/native/sun/awt/multi_font.c
diffstat 93 files changed, 729 insertions(+), 42067 deletions(-) [+]
line wrap: on
line diff
--- a/make/sun/awt/FILES_c_unix.gmk	Wed Jun 18 19:27:59 2008 +0400
+++ b/make/sun/awt/FILES_c_unix.gmk	Thu Jun 19 11:26:54 2008 +0400
@@ -142,59 +142,59 @@
 # These files rely on motif to be built, and should not be included
 # in a headless build.
 
-FILES_MOTIF_c = \
-	awt_AWTEvent.c \
-	awt_Button.c \
-	awt_Canvas.c \
-	awt_Checkbox.c \
-	awt_Component.c \
-	awt_Cursor.c \
-	awt_DataTransferer.c \
-	awt_DrawingSurface.c \
-	awt_Event.c \
-	awt_FileDialog.c \
-	awt_GlobalCursorManager.c \
-	awt_GraphicsEnv.c \
-	awt_InputMethod.c \
-	awt_Insets.c \
-	awt_KeyboardFocusManager.c \
-	awt_Label.c \
-	awt_List.c \
-	awt_Menu.c \
-	awt_MenuBar.c \
-	awt_MenuComponent.c \
-	awt_MenuItem.c \
-	awt_motif.c \
-	awt_Plugin.c \
-	awt_PopupMenu.c \
-	awt_Robot.c \
-	awt_Scrollbar.c \
-	awt_ScrollPane.c \
-	awt_Selection.c \
-	awt_UNIXToolkit.c \
-	awt_TextArea.c \
-	awt_TextField.c \
-	awt_TopLevel.c \
-	awt_mgrsel.c \
-	awt_util.c \
-	awt_wm.c \
-	awt_XmDnD.c \
-	awt_dnd.c \
-	awt_dnd_ds.c \
-	awt_dnd_dt.c \
-	canvas.c \
-	cursor.c \
-	multi_font.c \
-	robot_common.c \
-        list.c \
-        multiVis.c \
-	XDrawingArea.c \
-	MouseInfo.c \
-	awt_xembed.c \
-	awt_xembed_server.c \
-        gtk2_interface.c \
-        swing_GTKEngine.c \
-        swing_GTKStyle.c
+#FILES_MOTIF_c = \
+#keep	awt_AWTEvent.c \
+#	awt_Button.c \
+#	awt_Canvas.c \
+#	awt_Checkbox.c \
+#keep .h	awt_Component.c \
+#keep .h	awt_Cursor.c \
+#	awt_DataTransferer.c \
+#	awt_DrawingSurface.c \
+#	awt_Event.c \
+#	awt_FileDialog.c \
+#	awt_GlobalCursorManager.c \
+#	awt_GraphicsEnv.c \
+#	awt_InputMethod.c \
+#keep	awt_Insets.c \
+#	awt_KeyboardFocusManager.c \
+#	awt_Label.c \
+#	awt_List.c \
+#	awt_Menu.c \
+#	awt_MenuBar.c \
+#	awt_MenuComponent.c \
+#	awt_MenuItem.c \
+#	awt_motif.c \
+#	awt_Plugin.c \
+#	awt_PopupMenu.c \
+#	awt_Robot.c \
+#	awt_Scrollbar.c \
+#	awt_ScrollPane.c \
+#	awt_Selection.c \
+#	awt_UNIXToolkit.c \
+#	awt_TextArea.c \
+#	awt_TextField.c \
+#	awt_TopLevel.c \
+#	awt_mgrsel.c \
+#	awt_util.c \
+#	awt_wm.c \
+#	awt_XmDnD.c \
+#	awt_dnd.c \
+#	awt_dnd_ds.c \
+#	awt_dnd_dt.c \
+#	canvas.c \
+#	cursor.c \
+#	multi_font.c \
+#	robot_common.c \
+#        list.c \
+#        multiVis.c \
+#	XDrawingArea.c \
+#	MouseInfo.c \
+#	awt_xembed.c \
+#	awt_xembed_server.c \
+#        gtk2_interface.c \
+#        swing_GTKEngine.c \
+#        swing_GTKStyle.c
 
 
 # These files are required to be built, with or without motif.  Some of
--- a/make/sun/awt/FILES_export_unix.gmk	Wed Jun 18 19:27:59 2008 +0400
+++ b/make/sun/awt/FILES_export_unix.gmk	Thu Jun 19 11:26:54 2008 +0400
@@ -57,48 +57,15 @@
 	sun/awt/image/DataBufferNative.java \
 	\
 	sun/awt/motif/X11FontMetrics.java \
-	sun/awt/motif/X11Clipboard.java \
-	sun/awt/motif/X11Selection.java \
-	sun/awt/motif/X11SelectionHolder.java \
 	sun/awt/X11InputMethod.java \
-	sun/awt/motif/MInputMethod.java \
-	sun/awt/motif/MInputMethodControl.java \
-	sun/awt/motif/MCustomCursor.java \
 	sun/awt/motif/MFontConfiguration.java \
 	sun/awt/motif/MFontPeer.java \
 	sun/awt/motif/MToolkit.java \
-	sun/awt/motif/MComponentPeer.java \
-	sun/awt/motif/MButtonPeer.java \
-	sun/awt/motif/MCanvasPeer.java \
-	sun/awt/motif/MCheckboxPeer.java \
-	sun/awt/motif/MFileDialogPeer.java \
-	sun/awt/motif/MGlobalCursorManager.java \
-	sun/awt/motif/MTextFieldPeer.java \
-	sun/awt/motif/MLabelPeer.java \
-	sun/awt/motif/MListPeer.java \
-	sun/awt/motif/MWindowPeer.java \
-	sun/awt/motif/MMenuBarPeer.java \
-	sun/awt/motif/MMenuPeer.java \
-        sun/awt/motif/MPopupMenuPeer.java \
-	sun/awt/motif/MDialogPeer.java \
-	sun/awt/motif/MMenuItemPeer.java \
-	sun/awt/motif/MCheckboxMenuItemPeer.java \
-	sun/awt/motif/MChoicePeer.java \
-	sun/awt/motif/MTextAreaPeer.java \
-	sun/awt/motif/MScrollbarPeer.java \
-	sun/awt/motif/MScrollPanePeer.java \
-	sun/awt/motif/MFramePeer.java \
         sun/awt/DebugSettings.java \
 	sun/awt/EmbeddedFrame.java \
-	sun/awt/motif/MEmbeddedFramePeer.java \
 	sun/awt/PlatformFont.java \
 	sun/awt/FontDescriptor.java \
 	sun/awt/NativeLibLoader.java \
-	sun/awt/motif/MDropTargetContextPeer.java \
-	sun/awt/motif/MDragSourceContextPeer.java \
-	sun/awt/motif/MRobotPeer.java \
-	sun/awt/motif/X11DragSourceContextPeer.java \
-	sun/awt/motif/X11DropTargetContextPeer.java \
 	sun/awt/X11GraphicsEnvironment.java \
 	sun/awt/X11GraphicsDevice.java \
 	sun/awt/X11GraphicsConfig.java \
@@ -120,7 +87,6 @@
         sun/java2d/cmm/ColorTransform.java \
         sun/awt/datatransfer/DataTransferer.java \
 	sun/awt/dnd/SunDragSourceContextPeer.java \
-	sun/awt/motif/MDataTransferer.java \
 	sun/awt/motif/MToolkitThreadBlockedHandler.java \
 	sun/java2d/opengl/OGLBlitLoops.java \
 	sun/java2d/opengl/OGLContext.java \
@@ -216,6 +182,5 @@
 	java/awt/event/NativeLibLoader.java \
 	java/awt/peer/ComponentPeer.java \
 	java/awt/dnd/DnDConstants.java \
-	sun/awt/CausedFocusEvent.java \
-	sun/awt/motif/MEmbedCanvasPeer.java
+	sun/awt/CausedFocusEvent.java
 
--- a/make/sun/awt/mapfile-mawt-vers	Wed Jun 18 19:27:59 2008 +0400
+++ b/make/sun/awt/mapfile-mawt-vers	Thu Jun 19 11:26:54 2008 +0400
@@ -31,7 +31,7 @@
 	global:
 		JNI_OnLoad;
 
-                Java_sun_awt_motif_MComponentPeer_restoreFocus;
+                #Java_sun_awt_motif_MComponentPeer_restoreFocus;
 		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
 		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
 		Java_java_awt_AWTEvent_nativeSetSource;
@@ -56,163 +56,163 @@
                 Java_sun_awt_UNIXToolkit_load_1stock_1icon;
                 Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
 		Java_sun_awt_UNIXToolkit_nativeSync;
-		Java_sun_awt_motif_MButtonPeer_create;
-		Java_sun_awt_motif_MButtonPeer_setLabel;
-                Java_sun_awt_motif_MPanelPeer_pEnsureIndex;
-                Java_sun_awt_motif_MPanelPeer_pRestack;
-		Java_sun_awt_motif_MCanvasPeer_create;
-		Java_sun_awt_motif_MCanvasPeer_initIDs;
-		Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
-		Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
-		Java_sun_awt_motif_MCheckboxPeer_create;
-		Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
-		Java_sun_awt_motif_MCheckboxPeer_setLabel;
-		Java_sun_awt_motif_MCheckboxPeer_pSetState;
-		Java_sun_awt_motif_MCheckboxPeer_pGetState;
-		Java_sun_awt_motif_MChoicePeer_addItem;
-		Java_sun_awt_motif_MChoicePeer_appendItems;
-		Java_sun_awt_motif_MChoicePeer_create;
-		Java_sun_awt_motif_MChoicePeer_pReshape;
-		Java_sun_awt_motif_MChoicePeer_remove;
-		Java_sun_awt_motif_MChoicePeer_removeAll;
-		Java_sun_awt_motif_MChoicePeer_setBackground;
-		Java_sun_awt_motif_MChoicePeer_pSelect;
-		Java_sun_awt_motif_MChoicePeer_setFont;
-		Java_sun_awt_motif_MChoicePeer_setForeground;
-		Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
-		Java_sun_awt_motif_MComponentPeer_getNativeColor;
-		Java_sun_awt_motif_MComponentPeer_getWindow;
-		Java_sun_awt_motif_MComponentPeer_pDisable;
-		Java_sun_awt_motif_MComponentPeer_pDispose;
-		Java_sun_awt_motif_MComponentPeer_pEnable;
-		Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
-		Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
-		Java_sun_awt_motif_MComponentPeer_pHide;
-		Java_sun_awt_motif_MComponentPeer_pInitialize;
-		Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
-		Java_sun_awt_motif_MComponentPeer_pReshape;
-		Java_sun_awt_motif_MComponentPeer_pShow;
-		Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
-		Java_sun_awt_motif_MComponentPeer_pSetBackground;
-		Java_sun_awt_motif_MComponentPeer_pSetFont;
-                Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
-                Java_sun_awt_motif_MComponentPeer__1requestFocus;
-                Java_sun_awt_motif_MComponentPeer_getNativeFocusedWindow;
-		Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
-		Java_sun_awt_motif_MComponentPeer_pSetForeground;
-		Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
-		Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
-		Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
-		Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
-		Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
-		Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
-		Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
-		Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
-		Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
-		Java_sun_awt_motif_X11DropTargetContextPeer_getData;
-		Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
-		Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
-		Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
-		Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
-		Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
-                Java_sun_awt_motif_MEmbeddedFramePeer_synthesizeFocusInOut;
-		Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
-		Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
-		Java_sun_awt_motif_MEmbeddedFrame_getWidget;
-		Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
-                Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;       
-		Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
-		Java_sun_awt_motif_MFileDialogPeer_create;
-		Java_sun_awt_motif_MFileDialogPeer_pDispose;
-		Java_sun_awt_motif_MFileDialogPeer_pHide;
-		Java_sun_awt_motif_MFileDialogPeer_pReshape;
-		Java_sun_awt_motif_MFileDialogPeer_pShow;
-		Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
-		Java_sun_awt_motif_MFileDialogPeer_setFont;
-		Java_sun_awt_motif_MFramePeer_pGetIconSize;
-		Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
-		Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
-		Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
-		Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
-		Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
-		Java_sun_awt_motif_MLabelPeer_create;
-		Java_sun_awt_motif_MLabelPeer_setAlignment;
-		Java_sun_awt_motif_MLabelPeer_setText;
-		Java_sun_awt_motif_MListPeer_addItem;
-		Java_sun_awt_motif_MListPeer_create;
-		Java_sun_awt_motif_MListPeer_delItems;
-		Java_sun_awt_motif_MListPeer_deselect;
-		Java_sun_awt_motif_MListPeer_isSelected;
-		Java_sun_awt_motif_MListPeer_makeVisible;
-		Java_sun_awt_motif_MListPeer_nativeHandleMouseWheel;
-		Java_sun_awt_motif_MListPeer_select;
-		Java_sun_awt_motif_MListPeer_setMultipleSelections;
-		Java_sun_awt_motif_MMenuBarPeer_create;
-		Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
-		Java_sun_awt_motif_MMenuItemPeer_pDisable;
-		Java_sun_awt_motif_MMenuItemPeer_pDispose;
-		Java_sun_awt_motif_MMenuItemPeer_pEnable;
-		Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
-		Java_sun_awt_motif_MMenuPeer_createMenu;
-		Java_sun_awt_motif_MMenuPeer_createSubMenu;
-		Java_sun_awt_motif_MMenuPeer_pDispose;
-		Java_sun_awt_motif_MPopupMenuPeer_createMenu;
-		Java_sun_awt_motif_MPopupMenuPeer_pDispose;
-		Java_sun_awt_motif_MPopupMenuPeer_pShow;
-		Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
-		Java_sun_awt_motif_MRobotPeer_keyPressImpl;
-		Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
-		Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
-		Java_sun_awt_motif_MRobotPeer_mousePressImpl;
-		Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
-		Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
-		Java_sun_awt_motif_MRobotPeer_setup;
-		Java_sun_awt_motif_MScrollbarPeer_create;
-		Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
-		Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
-		Java_sun_awt_motif_MScrollbarPeer_pSetValues;
-		Java_sun_awt_motif_MScrollPanePeer_create;
-		Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
-		Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
-		Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
-		Java_sun_awt_motif_MScrollPanePeer_pInsets;
-		Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
-		Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
-		Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
-		Java_sun_awt_motif_MScrollPanePeer_setTypedValue;
-		Java_sun_awt_motif_MTextAreaPeer_initIDs;
-		Java_sun_awt_motif_MTextAreaPeer_pCreate;
-		Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
-		Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
-		Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
-		Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
-		Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
-		Java_sun_awt_motif_MTextAreaPeer_getText;
-		Java_sun_awt_motif_MTextAreaPeer_insert;
-		Java_sun_awt_motif_MTextAreaPeer_nativeHandleMouseWheel;
-		Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
-		Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
-		Java_sun_awt_motif_MTextAreaPeer_pShow2;
-		Java_sun_awt_motif_MTextAreaPeer_replaceRange;
-		Java_sun_awt_motif_MTextAreaPeer_select;
-		Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
-		Java_sun_awt_motif_MTextAreaPeer_setFont;
-		Java_sun_awt_motif_MTextAreaPeer_setText;
-		Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
-		Java_sun_awt_motif_MTextFieldPeer_initIDs;
-		Java_sun_awt_motif_MTextFieldPeer_pCreate;
-		Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
-		Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
-		Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
-		Java_sun_awt_motif_MTextFieldPeer_getText;
-		Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
-		Java_sun_awt_motif_MTextFieldPeer_preDispose;
-		Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
-		Java_sun_awt_motif_MTextFieldPeer_select;
-		Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
-		Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
-		Java_sun_awt_motif_MTextFieldPeer_setFont;
-		Java_sun_awt_motif_MTextFieldPeer_setText;
+		#Java_sun_awt_motif_MButtonPeer_create;
+		#Java_sun_awt_motif_MButtonPeer_setLabel;
+                #Java_sun_awt_motif_MPanelPeer_pEnsureIndex;
+                #Java_sun_awt_motif_MPanelPeer_pRestack;
+		#Java_sun_awt_motif_MCanvasPeer_create;
+		#Java_sun_awt_motif_MCanvasPeer_initIDs;
+		#Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
+		#Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
+		#Java_sun_awt_motif_MCheckboxPeer_create;
+		#Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
+		#Java_sun_awt_motif_MCheckboxPeer_setLabel;
+		#Java_sun_awt_motif_MCheckboxPeer_pSetState;
+		#Java_sun_awt_motif_MCheckboxPeer_pGetState;
+		#Java_sun_awt_motif_MChoicePeer_addItem;
+		#Java_sun_awt_motif_MChoicePeer_appendItems;
+		#Java_sun_awt_motif_MChoicePeer_create;
+		#Java_sun_awt_motif_MChoicePeer_pReshape;
+		#Java_sun_awt_motif_MChoicePeer_remove;
+		#Java_sun_awt_motif_MChoicePeer_removeAll;
+		#Java_sun_awt_motif_MChoicePeer_setBackground;
+		#Java_sun_awt_motif_MChoicePeer_pSelect;
+		#Java_sun_awt_motif_MChoicePeer_setFont;
+		#Java_sun_awt_motif_MChoicePeer_setForeground;
+		#Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
+		#Java_sun_awt_motif_MComponentPeer_getNativeColor;
+		#Java_sun_awt_motif_MComponentPeer_getWindow;
+		#Java_sun_awt_motif_MComponentPeer_pDisable;
+		#Java_sun_awt_motif_MComponentPeer_pDispose;
+		#Java_sun_awt_motif_MComponentPeer_pEnable;
+		#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
+		#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
+		#Java_sun_awt_motif_MComponentPeer_pHide;
+		#Java_sun_awt_motif_MComponentPeer_pInitialize;
+		#Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
+		#Java_sun_awt_motif_MComponentPeer_pReshape;
+		#Java_sun_awt_motif_MComponentPeer_pShow;
+		#Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
+		#Java_sun_awt_motif_MComponentPeer_pSetBackground;
+		#Java_sun_awt_motif_MComponentPeer_pSetFont;
+                #Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
+                #Java_sun_awt_motif_MComponentPeer__1requestFocus;
+                #Java_sun_awt_motif_MComponentPeer_getNativeFocusedWindow;
+		#Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
+		#Java_sun_awt_motif_MComponentPeer_pSetForeground;
+		#Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
+		#Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
+		#Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
+		#Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
+		#Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
+		#Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
+		#Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_getData;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
+                #Java_sun_awt_motif_MEmbeddedFramePeer_synthesizeFocusInOut;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
+		#Java_sun_awt_motif_MEmbeddedFrame_getWidget;
+		#Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;       
+		#Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
+		#Java_sun_awt_motif_MFileDialogPeer_create;
+		#Java_sun_awt_motif_MFileDialogPeer_pDispose;
+		#Java_sun_awt_motif_MFileDialogPeer_pHide;
+		#Java_sun_awt_motif_MFileDialogPeer_pReshape;
+		#Java_sun_awt_motif_MFileDialogPeer_pShow;
+		#Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
+		#Java_sun_awt_motif_MFileDialogPeer_setFont;
+		#Java_sun_awt_motif_MFramePeer_pGetIconSize;
+		#Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
+		#Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
+		#Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
+		#Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
+		#Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
+		#Java_sun_awt_motif_MLabelPeer_create;
+		#Java_sun_awt_motif_MLabelPeer_setAlignment;
+		#Java_sun_awt_motif_MLabelPeer_setText;
+		#Java_sun_awt_motif_MListPeer_addItem;
+		#Java_sun_awt_motif_MListPeer_create;
+		#Java_sun_awt_motif_MListPeer_delItems;
+		#Java_sun_awt_motif_MListPeer_deselect;
+		#Java_sun_awt_motif_MListPeer_isSelected;
+		#Java_sun_awt_motif_MListPeer_makeVisible;
+		#Java_sun_awt_motif_MListPeer_nativeHandleMouseWheel;
+		#Java_sun_awt_motif_MListPeer_select;
+		#Java_sun_awt_motif_MListPeer_setMultipleSelections;
+		#Java_sun_awt_motif_MMenuBarPeer_create;
+		#Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
+		#Java_sun_awt_motif_MMenuItemPeer_pDisable;
+		#Java_sun_awt_motif_MMenuItemPeer_pDispose;
+		#Java_sun_awt_motif_MMenuItemPeer_pEnable;
+		#Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
+		#Java_sun_awt_motif_MMenuPeer_createMenu;
+		#Java_sun_awt_motif_MMenuPeer_createSubMenu;
+		#Java_sun_awt_motif_MMenuPeer_pDispose;
+		#Java_sun_awt_motif_MPopupMenuPeer_createMenu;
+		#Java_sun_awt_motif_MPopupMenuPeer_pDispose;
+		#Java_sun_awt_motif_MPopupMenuPeer_pShow;
+		#Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
+		#Java_sun_awt_motif_MRobotPeer_keyPressImpl;
+		#Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
+		#Java_sun_awt_motif_MRobotPeer_mousePressImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
+		#Java_sun_awt_motif_MRobotPeer_setup;
+		#Java_sun_awt_motif_MScrollbarPeer_create;
+		#Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
+		#Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
+		#Java_sun_awt_motif_MScrollbarPeer_pSetValues;
+		#Java_sun_awt_motif_MScrollPanePeer_create;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
+		#Java_sun_awt_motif_MScrollPanePeer_pInsets;
+		#Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
+		#Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
+		#Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
+		#Java_sun_awt_motif_MScrollPanePeer_setTypedValue;
+		#Java_sun_awt_motif_MTextAreaPeer_initIDs;
+		#Java_sun_awt_motif_MTextAreaPeer_pCreate;
+		#Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
+		#Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
+		#Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
+		#Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
+		#Java_sun_awt_motif_MTextAreaPeer_getText;
+		#Java_sun_awt_motif_MTextAreaPeer_insert;
+		#Java_sun_awt_motif_MTextAreaPeer_nativeHandleMouseWheel;
+		#Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
+		#Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
+		#Java_sun_awt_motif_MTextAreaPeer_pShow2;
+		#Java_sun_awt_motif_MTextAreaPeer_replaceRange;
+		#Java_sun_awt_motif_MTextAreaPeer_select;
+                #Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_setFont;
+		#Java_sun_awt_motif_MTextAreaPeer_setText;
+		#Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
+		#Java_sun_awt_motif_MTextFieldPeer_initIDs;
+		#Java_sun_awt_motif_MTextFieldPeer_pCreate;
+		#Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
+		#Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
+		#Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
+		#Java_sun_awt_motif_MTextFieldPeer_getText;
+		#Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
+		#Java_sun_awt_motif_MTextFieldPeer_preDispose;
+		#Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
+		#Java_sun_awt_motif_MTextFieldPeer_select;
+		#Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
+		#Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
+		#Java_sun_awt_motif_MTextFieldPeer_setFont;
+		#Java_sun_awt_motif_MTextFieldPeer_setText;
 		Java_sun_awt_motif_MToolkit_beep;
 		Java_sun_awt_motif_MToolkit_getLockingKeyStateNative;
 		Java_sun_awt_motif_MToolkit_getMulticlickTime;
@@ -236,30 +236,30 @@
                 Java_sun_awt_motif_MToolkit_nativeGrab;
                 Java_sun_awt_motif_MToolkit_getWMName;
 		Java_sun_awt_motif_MWindowAttributes_initIDs;
-		Java_sun_awt_motif_MWindowPeer_pDispose;
-		Java_sun_awt_motif_MWindowPeer_pHide;
-		Java_sun_awt_motif_MWindowPeer_pReshape;
-		Java_sun_awt_motif_MWindowPeer_pSetTitle;
-		Java_sun_awt_motif_MWindowPeer_pShow;
-		Java_sun_awt_motif_MWindowPeer_setResizable;
-		Java_sun_awt_motif_MWindowPeer_toBack;
-		Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
-		Java_sun_awt_motif_MWindowPeer_getState;
-		Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
-		Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
-		Java_sun_awt_motif_MWindowPeer_pShowModal;
-		Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
-		Java_sun_awt_motif_MWindowPeer_setSaveUnder;
-		Java_sun_awt_motif_MWindowPeer_setState;
-		Java_sun_awt_motif_MWindowPeer_resetTargetGC;
-		Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
-		Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
-		Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
-                Java_sun_awt_motif_MWindowPeer_setFocusableWindow;
-                Java_sun_awt_motif_MWindowPeer_pToFront;
-		Java_sun_awt_motif_MCustomCursor_cacheInit;
-		Java_sun_awt_motif_MCustomCursor_createCursor;
-		Java_sun_awt_motif_MCustomCursor_queryBestCursor;
+		#Java_sun_awt_motif_MWindowPeer_pDispose;
+		#Java_sun_awt_motif_MWindowPeer_pHide;
+		#Java_sun_awt_motif_MWindowPeer_pReshape;
+		#Java_sun_awt_motif_MWindowPeer_pSetTitle;
+		#Java_sun_awt_motif_MWindowPeer_pShow;
+		#Java_sun_awt_motif_MWindowPeer_setResizable;
+		#Java_sun_awt_motif_MWindowPeer_toBack;
+		#Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
+		#Java_sun_awt_motif_MWindowPeer_getState;
+		#Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
+		#Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
+		#Java_sun_awt_motif_MWindowPeer_pShowModal;
+		#Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
+		#Java_sun_awt_motif_MWindowPeer_setSaveUnder;
+		#Java_sun_awt_motif_MWindowPeer_setState;
+		#Java_sun_awt_motif_MWindowPeer_resetTargetGC;
+		#Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
+		#Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
+		#Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
+                #Java_sun_awt_motif_MWindowPeer_setFocusableWindow;
+                #Java_sun_awt_motif_MWindowPeer_pToFront;
+		#Java_sun_awt_motif_MCustomCursor_cacheInit;
+		#Java_sun_awt_motif_MCustomCursor_createCursor;
+		#Java_sun_awt_motif_MCustomCursor_queryBestCursor;
 		Java_sun_awt_motif_X11FontMetrics_bytesWidth;
 		Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth;
 		Java_sun_awt_motif_X11FontMetrics_init;
@@ -268,18 +268,18 @@
 		Java_sun_awt_X11InputMethod_resetXIC;
 		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
 		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_motif_MInputMethod_openXIMNative;
-		Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
-		Java_sun_awt_motif_MInputMethod_createXICNative;
-		Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
-		Java_sun_awt_motif_MInputMethod_setXICFocusNative;
-		Java_sun_awt_motif_X11Clipboard_getClipboardData;
-		Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
-		Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
-		Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
-		Java_sun_awt_motif_X11Selection_init;
-		Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
-		Java_sun_awt_motif_X11Selection_clearNativeContext;
+		#Java_sun_awt_motif_MInputMethod_openXIMNative;
+		#Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
+		#Java_sun_awt_motif_MInputMethod_createXICNative;
+		#Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
+		#Java_sun_awt_motif_MInputMethod_setXICFocusNative;
+		#Java_sun_awt_motif_X11Clipboard_getClipboardData;
+		#Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
+		#Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
+		#Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
+		#Java_sun_awt_motif_X11Selection_init;
+		#Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
+		#Java_sun_awt_motif_X11Selection_clearNativeContext;
 		Java_sun_awt_SunToolkit_closeSplashScreen;
 		Java_sun_awt_PlatformFont_initIDs;
 		Java_sun_awt_X11GraphicsConfig_init;
@@ -311,25 +311,25 @@
                 Java_sun_awt_X11GraphicsEnvironment_initGLX;
 		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
 		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-                Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
-                Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
-                Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
-                Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
-                Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
-                Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
-                Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
-                Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
-                Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
-                Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
-                Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
-                Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;       
-                Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
-                Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;       
+                #Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
+                #Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
 		Java_java_awt_AWTEvent_initIDs;
 		Java_java_awt_Button_initIDs;
 		Java_java_awt_Container_initIDs;
@@ -343,39 +343,39 @@
 		Java_java_awt_Insets_initIDs;
 		Java_java_awt_TextField_initIDs;
 		Java_java_awt_Window_initIDs;
-		Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
-		Java_sun_awt_motif_MCheckboxPeer_getSpacing;
-		Java_sun_awt_motif_MChoicePeer_freeNativeData;
-		Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
-		Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
-		Java_sun_awt_motif_MComponentPeer_initIDs;
-		Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
-		Java_sun_awt_motif_MComponentPeer_pSetCursor;
-		Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
-		Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
-		Java_sun_awt_motif_MComponentPeer_setTargetBackground;
-		Java_sun_awt_motif_MDataTransferer_dragQueryFile;
-		Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
-		Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
-		Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
+		#Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
+		#Java_sun_awt_motif_MCheckboxPeer_getSpacing;
+		#Java_sun_awt_motif_MChoicePeer_freeNativeData;
+		#Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
+		#Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
+		#Java_sun_awt_motif_MComponentPeer_initIDs;
+		#Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
+		#Java_sun_awt_motif_MComponentPeer_pSetCursor;
+		#Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
+		#Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
+		#Java_sun_awt_motif_MComponentPeer_setTargetBackground;
+		#Java_sun_awt_motif_MDataTransferer_dragQueryFile;
+		#Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
+		#Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
+		#Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
 		Java_sun_awt_motif_MFontPeer_initIDs;
-		Java_sun_awt_motif_MListPeer_setBackground;
-		Java_sun_awt_motif_MMenuBarPeer_initIDs;
-		Java_sun_awt_motif_MMenuBarPeer_pDispose;
-		Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
-		Java_sun_awt_motif_MMenuItemPeer_initIDs;
-		Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
-		Java_sun_awt_motif_MPopupMenuPeer_initIDs;
-		Java_sun_awt_motif_MScrollbarPeer_initIDs;
-		Java_sun_awt_motif_MScrollPanePeer_initIDs;
-		Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
+		#Java_sun_awt_motif_MListPeer_setBackground;
+		#Java_sun_awt_motif_MMenuBarPeer_initIDs;
+		#Java_sun_awt_motif_MMenuBarPeer_pDispose;
+		#Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
+		#Java_sun_awt_motif_MMenuItemPeer_initIDs;
+		#Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
+		#Java_sun_awt_motif_MPopupMenuPeer_initIDs;
+		#Java_sun_awt_motif_MScrollbarPeer_initIDs;
+		#Java_sun_awt_motif_MScrollPanePeer_initIDs;
+		#Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
 		Java_sun_awt_motif_MToolkit_shutdown;
-		Java_sun_awt_motif_MWindowPeer_initIDs;
-		Java_sun_awt_motif_MWindowPeer_pCreate;
-		Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
+		#Java_sun_awt_motif_MWindowPeer_initIDs;
+		#Java_sun_awt_motif_MWindowPeer_pCreate;
+		#Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
 		Java_sun_awt_motif_X11FontMetrics_initIDs;
-		Java_sun_awt_X11InputMethod_initIDs;
-		Java_sun_awt_motif_X11Selection_initIDs;
+		#Java_sun_awt_X11InputMethod_initIDs;
+		#Java_sun_awt_motif_X11Selection_initIDs;
 		Java_sun_awt_motif_MToolkitThreadBlockedHandler_enter;
 		Java_sun_awt_motif_MToolkitThreadBlockedHandler_exit;
 		Java_sun_awt_X11GraphicsConfig_init;
--- a/make/sun/awt/mapfile-vers-linux	Wed Jun 18 19:27:59 2008 +0400
+++ b/make/sun/awt/mapfile-vers-linux	Thu Jun 19 11:26:54 2008 +0400
@@ -170,7 +170,7 @@
 		GrPrim_Sg2dGetPixel;
 		GrPrim_Sg2dGetLCDTextContrast;
 
-		Java_sun_awt_motif_MComponentPeer_restoreFocus;
+		#Java_sun_awt_motif_MComponentPeer_restoreFocus;
 		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
 		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
 		Java_java_awt_AWTEvent_nativeSetSource;
@@ -189,158 +189,158 @@
 		Java_java_awt_ScrollPane_initIDs;
 		Java_java_awt_TextArea_initIDs;
 		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_motif_MButtonPeer_create;
-		Java_sun_awt_motif_MButtonPeer_setLabel;
-		Java_sun_awt_motif_MCanvasPeer_create;
-		Java_sun_awt_motif_MCanvasPeer_initIDs;
-		Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
-		Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
-		Java_sun_awt_motif_MCheckboxPeer_create;
-		Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
-		Java_sun_awt_motif_MCheckboxPeer_setLabel;
-		Java_sun_awt_motif_MCheckboxPeer_pSetState;
-		Java_sun_awt_motif_MCheckboxPeer_pGetState;
-		Java_sun_awt_motif_MChoicePeer_addItem;
-		Java_sun_awt_motif_MChoicePeer_appendItems;
-		Java_sun_awt_motif_MChoicePeer_create;
-		Java_sun_awt_motif_MChoicePeer_pReshape;
-		Java_sun_awt_motif_MChoicePeer_remove;
-		Java_sun_awt_motif_MChoicePeer_removeAll;
-		Java_sun_awt_motif_MChoicePeer_setBackground;
-		Java_sun_awt_motif_MChoicePeer_pSelect;
-		Java_sun_awt_motif_MChoicePeer_setFont;
-		Java_sun_awt_motif_MChoicePeer_setForeground;
-		Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
-		Java_sun_awt_motif_MComponentPeer_createBackBuffer;
-		Java_sun_awt_motif_MComponentPeer_destroyBackBuffer;
-		Java_sun_awt_motif_MComponentPeer_getNativeColor;
-		Java_sun_awt_motif_MComponentPeer_getWindow;
-		Java_sun_awt_motif_MComponentPeer_pDisable;
-		Java_sun_awt_motif_MComponentPeer_pDispose;
-		Java_sun_awt_motif_MComponentPeer_pEnable;
-		Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
-		Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
-		Java_sun_awt_motif_MComponentPeer_pHide;
-		Java_sun_awt_motif_MComponentPeer_pInitialize;
-		Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
-		Java_sun_awt_motif_MComponentPeer_pReshape;
-		Java_sun_awt_motif_MComponentPeer_pShow;
-		Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
-		Java_sun_awt_motif_MComponentPeer_swapBuffers;
-		Java_sun_awt_motif_MComponentPeer_pSetBackground;
-		Java_sun_awt_motif_MComponentPeer_pSetFont;
-                Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
-                Java_sun_awt_motif_MComponentPeer__1requestFocus;
-		Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
-		Java_sun_awt_motif_MComponentPeer_pSetForeground;
-		Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
-		Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
-		Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
-		Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
-		Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
-		Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
-		Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
-		Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
-		Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
-		Java_sun_awt_motif_X11DropTargetContextPeer_getData;
-		Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
-		Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
-		Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
-		Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
-		Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
-		Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
-		Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
-		Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
-		Java_sun_awt_motif_MEmbeddedFrame_getWidget;
-		Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
-		Java_sun_awt_motif_MFileDialogPeer_create;
-		Java_sun_awt_motif_MFileDialogPeer_pDispose;
-		Java_sun_awt_motif_MFileDialogPeer_pHide;
-		Java_sun_awt_motif_MFileDialogPeer_pReshape;
-		Java_sun_awt_motif_MFileDialogPeer_pShow;
-		Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
-		Java_sun_awt_motif_MFileDialogPeer_setFont;
-		Java_sun_awt_motif_MFramePeer_pGetIconSize;
-		Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
-		Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
-		Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
-		Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
-		Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
-		Java_sun_awt_motif_MLabelPeer_create;
-		Java_sun_awt_motif_MLabelPeer_setAlignment;
-		Java_sun_awt_motif_MLabelPeer_setText;
-		Java_sun_awt_motif_MListPeer_addItem;
-		Java_sun_awt_motif_MListPeer_create;
-		Java_sun_awt_motif_MListPeer_delItems;
-		Java_sun_awt_motif_MListPeer_deselect;
-		Java_sun_awt_motif_MListPeer_isSelected;
-		Java_sun_awt_motif_MListPeer_makeVisible;
-		Java_sun_awt_motif_MListPeer_select;
-		Java_sun_awt_motif_MListPeer_setMultipleSelections;
-		Java_sun_awt_motif_MMenuBarPeer_create;
-		Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
-		Java_sun_awt_motif_MMenuItemPeer_pDisable;
-		Java_sun_awt_motif_MMenuItemPeer_pDispose;
-		Java_sun_awt_motif_MMenuItemPeer_pEnable;
-		Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
-		Java_sun_awt_motif_MMenuPeer_createMenu;
-		Java_sun_awt_motif_MMenuPeer_createSubMenu;
-		Java_sun_awt_motif_MMenuPeer_pDispose;
-		Java_sun_awt_motif_MPopupMenuPeer_createMenu;
-		Java_sun_awt_motif_MPopupMenuPeer_pDispose;
-		Java_sun_awt_motif_MPopupMenuPeer_pShow;
-		Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
-		Java_sun_awt_motif_MRobotPeer_keyPressImpl;
-		Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
-		Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
-		Java_sun_awt_motif_MRobotPeer_mousePressImpl;
-		Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
-		Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
-		Java_sun_awt_motif_MRobotPeer_setup;
-		Java_sun_awt_motif_MScrollbarPeer_create;
-		Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
-		Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
-		Java_sun_awt_motif_MScrollbarPeer_pSetValues;
-		Java_sun_awt_motif_MScrollPanePeer_create;
-		Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
-		Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
-		Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
-		Java_sun_awt_motif_MScrollPanePeer_pInsets;
-		Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
-		Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
-		Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
-		Java_sun_awt_motif_MTextAreaPeer_initIDs;
-		Java_sun_awt_motif_MTextAreaPeer_pCreate;
-		Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
-		Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
-		Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
-		Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
-		Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
-		Java_sun_awt_motif_MTextAreaPeer_getText;
-		Java_sun_awt_motif_MTextAreaPeer_insert;
-		Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
-		Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
-		Java_sun_awt_motif_MTextAreaPeer_pShow2;
-		Java_sun_awt_motif_MTextAreaPeer_replaceRange;
-		Java_sun_awt_motif_MTextAreaPeer_select;
-		Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
-		Java_sun_awt_motif_MTextAreaPeer_setFont;
-		Java_sun_awt_motif_MTextAreaPeer_setText;
-		Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
-		Java_sun_awt_motif_MTextFieldPeer_initIDs;
-		Java_sun_awt_motif_MTextFieldPeer_pCreate;
-		Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
-		Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
-		Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
-		Java_sun_awt_motif_MTextFieldPeer_getText;
-		Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
-		Java_sun_awt_motif_MTextFieldPeer_preDispose;
-		Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
-		Java_sun_awt_motif_MTextFieldPeer_select;
-		Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
-		Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
-		Java_sun_awt_motif_MTextFieldPeer_setFont;
-		Java_sun_awt_motif_MTextFieldPeer_setText;
+		#Java_sun_awt_motif_MButtonPeer_create;
+		#Java_sun_awt_motif_MButtonPeer_setLabel;
+		#Java_sun_awt_motif_MCanvasPeer_create;
+		#Java_sun_awt_motif_MCanvasPeer_initIDs;
+		#Java_sun_awt_motif_MCanvasPeer_resetTargetGC;
+		#Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState;
+		#Java_sun_awt_motif_MCheckboxPeer_create;
+		#Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup;
+		#Java_sun_awt_motif_MCheckboxPeer_setLabel;
+		#Java_sun_awt_motif_MCheckboxPeer_pSetState;
+		#Java_sun_awt_motif_MCheckboxPeer_pGetState;
+		#Java_sun_awt_motif_MChoicePeer_addItem;
+		#Java_sun_awt_motif_MChoicePeer_appendItems;
+		#Java_sun_awt_motif_MChoicePeer_create;
+		#Java_sun_awt_motif_MChoicePeer_pReshape;
+		#Java_sun_awt_motif_MChoicePeer_remove;
+		#Java_sun_awt_motif_MChoicePeer_removeAll;
+		#Java_sun_awt_motif_MChoicePeer_setBackground;
+		#Java_sun_awt_motif_MChoicePeer_pSelect;
+		#Java_sun_awt_motif_MChoicePeer_setFont;
+		#Java_sun_awt_motif_MChoicePeer_setForeground;
+		#Java_sun_awt_motif_MComponentPeer_addNativeDropTarget;
+		#Java_sun_awt_motif_MComponentPeer_createBackBuffer;
+		#Java_sun_awt_motif_MComponentPeer_destroyBackBuffer;
+		#Java_sun_awt_motif_MComponentPeer_getNativeColor;
+		#Java_sun_awt_motif_MComponentPeer_getWindow;
+		#Java_sun_awt_motif_MComponentPeer_pDisable;
+		#Java_sun_awt_motif_MComponentPeer_pDispose;
+		#Java_sun_awt_motif_MComponentPeer_pEnable;
+		#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen;
+		#Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2;
+		#Java_sun_awt_motif_MComponentPeer_pHide;
+		#Java_sun_awt_motif_MComponentPeer_pInitialize;
+		#Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible;
+		#Java_sun_awt_motif_MComponentPeer_pReshape;
+		#Java_sun_awt_motif_MComponentPeer_pShow;
+		#Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget;
+		#Java_sun_awt_motif_MComponentPeer_swapBuffers;
+		#Java_sun_awt_motif_MComponentPeer_pSetBackground;
+		#Java_sun_awt_motif_MComponentPeer_pSetFont;
+                #Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer;
+                #Java_sun_awt_motif_MComponentPeer__1requestFocus;
+		#Java_sun_awt_motif_MCheckboxMenuItemPeer_getState;
+		#Java_sun_awt_motif_MComponentPeer_pSetForeground;
+		#Java_sun_awt_motif_MDragSourceContextPeer_startDrag;
+		#Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor;
+		#Java_sun_awt_motif_MDropTargetContextPeer_addTransfer;
+		#Java_sun_awt_motif_MDropTargetContextPeer_dropDone;
+		#Java_sun_awt_motif_MDropTargetContextPeer_startTransfer;
+		#Java_sun_awt_motif_X11DragSourceContextPeer_startDrag;
+		#Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_dropDone;
+		#Java_sun_awt_motif_X11DropTargetContextPeer_getData;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate;
+		#Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive;
+		#Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive;
+		#Java_sun_awt_motif_MEmbeddedFrame_getWidget;
+		#Java_sun_awt_motif_MEmbeddedFrame_mapWidget;
+		#Java_sun_awt_motif_MFileDialogPeer_create;
+		#Java_sun_awt_motif_MFileDialogPeer_pDispose;
+		#Java_sun_awt_motif_MFileDialogPeer_pHide;
+		#Java_sun_awt_motif_MFileDialogPeer_pReshape;
+		#Java_sun_awt_motif_MFileDialogPeer_pShow;
+		#Java_sun_awt_motif_MFileDialogPeer_setFileEntry;
+		#Java_sun_awt_motif_MFileDialogPeer_setFont;
+		#Java_sun_awt_motif_MFramePeer_pGetIconSize;
+		#Java_sun_awt_motif_MGlobalCursorManager_cacheInit;
+		#Java_sun_awt_motif_MGlobalCursorManager_findComponentAt;
+		#Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor;
+		#Java_sun_awt_motif_MGlobalCursorManager_getCursorPos;
+		#Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen;
+		#Java_sun_awt_motif_MLabelPeer_create;
+		#Java_sun_awt_motif_MLabelPeer_setAlignment;
+		#Java_sun_awt_motif_MLabelPeer_setText;
+		#Java_sun_awt_motif_MListPeer_addItem;
+		#Java_sun_awt_motif_MListPeer_create;
+		#Java_sun_awt_motif_MListPeer_delItems;
+		#Java_sun_awt_motif_MListPeer_deselect;
+		#Java_sun_awt_motif_MListPeer_isSelected;
+		#Java_sun_awt_motif_MListPeer_makeVisible;
+		#Java_sun_awt_motif_MListPeer_select;
+		#Java_sun_awt_motif_MListPeer_setMultipleSelections;
+		#Java_sun_awt_motif_MMenuBarPeer_create;
+		#Java_sun_awt_motif_MMenuItemPeer_createMenuItem;
+		#Java_sun_awt_motif_MMenuItemPeer_pDisable;
+		#Java_sun_awt_motif_MMenuItemPeer_pDispose;
+		#Java_sun_awt_motif_MMenuItemPeer_pEnable;
+		#Java_sun_awt_motif_MMenuItemPeer_pSetLabel;
+		#Java_sun_awt_motif_MMenuPeer_createMenu;
+		#Java_sun_awt_motif_MMenuPeer_createSubMenu;
+		#Java_sun_awt_motif_MMenuPeer_pDispose;
+		#Java_sun_awt_motif_MPopupMenuPeer_createMenu;
+		#Java_sun_awt_motif_MPopupMenuPeer_pDispose;
+		#Java_sun_awt_motif_MPopupMenuPeer_pShow;
+		#Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl;
+		#Java_sun_awt_motif_MRobotPeer_keyPressImpl;
+		#Java_sun_awt_motif_MRobotPeer_keyReleaseImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseMoveImpl;
+		#Java_sun_awt_motif_MRobotPeer_mousePressImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl;
+		#Java_sun_awt_motif_MRobotPeer_mouseWheelImpl;
+		#Java_sun_awt_motif_MRobotPeer_setup;
+		#Java_sun_awt_motif_MScrollbarPeer_create;
+		#Java_sun_awt_motif_MScrollbarPeer_setLineIncrement;
+		#Java_sun_awt_motif_MScrollbarPeer_setPageIncrement;
+		#Java_sun_awt_motif_MScrollbarPeer_pSetValues;
+		#Java_sun_awt_motif_MScrollPanePeer_create;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace;
+		#Java_sun_awt_motif_MScrollPanePeer_pGetShadow;
+		#Java_sun_awt_motif_MScrollPanePeer_pInsets;
+		#Java_sun_awt_motif_MScrollPanePeer_pSetIncrement;
+		#Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild;
+		#Java_sun_awt_motif_MScrollPanePeer_setScrollPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_initIDs;
+		#Java_sun_awt_motif_MTextAreaPeer_pCreate;
+		#Java_sun_awt_motif_MTextAreaPeer_getCaretPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_getExtraHeight;
+		#Java_sun_awt_motif_MTextAreaPeer_getExtraWidth;
+		#Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd;
+		#Java_sun_awt_motif_MTextAreaPeer_getSelectionStart;
+		#Java_sun_awt_motif_MTextAreaPeer_getText;
+		#Java_sun_awt_motif_MTextAreaPeer_insert;
+		#Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible;
+		#Java_sun_awt_motif_MTextAreaPeer_pSetEditable;
+		#Java_sun_awt_motif_MTextAreaPeer_pShow2;
+		#Java_sun_awt_motif_MTextAreaPeer_replaceRange;
+		#Java_sun_awt_motif_MTextAreaPeer_select;
+		#Java_sun_awt_motif_MTextAreaPeer_setCaretPosition;
+		#Java_sun_awt_motif_MTextAreaPeer_setFont;
+		#Java_sun_awt_motif_MTextAreaPeer_setText;
+		#Java_sun_awt_motif_MTextAreaPeer_setTextBackground;
+		#Java_sun_awt_motif_MTextFieldPeer_initIDs;
+		#Java_sun_awt_motif_MTextFieldPeer_pCreate;
+		#Java_sun_awt_motif_MTextFieldPeer_getCaretPosition;
+		#Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd;
+		#Java_sun_awt_motif_MTextFieldPeer_getSelectionStart;
+		#Java_sun_awt_motif_MTextFieldPeer_getText;
+		#Java_sun_awt_motif_MTextFieldPeer_insertReplaceText;
+		#Java_sun_awt_motif_MTextFieldPeer_preDispose;
+		#Java_sun_awt_motif_MTextFieldPeer_pSetEditable;
+		#Java_sun_awt_motif_MTextFieldPeer_select;
+		#Java_sun_awt_motif_MTextFieldPeer_setCaretPosition;
+		#Java_sun_awt_motif_MTextFieldPeer_setEchoChar;
+		#Java_sun_awt_motif_MTextFieldPeer_setFont;
+		#Java_sun_awt_motif_MTextFieldPeer_setText;
 		Java_sun_awt_motif_MToolkit_beep;
 		Java_sun_awt_motif_MToolkit_getLockingKeyStateNative;
 		Java_sun_awt_motif_MToolkit_getMulticlickTime;
@@ -357,28 +357,28 @@
 		Java_sun_awt_motif_MToolkit_sync;
                 Java_sun_awt_motif_MToolkit_isAlwaysOnTopSupported;
 		Java_sun_awt_motif_MWindowAttributes_initIDs;
-		Java_sun_awt_motif_MWindowPeer_pDispose;
-		Java_sun_awt_motif_MWindowPeer_pHide;
-		Java_sun_awt_motif_MWindowPeer_pReshape;
-		Java_sun_awt_motif_MWindowPeer_pSetTitle;
-		Java_sun_awt_motif_MWindowPeer_pShow;
-		Java_sun_awt_motif_MWindowPeer_setResizable;
-		Java_sun_awt_motif_MWindowPeer_toBack;
-		Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
-		Java_sun_awt_motif_MWindowPeer_getState;
-		Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
-		Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
-		Java_sun_awt_motif_MWindowPeer_pShowModal;
-		Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
-		Java_sun_awt_motif_MWindowPeer_setSaveUnder;
-		Java_sun_awt_motif_MWindowPeer_setState;
-		Java_sun_awt_motif_MWindowPeer_resetTargetGC;
-		Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
-		Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
-                Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
-		Java_sun_awt_motif_X11CustomCursor_cacheInit;
-		Java_sun_awt_motif_X11CustomCursor_createCursor;
-		Java_sun_awt_motif_X11CustomCursor_queryBestCursor;
+		#Java_sun_awt_motif_MWindowPeer_pDispose;
+		#Java_sun_awt_motif_MWindowPeer_pHide;
+		#Java_sun_awt_motif_MWindowPeer_pReshape;
+		#Java_sun_awt_motif_MWindowPeer_pSetTitle;
+		#Java_sun_awt_motif_MWindowPeer_pShow;
+		#Java_sun_awt_motif_MWindowPeer_setResizable;
+		#Java_sun_awt_motif_MWindowPeer_toBack;
+		#Java_sun_awt_motif_MWindowPeer_addTextComponentNative;
+		#Java_sun_awt_motif_MWindowPeer_getState;
+		#Java_sun_awt_motif_MWindowPeer_pSetIMMOption;
+		#Java_sun_awt_motif_MWindowPeer_pSetMenuBar;
+		#Java_sun_awt_motif_MWindowPeer_pShowModal;
+		#Java_sun_awt_motif_MWindowPeer_removeTextComponentNative;
+		#Java_sun_awt_motif_MWindowPeer_setSaveUnder;
+		#Java_sun_awt_motif_MWindowPeer_setState;
+		#Java_sun_awt_motif_MWindowPeer_resetTargetGC;
+		#Java_sun_awt_motif_MWindowPeer_registerX11DropTarget;
+		#Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget;
+                #Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop;
+		#Java_sun_awt_motif_X11CustomCursor_cacheInit;
+		#Java_sun_awt_motif_X11CustomCursor_createCursor;
+		#Java_sun_awt_motif_X11CustomCursor_queryBestCursor;
 		Java_sun_awt_motif_X11FontMetrics_bytesWidth;
 		Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth;
 		Java_sun_awt_motif_X11FontMetrics_init;
@@ -387,18 +387,18 @@
 		Java_sun_awt_X11InputMethod_resetXIC;
 		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
 		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_motif_MInputMethod_openXIMNative;
-		Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
-		Java_sun_awt_motif_MInputMethod_createXICNative;
-		Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
-		Java_sun_awt_motif_MInputMethod_setXICFocusNative;
-		Java_sun_awt_motif_X11Clipboard_getClipboardData;
-		Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
-		Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
-		Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
-		Java_sun_awt_motif_X11Selection_init;
-		Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
-		Java_sun_awt_motif_X11Selection_clearNativeContext;
+		#Java_sun_awt_motif_MInputMethod_openXIMNative;
+		#Java_sun_awt_motif_MInputMethod_configureStatusAreaNative;
+		#Java_sun_awt_motif_MInputMethod_createXICNative;
+		#Java_sun_awt_motif_MInputMethod_reconfigureXICNative;
+		#Java_sun_awt_motif_MInputMethod_setXICFocusNative;
+		#Java_sun_awt_motif_X11Clipboard_getClipboardData;
+		#Java_sun_awt_motif_X11Clipboard_getClipboardFormats;
+		#Java_sun_awt_motif_X11Clipboard_registerClipboardViewer;
+		#Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer;
+		#Java_sun_awt_motif_X11Selection_init;
+		#Java_sun_awt_motif_X11Selection_pGetSelectionOwnership;
+		#Java_sun_awt_motif_X11Selection_clearNativeContext;
 		Java_sun_awt_SunToolkit_closeSplashScreen;
 		Java_sun_awt_PlatformFont_initIDs;
 		Java_sun_awt_X11GraphicsConfig_init;
@@ -442,40 +442,40 @@
 		Java_java_awt_Insets_initIDs;
 		Java_java_awt_TextField_initIDs;
 		Java_java_awt_Window_initIDs;
-		Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
-		Java_sun_awt_motif_MCheckboxPeer_getSpacing;
-		Java_sun_awt_motif_MChoicePeer_freeNativeData;
-		Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
-		Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
-		Java_sun_awt_motif_MComponentPeer_initIDs;
-		Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
-		Java_sun_awt_motif_MComponentPeer_pSetCursor;
-		Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
-		Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
-		Java_sun_awt_motif_MComponentPeer_setTargetBackground;
-		Java_sun_awt_motif_MDataTransferer_dragQueryFile;
-		Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
-		Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
-		Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
+		#Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize;
+		#Java_sun_awt_motif_MCheckboxPeer_getSpacing;
+		#Java_sun_awt_motif_MChoicePeer_freeNativeData;
+		#Java_sun_awt_motif_MComponentPeer_getComponents_1NoClientCode;
+		#Java_sun_awt_motif_MComponentPeer_getParent_1NoClientCode;
+		#Java_sun_awt_motif_MComponentPeer_initIDs;
+		#Java_sun_awt_motif_MComponentPeer_nativeHandleEvent;
+		#Java_sun_awt_motif_MComponentPeer_pSetCursor;
+		#Java_sun_awt_motif_MComponentPeer_pSetInnerForeground;
+		#Java_sun_awt_motif_MComponentPeer_pSetScrollbarBackground;
+		#Java_sun_awt_motif_MComponentPeer_setTargetBackground;
+		#Java_sun_awt_motif_MDataTransferer_dragQueryFile;
+		#Java_sun_awt_motif_MDataTransferer_getAtomForTarget;
+		#Java_sun_awt_motif_MDataTransferer_getTargetNameForAtom;
+		#Java_sun_awt_motif_MFileDialogPeer_insertReplaceFileDialogText;
 		Java_sun_awt_motif_MFontPeer_initIDs;
-		Java_sun_awt_motif_MListPeer_setBackground;
-		Java_sun_awt_motif_MMenuBarPeer_initIDs;
-		Java_sun_awt_motif_MMenuBarPeer_pDispose;
-		Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
-		Java_sun_awt_motif_MMenuItemPeer_initIDs;
-		Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
-		Java_sun_awt_motif_MPopupMenuPeer_initIDs;
-		Java_sun_awt_motif_MScrollbarPeer_initIDs;
-		Java_sun_awt_motif_MScrollPanePeer_initIDs;
-		Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
+		#Java_sun_awt_motif_MListPeer_setBackground;
+		#Java_sun_awt_motif_MMenuBarPeer_initIDs;
+		#Java_sun_awt_motif_MMenuBarPeer_pDispose;
+		#Java_sun_awt_motif_MMenuItemPeer_getParent_1NoClientCode;
+		#Java_sun_awt_motif_MMenuItemPeer_initIDs;
+		#Java_sun_awt_motif_MMenuItemPeer_pSetShortcut;
+		#Java_sun_awt_motif_MPopupMenuPeer_initIDs;
+		#Java_sun_awt_motif_MScrollbarPeer_initIDs;
+		#Java_sun_awt_motif_MScrollPanePeer_initIDs;
+		#Java_sun_awt_motif_MTextAreaPeer_pSetCursor;
 		Java_sun_awt_motif_MToolkit_shutdown;
-		Java_sun_awt_motif_MWindowPeer_initIDs;
-		Java_sun_awt_motif_MWindowPeer_pCreate;
-		Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
+		#Java_sun_awt_motif_MWindowPeer_initIDs;
+		#Java_sun_awt_motif_MWindowPeer_pCreate;
+		#Java_sun_awt_motif_MWindowPeer_wrapInSequenced;
 		Java_sun_awt_motif_X11FontMetrics_initIDs;
-		Java_sun_awt_X11InputMethod_initIDs;
+		#Java_sun_awt_X11InputMethod_initIDs;
 		Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
-		Java_sun_awt_motif_X11Selection_initIDs;
+		#Java_sun_awt_motif_X11Selection_initIDs;
 		Java_sun_awt_motif_MToolkitThreadBlockedHandler_enter;
 		Java_sun_awt_motif_MToolkitThreadBlockedHandler_exit;
 		Java_sun_awt_X11GraphicsConfig_init;
@@ -503,26 +503,26 @@
 		Java_sun_awt_X11SurfaceData_isDgaAvailable;
 		Java_sun_awt_X11SurfaceData_setInvalid;
 		Java_sun_awt_X11SurfaceData_flushNativeSurface;
-                Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
-                Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
-                Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
-                Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
-                Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
-                Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
-                Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
-                Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
-                Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
-                Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
-                Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
-                Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
-                Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;       
-                Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;       
-                Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
-                Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_initDispatching;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_endDispatching;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_embedChild;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_childDestroyed;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedPreferredSize;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getEmbedMinimumSize;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getClientBounds;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_notifyChildEmbedded;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_detachChild;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_forwardKeyEvent;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getAWTKeyCodeForKeySym;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__I;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_sendMessage__IJJJ;
+                #Java_sun_awt_motif_MEmbedCanvasPeer_getWindow;       
+                #Java_sun_awt_motif_MEmbedCanvasPeer_forwardEventToEmbedded;       
+                #Java_sun_awt_motif_GrabbedKey_initKeySymAndModifiers;
+                #Java_sun_awt_motif_MEmbeddedFramePeer_traverseOut;
 		awt_display;
 		awt_lock;
 		awt_Lock;
--- a/make/sun/awt/mawt.gmk	Wed Jun 18 19:27:59 2008 +0400
+++ b/make/sun/awt/mawt.gmk	Thu Jun 19 11:26:54 2008 +0400
@@ -28,14 +28,6 @@
 #
 INIT += $(LIB_LOCATION) 
 
-ifndef HEADLESS
-ifeq ($(PLATFORM), linux)
-ifeq ($(STATIC_MOTIF),false)
-INIT += $(LIB_LOCATION)/libXm.so
-endif
-endif
-endif
-
 #
 # Files
 #
@@ -52,13 +44,9 @@
 ifdef HEADLESS
   FILES_c = $(FILES_NO_MOTIF_c)
 else
-  FILES_c = $(FILES_MOTIF_c) $(FILES_NO_MOTIF_c)
-
-  ifeq ($(MOTIF_VERSION), 2)
-    FILES_c += awt_motif21.c
-    FILES_c += awt_Choice21.c
-  endif
-
+#  FILES_c = $(FILES_MOTIF_c) $(FILES_NO_MOTIF_c)
+#  XXX if in FILES_MOTIF_c there are unrelated to motif stuff, create a separate list!
+  FILES_c = $(FILES_NO_MOTIF_c)
 endif
 
 ifeq ($(PLATFORM), solaris)
@@ -93,15 +81,6 @@
 $(LIB_LOCATION):
 	$(MKDIR) -p $@
 
-ifeq ($(PLATFORM), linux)
-ifeq ($(STATIC_MOTIF),false)
-$(LIB_LOCATION)/libXm.so:
-	$(CP) $(MOTIF_LIB)/libXm.so $(LIB_LOCATION)/libXm.so
-# Automounter problem makes the link fail on Redhat 6.1.
-#	$(LN) -s $(MOTIF_LIB)/libXm.so $(LIB_LOCATION)/libXm.so
-endif
-endif
-
 clean:: 
 
 #
@@ -135,33 +114,49 @@
 CPPFLAGS += -DHEADLESS=$(HEADLESS)
 OTHER_LDLIBS =
 else
-CFLAGS += -DMOTIF_VERSION=$(MOTIF_VERSION)
+#CFLAGS += -DMOTIF_VERSION=$(MOTIF_VERSION)
 
-ifeq ($(STATIC_MOTIF),true)
-    LIBXM = $(MOTIF_LIB)/libXm.a -lXp -lXmu
-    ifeq ($(PLATFORM), linux)
-	ifeq ($(ARCH_DATA_MODEL), 64)
-            LIBXT = -lXt
-        else
-        # Allows for builds on Debian GNU Linux, X11 is in a different place 
-	    LIBXT = $(firstword $(wildcard /usr/X11R6/lib/libXt.a) \
-                            $(wildcard /usr/lib/libXt.a))
-	    LIBSM = $(firstword $(wildcard /usr/X11R6/lib/libSM.a) \
-                            $(wildcard /usr/lib/libSM.a))
-	    LIBICE = $(firstword $(wildcard /usr/X11R6/lib/libICE.a) \
-                             $(wildcard /usr/lib/libICE.a))
-	endif
-    endif
-else
-    LIBXM = -L$(MOTIF_LIB) -lXm -lXp
-    ifeq ($(PLATFORM), linux)
-	LIBXT = -lXt
-	LIBSM = 
-	LIBICE = 
-    endif
-endif
+#ifeq ($(STATIC_MOTIF),true)
+#    LIBXM = $(MOTIF_LIB)/libXm.a -lXp -lXmu
+#    ifeq ($(PLATFORM), linux)
+#	ifeq ($(ARCH_DATA_MODEL), 64)
+#            LIBXT = -lXt
+#        else
+#        # Allows for builds on Debian GNU Linux, X11 is in a different place 
+#	    LIBXT = $(firstword $(wildcard /usr/X11R6/lib/libXt.a) \
+#                            $(wildcard /usr/lib/libXt.a))
+#	    LIBSM = $(firstword $(wildcard /usr/X11R6/lib/libSM.a) \
+#                            $(wildcard /usr/lib/libSM.a))
+#	    LIBICE = $(firstword $(wildcard /usr/X11R6/lib/libICE.a) \
+#                             $(wildcard /usr/lib/libICE.a))
+#	endif
+#    endif
+#else
+#    LIBXM = -L$(MOTIF_LIB) -lXm -lXp
+#    ifeq ($(PLATFORM), linux)
+#	LIBXT = -lXt
+#	LIBSM = 
+#	LIBICE = 
+#    endif
+#endif
 
 LIBXTST = -lXtst
+ifeq ($(PLATFORM), linux)
+   ifeq ($(ARCH_DATA_MODEL), 64)
+   # XXX what about the rest of them?
+        LIBXT = -lXt
+    else
+    # Allows for builds on Debian GNU Linux, X11 is in a different place 
+       LIBXT = $(firstword $(wildcard /usr/X11R6/lib/libXt.a) \
+                        $(wildcard /usr/lib/libXt.a))
+       LIBSM = $(firstword $(wildcard /usr/X11R6/lib/libSM.a) \
+                        $(wildcard /usr/lib/libSM.a))
+       LIBICE = $(firstword $(wildcard /usr/X11R6/lib/libICE.a) \
+                         $(wildcard /usr/lib/libICE.a))
+       LIBXTST = $(firstword $(wildcard /usr/X11R6/lib/libXtst.a) \
+                         $(wildcard /usr/lib/libXtst.a))
+   endif
+endif
 
 # Use -lXmu for EditRes support
 LIBXMU_DBG	= -lXmu
@@ -169,14 +164,14 @@
 LIBXMU		= $(LIBXMU_$(VARIANT))
 
 ifeq ($(PLATFORM), solaris)
-OTHER_LDLIBS = $(LIBXM) -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
+OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
 endif
 
 ifeq ($(PLATFORM), linux)
 OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
-OTHER_CFLAGS += -DMOTIF_VERSION=2
+# XXX what is this define below? Isn't it motif-related?
 OTHER_CFLAGS += -DXMSTRINGDEFINES=1
-OTHER_LDLIBS = $(LIBXM) $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi
+OTHER_LDLIBS =  $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi
 endif
 
 endif
@@ -199,9 +194,8 @@
 CPPFLAGS += -I$(CUPS_HEADERS_PATH)
 
 ifndef HEADLESS
-CPPFLAGS += -I$(MOTIF_DIR)/include \
-            -I$(OPENWIN_HOME)/include 
-LDFLAGS  += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+CPPFLAGS += -I$(OPENWIN_HOME)/include 
+LDFLAGS  += -L$(OPENWIN_LIB)
 
 endif # !HEADLESS
 
--- a/make/sun/jawt/Makefile	Wed Jun 18 19:27:59 2008 +0400
+++ b/make/sun/jawt/Makefile	Thu Jun 19 11:26:54 2008 +0400
@@ -93,7 +93,6 @@
 # Other extra flags needed for compiling.
 #
 CPPFLAGS += -I$(OPENWIN_HOME)/include \
-	    -I$(MOTIF_DIR)/include \
 	    -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
             -I$(SHARE_SRC)/native/$(PKGDIR)/image \
 	    -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
--- a/src/solaris/classes/sun/awt/motif/MButtonPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.ActionEvent;
-
-class MButtonPeer extends MComponentPeer implements ButtonPeer {
-    native void create(MComponentPeer peer);
-    public native void setLabel(String label);
-
-    MButtonPeer(Button target) {
-        super(target);
-    }
-
-    public Dimension getMinimumSize() {
-        FontMetrics fm = getFontMetrics(target.getFont());
-        String label = ((Button)target).getLabel();
-        if ( label == null ) {
-            label = "";
-        }
-        return new Dimension(fm.stringWidth(label) + 14,
-                             fm.getHeight() + 8);
-    }
-
-    public boolean isFocusable() {
-        return true;
-    }
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void action(final long when, final int modifiers) {
-        MToolkit.executeOnEventHandlerThread(target, new Runnable() {
-            public void run() {
-                postEvent(new ActionEvent(target, ActionEvent.ACTION_PERFORMED,
-                                          ((Button)target).getActionCommand(),
-                                          when, modifiers));
-            }
-        });
-    }
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information.
-     */
-    public void print(Graphics g) {
-        Button b = (Button)target;
-        Dimension d = b.size();
-        Color bg = b.getBackground();
-        Color fg = b.getForeground();
-
-        g.setColor(bg);
-        g.fillRect(2, 2, d.width - 3, d.height - 3);
-        draw3DRect(g, bg, 1, 1, d.width - 2, d.height - 2, true);
-
-        g.setColor(fg);
-        g.setFont(b.getFont());
-        FontMetrics fm = g.getFontMetrics();
-        String lbl = b.getLabel();
-        g.drawString(lbl, (d.width - fm.stringWidth(lbl)) / 2,
-                          (d.height + fm.getMaxAscent() - fm.getMaxDescent()) / 2);
-
-        target.print(g);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-}
--- a/src/solaris/classes/sun/awt/motif/MCanvasPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import sun.awt.DisplayChangedListener;
-import sun.awt.X11GraphicsConfig;
-import sun.awt.X11GraphicsDevice;
-import sun.awt.X11GraphicsEnvironment;
-
-class MCanvasPeer extends MComponentPeer implements CanvasPeer,
- DisplayChangedListener {
-
-    native void create(MComponentPeer parent);
-    private static native void initIDs();
-    static {
-        initIDs();
-    }
-
-    MCanvasPeer() {}
-
-    MCanvasPeer(Component target) {
-        super(target);
-    }
-
-    MCanvasPeer(Component target, Object arg) {
-        super(target, arg);
-    }
-
-/* --- DisplayChangedListener Stuff --- */
-    public void displayChanged() {}
-    public void paletteChanged() {}
-    native void resetTargetGC(Component target);
-
-    /*
-     * Called when the Window this
-     * Canvas is on is moved onto another Xinerama screen.
-     *
-     * Canvases can be created with a non-defulat GraphicsConfiguration.  The
-     * GraphicsConfiguration needs to be changed to one on the new screen,
-     * preferably with the same visual ID.
-     *
-     * Up-called for other windows peer instances (WPanelPeer, WWindowPeer).
-     *
-     * Should only be called from the event thread.
-     */
-     public void displayChanged(int screenNum) {
-        resetLocalGC(screenNum);
-        resetTargetGC(target);  /* call Canvas.setGCFromPeer() via native */
-    }
-
-    /* Set graphicsConfig to a GraphicsConfig with the same visual on the new
-     * screen, which should be easy in Xinerama mode.
-     *
-     * Should only be called from displayChanged(), and therefore only from
-     * the event thread.
-     */
-    void resetLocalGC(int screenNum) {
-        // Opt: Only need to do if we're not using the default GC
-        if (graphicsConfig != null) {
-            X11GraphicsConfig parentgc;
-            // save vis id of current gc
-            int visual = graphicsConfig.getVisual();
-
-            X11GraphicsDevice newDev = (X11GraphicsDevice) GraphicsEnvironment.
-                                                 getLocalGraphicsEnvironment().
-                                                 getScreenDevices()[screenNum];
-
-            for (int i = 0; i < newDev.getNumConfigs(screenNum); i++) {
-                if (visual == newDev.getConfigVisualId(i, screenNum)) {
-                    // use that
-                    graphicsConfig = (X11GraphicsConfig)newDev.getConfigurations()[i];
-                    break;
-                }
-            }
-            // just in case...
-            if (graphicsConfig == null) {
-                graphicsConfig = (X11GraphicsConfig) GraphicsEnvironment.
-                                           getLocalGraphicsEnvironment().
-                                           getScreenDevices()[screenNum].
-                                           getDefaultConfiguration();
-            }
-        }
-    }
-
-    protected boolean shouldFocusOnClick() {
-        // Canvas should always be able to be focused by mouse clicks.
-        return true;
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-
-package sun.awt.motif;
-
-
-import java.awt.*;
-import java.awt.event.*;
-import java.awt.peer.*;
-
-class MCheckboxMenuItemPeer extends MMenuItemPeer
-                            implements CheckboxMenuItemPeer {
-    private boolean inUpCall=false;
-    private boolean inInit=false;
-
-    native void pSetState(boolean t);
-    native boolean getState();
-
-    void create(MMenuPeer parent) {
-        super.create(parent);
-        inInit=true;
-        setState(((CheckboxMenuItem)target).getState());
-        inInit=false;
-    }
-
-    MCheckboxMenuItemPeer(CheckboxMenuItem target) {
-        this.target = target;
-        isCheckbox = true;
-        MMenuPeer parent = (MMenuPeer) MToolkit.targetToPeer(getParent_NoClientCode(target));
-        create(parent);
-    }
-
-    public void setState(boolean t) {
-        if (!nativeCreated) {
-            return;
-        }
-        if (!inUpCall && (t != getState())) {
-            pSetState(t);
-            if (!inInit) {
-                // 4135725 : do not notify on programatic changes
-                // notifyStateChanged(t);
-            }
-        }
-    }
-
-    void notifyStateChanged(boolean state) {
-        CheckboxMenuItem cb = (CheckboxMenuItem)target;
-        ItemEvent e = new ItemEvent(cb,
-                          ItemEvent.ITEM_STATE_CHANGED,
-                          cb.getLabel(),
-                          state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
-        postEvent(e);
-    }
-
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void action(long when, int modifiers, boolean state) {
-        final CheckboxMenuItem cb = (CheckboxMenuItem)target;
-        final boolean newState = state;
-
-        MToolkit.executeOnEventHandlerThread(cb, new Runnable() {
-            public void run() {
-                cb.setState(newState);
-                notifyStateChanged(newState);
-            }
-        });
-        //Fix for 5005195: MAWT: CheckboxMenuItem fires action events
-        //super.action() is not invoked
-    } // action()
-} // class MCheckboxMenuItemPeer
--- a/src/solaris/classes/sun/awt/motif/MCheckboxPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
- * Copyright 1995-2000 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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.*;
-
-public class MCheckboxPeer extends MComponentPeer implements CheckboxPeer {
-    private boolean inUpCall = false;
-    private boolean inInit=false;
-
-    native void create(MComponentPeer parent);
-    native void pSetState(boolean state);
-    native boolean pGetState();
-
-    public native void setLabel(String label);
-    public native void setCheckboxGroup(CheckboxGroup g);
-
-
-    void initialize() {
-        Checkbox t = (Checkbox)target;
-        inInit=true;
-
-        setState(t.getState());
-        setCheckboxGroup(t.getCheckboxGroup());
-        super.initialize();
-        inInit=false;
-    }
-
-    public MCheckboxPeer(Checkbox target) {
-        super(target);
-    }
-
-    public boolean isFocusable() {
-        return true;
-    }
-
-    public void setState(boolean state) {
-        if (inInit) {
-                pSetState(state);
-        } else if (!inUpCall && (state != pGetState())) {
-                pSetState(state);
-                // 4135725 : do not notify on programatic changes
-                // notifyStateChanged(state);
-        }
-    }
-    private native int getIndicatorSize();
-    private native int getSpacing();
-
-    public Dimension getMinimumSize() {
-        String lbl = ((Checkbox)target).getLabel();
-        if (lbl == null) {
-            lbl = "";
-        }
-        FontMetrics fm = getFontMetrics(target.getFont());
-        /*
-         * Spacing (number of pixels between check mark and label text) is
-         * currently set to 0, but in case it ever changes we have to add
-         * it. 8 is a heuristic number. Indicator size depends on font
-         * height, so we don't need to include it in checkbox's height
-         * calculation.
-         */
-        int wdth = fm.stringWidth(lbl) + getIndicatorSize() + getSpacing() + 8;
-        int hght = Math.max(fm.getHeight() + 8, 15);
-        return new Dimension(wdth, hght);
-    }
-
-
-    void notifyStateChanged(boolean state) {
-        Checkbox cb = (Checkbox) target;
-        ItemEvent e = new ItemEvent(cb,
-                          ItemEvent.ITEM_STATE_CHANGED,
-                          cb.getLabel(),
-                          state ? ItemEvent.SELECTED : ItemEvent.DESELECTED);
-        postEvent(e);
-    }
-
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    void action(boolean state) {
-        final Checkbox cb = (Checkbox)target;
-        final boolean newState = state;
-        MToolkit.executeOnEventHandlerThread(cb, new Runnable() {
-            public void run() {
-                CheckboxGroup cbg = cb.getCheckboxGroup();
-                /* Bugid 4039594. If this is the current Checkbox in
-                 * a CheckboxGroup, then return to prevent deselection.
-                 * Otherwise, it's logical state will be turned off,
-                 * but it will appear on.
-                 */
-                if ((cbg != null) && (cbg.getSelectedCheckbox() == cb) &&
-                    cb.getState()) {
-                  inUpCall = false;
-                  cb.setState(true);
-                  return;
-                }
-                // All clear - set the new state
-                cb.setState(newState);
-                notifyStateChanged(newState);
-            } // run()
-        });
-    } // action()
-
-
-
-    static final int SIZE = 19;
-    static final int BORDER = 4;
-    static final int SIZ = SIZE - BORDER*2 - 1;
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information; need to render check mark.
-     */
-    public void print(Graphics g) {
-        Checkbox cb = (Checkbox)target;
-        Dimension d = cb.size();
-        Color bg = cb.getBackground();
-        Color fg = cb.getForeground();
-        Color shadow = bg.darker();
-        int x = BORDER;
-        int y = ((d.height - SIZE) / 2) + BORDER;
-
-        g.setColor(cb.getState()? shadow : bg);
-
-        if (cb.getCheckboxGroup() != null) {
-            g.fillOval(x, y, SIZ, SIZ);
-            draw3DOval(g, bg, x, y, SIZ, SIZ, !(cb.getState()));
-            if (cb.getState()) {
-                g.setColor(fg);
-                g.fillOval(x + 3, y + 3, SIZ - 6, SIZ - 6);
-            }
-        } else {
-            g.fillRect(x, y, SIZ, SIZ);
-            draw3DRect(g, bg, x, y, SIZ, SIZ, !(cb.getState()));
-            if (cb.getState()) {
-                g.setColor(fg);
-                g.drawLine(x+1, y+1, x+SIZ-1, y+SIZ-1);
-                g.drawLine(x+1, y+SIZ-1, x+SIZ-1, y+1);
-            }
-        }
-        g.setColor(fg);
-        String lbl = cb.getLabel();
-        if (lbl != null) {
-            // REMIND: align
-            g.setFont(cb.getFont());
-            FontMetrics fm = g.getFontMetrics();
-            g.drawString(lbl, SIZE,
-                         (d.height + fm.getMaxAscent() - fm.getMaxDescent()) / 2);
-        }
-
-        target.print(g);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
-}
--- a/src/solaris/classes/sun/awt/motif/MChoicePeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.ItemEvent;
-
-class MChoicePeer extends MComponentPeer implements ChoicePeer {
-    boolean inUpCall=false;
-
-    native void create(MComponentPeer parent);
-    native void pReshape(int x, int y, int width, int height);
-    native void pSelect(int index, boolean init);
-    native void appendItems(String[] items);
-
-    void initialize() {
-        Choice opt = (Choice)target;
-        int itemCount = opt.countItems();
-        String[] items = new String[itemCount];
-        for (int i=0; i < itemCount; i++) {
-            items[i] = opt.getItem(i);
-        }
-        if (itemCount > 0) {
-            appendItems(items);
-            pSelect(opt.getSelectedIndex(), true);
-        }
-        super.initialize();
-    }
-
-    public MChoicePeer(Choice target) {
-        super(target);
-    }
-
-    public boolean isFocusable() {
-        return true;
-    }
-
-    public Dimension getMinimumSize() {
-        FontMetrics fm = getFontMetrics(target.getFont());
-        Choice c = (Choice)target;
-        int w = 0;
-        for (int i = c.countItems() ; i-- > 0 ;) {
-            w = Math.max(fm.stringWidth(c.getItem(i)), w);
-        }
-        return new Dimension(32 + w, Math.max(fm.getHeight() + 8, 15) + 5);
-    }
-
-    public native void setFont(Font f);
-
-    public void add(String item, int index) {
-        addItem(item, index);
-        // Adding an item can change the size of the Choice, so do
-        // a reshape, based on the font size.
-        Rectangle r = target.getBounds();
-        reshape(r.x, r.y, 0, 0);
-    }
-
-    public native void remove(int index);
-
-    public native void removeAll();
-
-    /**
-     * DEPRECATED, but for now, called by add(String, int).
-     */
-    public native void addItem(String item, int index);
-
-    // public native void remove(int index);
-
-    public native void setBackground(Color c);
-
-    public native void setForeground(Color c);
-
-    public void select(int index) {
-        if (!inUpCall) {
-            pSelect(index, false);
-        }
-    }
-
-    void notifySelection(String item) {
-        Choice c = (Choice)target;
-        ItemEvent e = new ItemEvent(c, ItemEvent.ITEM_STATE_CHANGED,
-                                item, ItemEvent.SELECTED);
-        postEvent(e);
-    }
-
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    void action(final int index) {
-        final Choice c = (Choice)target;
-        inUpCall = false;  /* Used to prevent native selection. */
-        MToolkit.executeOnEventHandlerThread(c, new Runnable() {
-            public void run() {
-                String item;
-                synchronized(c) {
-                    if (index >= c.getItemCount()) {
-                        /* Nothing to do when the list is too short */
-                        return;
-                    }
-                    inUpCall = true;       /* Prevent native selection. */
-                    c.select(index);       /* set value in target */
-                    item = c.getItem(index);
-                    inUpCall = false;
-                }
-                notifySelection(item);
-            }
-        });
-    }
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information.
-     */
-    public void print(Graphics g) {
-        Choice ch = (Choice)target;
-        Dimension d = ch.size();
-        Color bg = ch.getBackground();
-        Color fg = ch.getForeground();
-
-        g.setColor(bg);
-        g.fillRect(2, 2, d.width-1, d.height-1);
-        draw3DRect(g, bg, 1, 1, d.width-2, d.height-2, true);
-        draw3DRect(g, bg, d.width - 18, (d.height / 2) - 3, 10, 6, true);
-
-        g.setColor(fg);
-        g.setFont(ch.getFont());
-        FontMetrics fm = g.getFontMetrics();
-        String lbl = ch.getSelectedItem();
-        if (lbl == null){
-            lbl = "";
-        }
-        if (lbl != ""){
-            g.drawString(lbl, 5, (d.height + fm.getMaxAscent()-fm.getMaxDescent())/2);
-        }
-
-        target.print(g);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
-    protected void disposeImpl() {
-        freeNativeData();
-        super.disposeImpl();
-    }
-
-    private native void freeNativeData();
-}
--- a/src/solaris/classes/sun/awt/motif/MComponentPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1182 +0,0 @@
-/*
- * Copyright 1995-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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.PaintEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.InputEvent;
-
-import sun.awt.*;
-import sun.awt.image.ToolkitImage;
-import sun.awt.image.SunVolatileImage;
-import java.awt.image.ImageProducer;
-import java.awt.image.ImageObserver;
-import java.awt.image.ColorModel;
-import java.awt.image.VolatileImage;
-
-import java.awt.dnd.DropTarget;
-import java.awt.dnd.peer.DropTargetPeer;
-
-import sun.java2d.SunGraphics2D;
-import sun.java2d.SurfaceData;
-
-import java.lang.reflect.Method;
-
-import java.util.logging.*;
-
-import sun.java2d.pipe.Region;
-
-
-public /* REMIND: should not be public */
-abstract class MComponentPeer implements ComponentPeer, DropTargetPeer, X11ComponentPeer {
-
-    private static final Logger log = Logger.getLogger("sun.awt.motif.MComponentPeer");
-    private static final Logger focusLog = Logger.getLogger("sun.awt.motif.focus.MComponentPeer");
-
-    Component   target;
-    long        pData;
-    long        jniGlobalRef;
-    protected X11GraphicsConfig graphicsConfig;
-    SurfaceData surfaceData;
-    int         oldWidth = -1;
-    int         oldHeight = -1;
-
-    private RepaintArea paintArea;
-
-    boolean isLayouting = false;
-    boolean paintPending = false;
-
-    protected boolean disposed = false;
-    private static int JAWT_LOCK_ERROR=0x00000001;
-    private static int JAWT_LOCK_CLIP_CHANGED=0x00000002;
-    private static int JAWT_LOCK_BOUNDS_CHANGED=0x00000004;
-    private static int JAWT_LOCK_SURFACE_CHANGED=0x00000008;
-    private int drawState = JAWT_LOCK_CLIP_CHANGED |
-    JAWT_LOCK_BOUNDS_CHANGED |
-    JAWT_LOCK_SURFACE_CHANGED;
-
-    /* These are the enumerated types in awt_p.h*/
-    static final int MOTIF_NA = 0 ;
-    static final int MOTIF_V1 = 1 ;
-    static final int MOTIF_V2 = 2 ;
-
-    private Font font;
-    private long backBuffer = 0;
-    private VolatileImage xBackBuffer = null;
-
-    static {
-        initIDs();
-    }
-
-    /* initialize the fieldIDs of fields that may be accessed from C */
-    private native static void initIDs();
-
-
-    /* This will return the last state of a window. ie the specific
-     * "gotcha" is that if you iconify a window its obscurity remains
-     * unchanged. Current use of this is just in user-initiated scrolling.
-     * If that use expands to more cases you may need to "and" this with
-     * the value of the iconic state of a Frame.
-     * Note that de-iconifying an X11 window DOES generate a new event
-     * correctly notifying you of the new visibility of the window
-     */
-    public boolean isObscured() {
-
-        Container container  = (target instanceof Container) ?
-            (Container)target : target.getParent();
-
-        if (container == null) {
-            return true;
-        }
-
-        Container parent;
-        while ((parent = container.getParent()) != null) {
-            container = parent;
-        }
-
-        if (container instanceof Window) {
-            MWindowPeer wpeer = (MWindowPeer)(container.getPeer());
-            if (wpeer != null) {
-                return (wpeer.winAttr.visibilityState !=
-                        MWindowAttributes.AWT_UNOBSCURED);
-            }
-        }
-        return true;
-    }
-
-    public boolean canDetermineObscurity() {
-        return true;
-    }
-
-    abstract void create(MComponentPeer parent);
-    void create(MComponentPeer parent, Object arg) {
-        create(parent);
-    }
-
-    void EFcreate(MComponentPeer parent, int x){}
-
-    native void pInitialize();
-    native void pShow();
-    native void pHide();
-    native void pEnable();
-    native void pDisable();
-    native void pReshape(int x, int y, int width, int height);
-    native void pDispose();
-    native void pMakeCursorVisible();
-    native Point pGetLocationOnScreen();
-    native Point pGetLocationOnScreen2(Window win, MWindowPeer wpeer);
-    native void pSetForeground(Color c);
-    native void pSetBackground(Color c);
-    private native void pSetFont(Font f);
-
-    //Added for bug 4175560
-    //Returns the native representation for the Color argument,
-    //using the given GraphicsConfiguration.
-    native int getNativeColor(Color clr, GraphicsConfiguration gc);
-
-    // Returns the parent of the component, without invoking client
-    // code. This must go through native code, because it invokes
-    // private methods in the java.awt package, which we cannot
-    // do from this package.
-    static native Container getParent_NoClientCode(Component component);
-
-    // Returns the parent of the component, without invoking client
-    // code. This must go through native code, because it invokes
-    // private methods in the java.awt package, which we cannot
-    // do from this package.
-    static native Component[] getComponents_NoClientCode(Container container);
-
-    void initialize() {
-        if (!target.isVisible()) {
-            hide();
-        }
-        Color c;
-        Font  f;
-        Cursor cursor;
-
-        pInitialize();
-
-        if ((c = target.getForeground()) != null) {
-            setForeground(c);
-        }
-        if ((c = target.getBackground()) != null) {
-            setBackground(c);
-        }
-        if ((f = target.getFont()) != null) {
-            setFont(f);
-        }
-        pSetCursor(target.getCursor());
-        if (!target.isEnabled()) {
-            disable();
-        }
-        Rectangle r = target.getBounds();
-        reshape(r.x, r.y, r.width, r.height);
-        if (target.isVisible()) {
-            show();
-        }
-
-        surfaceData = graphicsConfig.createSurfaceData(this);
-    }
-
-    public void init(Component target, Object arg) {
-        this.target = target;
-        this.paintArea = new RepaintArea();
-
-        Container parent = MToolkit.getNativeContainer(target);
-        MComponentPeer parentPeer = (MComponentPeer) MToolkit.targetToPeer(parent);
-        create(parentPeer, arg);
-
-        initialize();
-    }
-
-    MComponentPeer(Component target, Object arg) {
-        init(target, arg);
-    }
-
-    MComponentPeer() {}
-
-    public void init(Component target) {
-        this.target = target;
-        this.paintArea = new RepaintArea();
-
-        Container parent = MToolkit.getNativeContainer(target);
-        MComponentPeer parentPeer = (MComponentPeer) MToolkit.targetToPeer(parent);
-        create(parentPeer);
-
-        if (parent != null && parent instanceof ScrollPane) {
-            MScrollPanePeer speer = (MScrollPanePeer) parentPeer;
-            speer.setScrollChild(this);
-        }
-        initialize();
-    }
-
-    MComponentPeer(Component target) {
-        init(target);
-    }
-
-    protected void finalize() throws Throwable {
-        dispose();
-        super.finalize();
-    }
-
-    public void setForeground(Color c) {
-        pSetForeground(c);
-    }
-
-    public void setBackground(Color c) {
-        pSetBackground(c);
-    }
-
-    public void updateCursorImmediately() {
-        MGlobalCursorManager.getCursorManager().updateCursorImmediately();
-    }
-
-    public void setFont(Font f) {
-        ComponentPeer peer;
-        if (f == null) {
-            f = defaultFont;
-        }
-        pSetFont(f);
-        if ( target instanceof Container ) {
-            Container container = (Container) target;
-            int count = container.getComponentCount();
-            Component[] children = container.getComponents();
-            for (int i=0; i<count; i++) {
-                if ( children[i] != null ) {
-/*
-** note: recursion in the widget in pSetFont() has by now broken any
-**       children with different Fonts - so fix now:
-*/
-                    peer = children[i].getPeer();
-                    if (peer != null) {
-                        Font rightFont = children[i].getFont();
-                        if (!f.equals(rightFont)) {
-                            peer.setFont(rightFont);
-                        } else
-                            if (children[i] instanceof Container) {
-                                peer.setFont(f);
-                            }
-                    }
-                }
-            }
-        }
-
-        /*
-         * Keep a reference to the java.awt.Font object in order to
-         * preserve the XFontStructs which underlying widgets are using.
-         * Save this AFTER changing the widgets in order to keep the
-         * previous reference (if any) alive.
-         */
-        font = f;
-    }
-
-
-    public native void setTargetBackground(Color c);
-    public native void pSetCursor(Cursor c);
-    public native void pSetScrollbarBackground(Color c);
-    public native void pSetInnerForeground(Color c);
-
-    public boolean isFocusable() {
-        return false;
-    }
-
-    public SurfaceData getSurfaceData() {
-        return surfaceData;
-    }
-
-    public ColorModel getColorModel() {
-        return graphicsConfig.getColorModel();
-    }
-
-    public ColorModel getColorModel(int transparency) {
-        return graphicsConfig.getColorModel(transparency);
-    }
-
-    public int updatePriority() {
-        return Thread.NORM_PRIORITY;
-    }
-
-    public void repaint(long tm, int x, int y, int width, int height) {
-    }
-
-    public void paint(Graphics g) {
-        Dimension d = target.getSize();
-        if (g instanceof Graphics2D ||
-            g instanceof sun.awt.Graphics2Delegate) {
-            // background color is setup correctly, so just use clearRect
-            g.clearRect(0, 0, d.width, d.height);
-        } else {
-            // emulate clearRect
-            g.setColor(target.getBackground());
-            g.fillRect(0, 0, d.width, d.height);
-            g.setColor(target.getForeground());
-        }
-
-        target.paint(g);
-    }
-    public void print(Graphics g) {
-        Dimension d = target.getSize();
-        if (g instanceof Graphics2D ||
-            g instanceof sun.awt.Graphics2Delegate) {
-            // background color is setup correctly, so just use clearRect
-            g.clearRect(0, 0, d.width, d.height);
-        } else {
-            // emulate clearRect
-            g.setColor(target.getBackground());
-            g.fillRect(0, 0, d.width, d.height);
-            g.setColor(target.getForeground());
-        }
-
-        target.print(g);
-    }
-
-    public void coalescePaintEvent(PaintEvent e) {
-        Rectangle r = e.getUpdateRect();
-        paintArea.add(r, e.getID());
-
-        if (log.isLoggable(Level.FINEST)) {
-            switch(e.getID()) {
-              case PaintEvent.UPDATE:
-                  log.log(Level.FINEST, "coalescePaintEvent: UPDATE: add: x = " +
-                          r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
-                  return;
-              case PaintEvent.PAINT:
-                  log.log(Level.FINEST, "coalescePaintEvent: PAINT: add: x = " +
-                          r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
-                  return;
-            }
-        }
-    }
-
-    native void nativeHandleEvent(AWTEvent e);
-
-    /**
-     * Returns whether or not this component should be given focus on mouse click.
-     * Default implementation return whether or not this peer is "focusable"
-     * Descendants might want to override it to extend/restrict conditions at which this
-     * component should be focused by click (see MCanvasPeer and MPanelPeer)
-     */
-    protected boolean shouldFocusOnClick() {
-        return isFocusable();
-    }
-
-    /**
-     * Checks whether or not this component would be focused by native system if it would be allowed to do so.
-     * Currently it checks that it displayable, visible, enabled and focusable.
-     */
-    static boolean canBeFocusedByClick(Component component) {
-        if (component == null) {
-            return false;
-        } else {
-            return component.isDisplayable() && component.isVisible() && component.isEnabled() && component.isFocusable();
-        }
-    }
-
-    static Method requestFocusWithCause;
-
-    static void callRequestFocusInWindow(Component target, CausedFocusEvent.Cause cause) {
-        if (requestFocusWithCause == null) {
-            requestFocusWithCause = SunToolkit.getMethod(Component.class, "requestFocusInWindow", new Class[] {CausedFocusEvent.Cause.class});
-        }
-        if (requestFocusWithCause != null) {
-            try {
-                requestFocusWithCause.invoke(target, new Object[] {cause});
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-    }
-
-    public void handleEvent(AWTEvent e) {
-        int id = e.getID();
-
-        switch(id) {
-          case PaintEvent.PAINT:
-              // Got native painting
-              paintPending = false;
-              // Fallthrough to next statement
-          case PaintEvent.UPDATE:
-              // Skip all painting while layouting and all UPDATEs
-              // while waiting for native paint
-              if (!isLayouting && !paintPending) {
-                  paintArea.paint(target,false);
-              }
-              return;
-          case MouseEvent.MOUSE_PRESSED:
-              if (target == e.getSource() && !((InputEvent)e).isConsumed() && shouldFocusOnClick()
-                  && !target.isFocusOwner() && canBeFocusedByClick(target))
-              {
-                  callRequestFocusInWindow(target, CausedFocusEvent.Cause.MOUSE_EVENT);
-              }
-              break;
-          default:
-              break;
-        }
-
-        // Call the native code
-        nativeHandleEvent(e);
-    }
-
-    /* New API for 1.1 */
-    public Dimension getMinimumSize() {
-        return target.getSize();
-    }
-
-    /* New API for 1.1 */
-    public Dimension getPreferredSize() {
-        return getMinimumSize();
-    }
-
-    // Do nothing for heavyweight implementation
-    public void layout() {}
-
-    public Rectangle getBounds() {
-        return ((Component)target).getBounds();
-    }
-
-    public Object getTarget() {
-        return target;
-    }
-
-    public java.awt.Toolkit getToolkit() {
-        // XXX: bogus
-        return Toolkit.getDefaultToolkit();
-    }
-
-    // fallback default font object
-    final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
-
-    public synchronized Graphics getGraphics() {
-        if (!disposed) {
-            Component target = (Component) this.target;
-
-            /* Fix for bug 4746122. Color and Font shouldn't be null */
-            Color bgColor = target.getBackground();
-            if (bgColor == null) {
-                bgColor = SystemColor.window;
-            }
-            Color fgColor = target.getForeground();
-            if (fgColor == null) {
-                fgColor = SystemColor.windowText;
-            }
-            Font font = target.getFont();
-            if (font == null) {
-                font = defaultFont;
-            }
-            return new SunGraphics2D(surfaceData, fgColor, bgColor, font);
-        }
-
-        return null;
-    }
-
-    public Image createImage(ImageProducer producer) {
-        return new ToolkitImage(producer);
-    }
-
-    public Image createImage(int width, int height) {
-        return graphicsConfig.createAcceleratedImage(target, width, height);
-    }
-
-    public VolatileImage createVolatileImage(int width, int height) {
-        return new SunVolatileImage(target, width, height);
-    }
-
-    public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().prepareImage(img, w, h, o);
-    }
-
-    public int checkImage(Image img, int w, int h, ImageObserver o) {
-        return getToolkit().checkImage(img, w, h, o);
-    }
-
-    public FontMetrics getFontMetrics(Font font) {
-        return X11FontMetrics.getFontMetrics(font);
-    }
-
-    /*
-     * Subclasses should override disposeImpl() instead of dispose(). Client
-     * code should always invoke dispose(), never disposeImpl().
-     */
-    protected void disposeImpl() {
-        SurfaceData oldData = surfaceData;
-        surfaceData = null;
-        oldData.invalidate();
-        MToolkit.targetDisposedPeer(target, this);
-        pDispose();
-    }
-    public final void dispose() {
-        boolean call_disposeImpl = false;
-
-        if (!disposed) {
-            synchronized (this) {
-                SunToolkit.awtLock();
-                try {
-                    if (!disposed) {
-                        disposed = call_disposeImpl = true;
-                    }
-                } finally {
-                    SunToolkit.awtUnlock();
-                }
-            }
-        }
-
-        if (call_disposeImpl) {
-            disposeImpl();
-        }
-    }
-
-    native static boolean processSynchronousLightweightTransfer(Component heavyweight, Component descendant,
-                                                                boolean temporary, boolean focusedWindowChangeAllowed,
-                                                                long time);
-    public boolean requestFocus
-    (Component lightweightChild, boolean temporary,
-         boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause) {
-        if (processSynchronousLightweightTransfer((Component)target, lightweightChild, temporary,
-                                                  focusedWindowChangeAllowed, time)) {
-            return true;
-        } else {
-            if (focusLog.isLoggable(Level.FINER)) {
-                focusLog.log(Level.FINER, "Current native focused window " + getNativeFocusedWindow());
-            }
-            /**
-             * The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight
-             * checks that native window is focused while appropriate WINDOW_GAINED_FOCUS has not yet
-             * been processed - it is in EventQueue. Thus, SNFH allows native request and stores request record
-             * in requests list - and it breaks our requests sequence as first record on WGF should be the last focus
-             * owner which had focus before WLF. So, we should not add request record for such requests
-             * but store this component in mostRecent - and return true as before for compatibility.
-             */
-            Container parent = (target instanceof Container) ? ((Container)target) : (target.getParent());
-            // Search for parent window
-            while (parent != null && !(parent instanceof Window)) {
-                parent = getParent_NoClientCode(parent);
-            }
-            if (parent != null) {
-                Window parentWindow = (Window)parent;
-                // and check that it is focused
-                if (focusLog.isLoggable(Level.FINER)) {
-                    focusLog.log(Level.FINER, "Parent window " + parentWindow);
-                }
-                if (!parentWindow.isFocused() && getNativeFocusedWindow() == parentWindow) {
-                    // if it is not - skip requesting focus on Solaris
-                    // but return true for compatibility.
-                    return true;
-                } else if (getNativeFocusedWindow() != parentWindow) {
-                    WindowPeer wpeer = (WindowPeer)parentWindow.getPeer();
-                    boolean res = wpeer.requestWindowFocus();
-                    if (focusLog.isLoggable(Level.FINER)) {
-                        focusLog.log(Level.FINER, "Requested window focus: " + res);
-                    }
-                    // If parent window can be made focused and has been made focused(synchronously)
-                    // then we can proceed with children, otherwise we retreat.
-                    if (!(res && parentWindow.isFocused())) {
-                        focusLog.finer("Waiting for asynchronous processing of window focus request");
-                        KeyboardFocusManagerPeerImpl.removeLastFocusRequest(target);
-                        return false;
-                    }
-                }
-            }
-            return _requestFocus(lightweightChild, temporary, focusedWindowChangeAllowed, time, cause);
-        }
-    }
-
-    native boolean _requestFocus
-        (Component lightweightChild, boolean temporary,
-         boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause);
-
-    static native Window getNativeFocusedWindow();
-
-    /*
-     * Post an event to the event queue.
-     */
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    void postEvent(AWTEvent event) {
-        MToolkit.postEvent(MToolkit.targetToAppContext(target), event);
-    }
-
-    /* Callbacks for window-system events to the frame
-     *
-     * NOTE: This method may be called by privileged threads.
-     *       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-     */
-    void handleExpose(int x, int y, int w, int h) {
-        if ( !ComponentAccessor.getIgnoreRepaint(target) ) {
-            postEvent(new PaintEvent(target, PaintEvent.PAINT,
-                                     new Rectangle(x, y, w, h)));
-        }
-    }
-
-    /* Callbacks for window-system events to the frame
-     *
-     * NOTE: This method may be called by privileged threads.
-     *       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-     */
-    void handleRepaint(int x, int y, int w, int h) {
-        if ( !ComponentAccessor.getIgnoreRepaint(target) ) {
-            postEvent(new PaintEvent(target, PaintEvent.UPDATE,
-                                     new Rectangle(x, y, w, h)));
-        }
-    }
-
-    /* Return the component's z-order position relative to
-     * other peer'd siblings (don't count lightweight siblings
-     * or siblings who don't yet have valid peers).
-     *
-     * NOTE: This method may be called by privileged threads.
-     *       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-     */
-    public int getZOrderPosition_NoClientCode() {
-        // SECURITY: use _NoClientCode() methods, because we may
-        //           be running on a privileged thread
-        Container p = getParent_NoClientCode(target);
-        if (p != null) {
-            // SECURITY: use _NoClientCode() methods, because we may
-            //           be running on a privileged thread
-            Component children[] = getComponents_NoClientCode(p);
-            int i;
-            int index = 0;
-            for (i = 0; i < children.length; i++) {
-                if (children[i] == target) {
-                    return index;
-                } else {
-                    Object cpeer = MToolkit.targetToPeer(children[i]);
-                    if (cpeer != null &&
-                        !(cpeer instanceof java.awt.peer.LightweightPeer)) {
-                        index++;
-                    }
-                }
-            }
-        }
-        return -1;
-    }
-
-    /*
-     * drawXXX() methods are used to print the native components by
-     * rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate color
-     * information.
-     */
-    void draw3DOval(Graphics g, Color bg,
-                    int x, int y, int w, int h, boolean raised) {
-        Color c = g.getColor();
-        Color shadow = bg.darker();
-        Color highlight = bg.brighter();
-
-        g.setColor(raised ? highlight : shadow);
-        g.drawArc(x, y, w, h, 45, 180);
-        g.setColor(raised ? shadow : highlight);
-        g.drawArc(x, y, w, h, 225, 180);
-        g.setColor(c);
-    }
-    void draw3DRect(Graphics g, Color bg,
-                    int x, int y, int width, int height,
-                    boolean raised) {
-        Color c = g.getColor();
-        Color shadow = bg.darker();
-        Color highlight = bg.brighter();
-
-        g.setColor(raised ? highlight : shadow);
-        g.drawLine(x, y, x, y + height);
-        g.drawLine(x + 1, y, x + width - 1, y);
-        g.setColor(raised ? shadow : highlight);
-        g.drawLine(x + 1, y + height, x + width, y + height);
-        g.drawLine(x + width, y, x + width, y + height - 1);
-        g.setColor(c);
-    }
-    void drawScrollbar(Graphics g, Color bg, int thickness, int length,
-                       int min, int max, int val, int vis, boolean horizontal) {
-        Color c = g.getColor();
-        double f = (double)(length - 2*(thickness-1)) / Math.max(1, ((max - min) + vis));
-        int v1 = thickness + (int)(f * (val - min));
-        int v2 = (int)(f * vis);
-        int w2 = thickness-4;
-        int tpts_x[] = new int[3];
-        int tpts_y[] = new int[3];
-
-        if (length < 3*w2 ) {
-            v1 = v2 = 0;
-            if (length < 2*w2 + 2) {
-                w2 = (length-2)/2;
-            }
-        } else  if (v2 < 7) {
-            // enforce a minimum handle size
-            v1 = Math.max(0, v1 - ((7 - v2)>>1));
-            v2 = 7;
-        }
-
-        int ctr   = thickness/2;
-        int sbmin = ctr - w2/2;
-        int sbmax = ctr + w2/2;
-
-        // paint the background slightly darker
-        {
-            Color d = new Color((int) (bg.getRed()   * 0.85),
-                                (int) (bg.getGreen() * 0.85),
-                                (int) (bg.getBlue()  * 0.85));
-
-            g.setColor(d);
-            if (horizontal) {
-                g.fillRect(0, 0, length, thickness);
-            } else {
-                g.fillRect(0, 0, thickness, length);
-            }
-        }
-
-        // paint the thumb and arrows in the normal background color
-        g.setColor(bg);
-        if (v1 > 0) {
-            if (horizontal) {
-                g.fillRect(v1, 3, v2, thickness-3);
-            } else {
-                g.fillRect(3, v1, thickness-3, v2);
-            }
-        }
-
-        tpts_x[0] = ctr;        tpts_y[0] = 2;
-        tpts_x[1] = sbmin;      tpts_y[1] = w2;
-        tpts_x[2] = sbmax;      tpts_y[2] = w2;
-        if (horizontal) {
-            g.fillPolygon(tpts_y, tpts_x, 3);
-        } else {
-            g.fillPolygon(tpts_x, tpts_y, 3);
-        }
-
-        tpts_y[0] = length-2;
-        tpts_y[1] = length-w2;
-        tpts_y[2] = length-w2;
-        if (horizontal) {
-            g.fillPolygon(tpts_y, tpts_x, 3);
-        } else {
-            g.fillPolygon(tpts_x, tpts_y, 3);
-        }
-
-        Color highlight = bg.brighter();
-
-        // // // // draw the "highlighted" edges
-        g.setColor(highlight);
-
-        // outline & arrows
-        if (horizontal) {
-            g.drawLine(1, thickness, length - 1, thickness);
-            g.drawLine(length - 1, 1, length - 1, thickness);
-
-            // arrows
-            g.drawLine(1, ctr, w2, sbmin);
-            g.drawLine(length - w2, sbmin, length - w2, sbmax);
-            g.drawLine(length - w2, sbmin, length - 2, ctr);
-
-        } else {
-            g.drawLine(thickness, 1, thickness, length - 1);
-            g.drawLine(1, length - 1, thickness, length - 1);
-
-            // arrows
-            g.drawLine(ctr, 1, sbmin, w2);
-            g.drawLine(sbmin, length - w2, sbmax, length - w2);
-            g.drawLine(sbmin, length - w2, ctr, length - 2);
-        }
-
-        // thumb
-        if (v1 > 0) {
-            if (horizontal) {
-                g.drawLine(v1, 2, v1 + v2, 2);
-                g.drawLine(v1, 2, v1, thickness-3);
-            } else {
-                g.drawLine(2, v1, 2, v1 + v2);
-                g.drawLine(2, v1, thickness-3, v1);
-            }
-        }
-
-        Color shadow = bg.darker();
-
-        // // // // draw the "shadowed" edges
-        g.setColor(shadow);
-
-        // outline && arrows
-        if (horizontal) {
-            g.drawLine(0, 0, 0, thickness);
-            g.drawLine(0, 0, length - 1, 0);
-
-            // arrows
-            g.drawLine(w2, sbmin, w2, sbmax);
-            g.drawLine(w2, sbmax, 1, ctr);
-            g.drawLine(length-2, ctr, length-w2, sbmax);
-
-        } else {
-            g.drawLine(0, 0, thickness, 0);
-            g.drawLine(0, 0, 0, length - 1);
-
-            // arrows
-            g.drawLine(sbmin, w2, sbmax, w2);
-            g.drawLine(sbmax, w2, ctr, 1);
-            g.drawLine(ctr, length-2, sbmax, length-w2);
-        }
-
-        // thumb
-        if (v1 > 0) {
-            if (horizontal) {
-                g.drawLine(v1 + v2, 2, v1 + v2, thickness-2);
-                g.drawLine(v1, thickness-2, v1 + v2, thickness-2);
-            } else {
-                g.drawLine(2, v1 + v2, thickness-2, v1 + v2);
-                g.drawLine(thickness-2, v1, thickness-2, v1 + v2);
-            }
-        }
-        g.setColor(c);
-    }
-
-    public String toString() {
-        return getClass().getName() + "[" + target + "]";
-    }
-
-    /* New 1.1 API */
-    public void setVisible(boolean b) {
-        if (b) {
-            Dimension s = target.getSize();
-            oldWidth = s.width;
-            oldHeight = s.height;
-            pShow();
-        } else {
-            pHide();
-        }
-    }
-
-    /* New 1.1 API */
-    public void setEnabled(boolean b) {
-        if (b) {
-            pEnable();
-        } else {
-            pDisable();
-        }
-    }
-
-    /* New 1.1 API */
-    public Point getLocationOnScreen() {
-        synchronized (target.getTreeLock()) {
-            Component comp = target;
-            while (comp != null && !(comp instanceof Window)) {
-                comp = getParent_NoClientCode(comp);
-            }
-
-            // applets, embedded, etc - translate directly
-            if (comp == null || comp instanceof sun.awt.EmbeddedFrame) {
-                return pGetLocationOnScreen();
-            }
-
-            MWindowPeer wpeer = (MWindowPeer)(MToolkit.targetToPeer(comp));
-            if (wpeer == null) {
-                return pGetLocationOnScreen();
-            }
-            return pGetLocationOnScreen2((Window)comp, wpeer);
-        }
-    }
-
-    public int serialNum = 0;
-
-    /* Returns the native paint should be posted after setting new size
-     */
-    public boolean checkNativePaintOnSetBounds(int width, int height) {
-        return (width != oldWidth) || (height != oldHeight);
-    }
-
-    void setBounds(int x, int y, int width, int height) {
-        setBounds(x, y, width, height, SET_BOUNDS);
-    }
-
-    /* New 1.1 API */
-    public void setBounds(int x, int y, int width, int height, int op) {
-        if (disposed) return;
-
-        Container parent = getParent_NoClientCode(target);
-
-        // Should set paintPending before reshape to prevent
-        // thread race between PaintEvent and setBounds
-        // This part of the 4267393 fix proved to be unstable under solaris,
-        // dissabled due to regressions 4418155, 4486762, 4490079
-        paintPending = false; //checkNativePaintOnSetBounds(width, height);
-
-        // Note: it would be ideal to NOT execute this if it's
-        // merely a Move which is occurring.
-        if (parent != null && parent instanceof ScrollPane) {
-            MScrollPanePeer speer = (MScrollPanePeer)parent.getPeer();
-            if (!speer.ignore) {
-                pReshape(x, y, width, height);
-                speer.childResized(width, height);
-            }
-        } else {
-            pReshape(x, y, width, height);
-        }
-
-        if ((width != oldWidth) || (height != oldHeight)) {
-            SurfaceData oldData = surfaceData;
-            if (oldData != null) {
-                surfaceData = graphicsConfig.createSurfaceData(this);
-                oldData.invalidate();
-            }
-            oldWidth = width;
-            oldHeight = height;
-        }
-        validateSurface(width, height);
-        serialNum++;
-    }
-
-    void validateSurface(int width, int height) {
-        SunToolkit.awtLock();
-        try {
-            if (!disposed && (width != oldWidth || height != oldHeight)) {
-                SurfaceData oldData = surfaceData;
-                if (oldData != null) {
-                    surfaceData = graphicsConfig.createSurfaceData(this);
-                    oldData.invalidate();
-                }
-                oldWidth = width;
-                oldHeight = height;
-            }
-        } finally {
-            SunToolkit.awtUnlock();
-        }
-    }
-
-    public void beginValidate() {
-    }
-
-    native void restoreFocus();
-
-    public void endValidate() {
-        restoreFocus();
-    }
-
-    public void beginLayout() {
-        // Skip all painting till endLayout
-        isLayouting = true;
-    }
-
-    public void endLayout() {
-        if (!paintPending && !paintArea.isEmpty() &&
-            !((Component)target).getIgnoreRepaint()) {
-            // if not waiting for native painting repaint damaged area
-            postEvent(new PaintEvent((Component)target, PaintEvent.PAINT,
-                                     new Rectangle()));
-        }
-        isLayouting = false;
-    }
-
-    /**
-     * DEPRECATED:  Replaced by setVisible(boolean).
-     */
-    public void show() {
-        setVisible(true);
-    }
-
-    /**
-     * DEPRECATED:  Replaced by setVisible(boolean).
-     */
-    public void hide() {
-        setVisible(false);
-    }
-
-    /**
-     * DEPRECATED:  Replaced by setEnabled(boolean).
-     */
-    public void enable() {
-        setEnabled(true);
-    }
-
-    /**
-     * DEPRECATED:  Replaced by setEnabled(boolean).
-     */
-    public void disable() {
-        setEnabled(false);
-    }
-
-    /**
-     * DEPRECATED:  Replaced by setBounds(int, int, int, int).
-     */
-    public void reshape(int x, int y, int width, int height) {
-        setBounds(x, y, width, height);
-    }
-
-    /**
-     * DEPRECATED:  Replaced by getMinimumSize().
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED:  Replaced by getPreferredSize().
-     */
-    public Dimension preferredSize() {
-        return getPreferredSize();
-    }
-
-    /**
-     *
-     */
-
-    public void addDropTarget(DropTarget dt) {
-        if (MToolkit.useMotifDnD()) {
-            addNativeDropTarget(dt);
-        } else {
-            Component comp = target;
-            while(!(comp == null || comp instanceof java.awt.Window)) {
-                comp = getParent_NoClientCode(comp);
-            }
-
-            if (comp instanceof Window) {
-                MWindowPeer wpeer = (MWindowPeer)(comp.getPeer());
-                if (wpeer != null) {
-                    wpeer.addDropTarget();
-                }
-            }
-        }
-    }
-
-    /**
-     *
-     */
-
-    public void removeDropTarget(DropTarget dt) {
-        if (MToolkit.useMotifDnD()) {
-            removeNativeDropTarget(dt);
-        } else {
-            Component comp = target;
-            while(!(comp == null || comp instanceof java.awt.Window)) {
-                comp = getParent_NoClientCode(comp);
-            }
-
-            if (comp instanceof Window) {
-                MWindowPeer wpeer = (MWindowPeer)(comp.getPeer());
-                if (wpeer != null) {
-                    wpeer.removeDropTarget();
-                }
-            }
-        }
-    }
-
-    public void notifyTextComponentChange(boolean add){
-        Container parent = getParent_NoClientCode(target);
-        while(!(parent == null ||
-                parent instanceof java.awt.Frame ||
-                parent instanceof java.awt.Dialog)) {
-            parent = getParent_NoClientCode(parent);
-        }
-
-        if (parent instanceof java.awt.Frame ||
-            parent instanceof java.awt.Dialog) {
-            if (add)
-                ((MInputMethodControl)parent.getPeer()).addTextComponent((MComponentPeer)this);
-            else
-                ((MInputMethodControl)parent.getPeer()).removeTextComponent((MComponentPeer)this);
-        }
-    }
-
-    native void addNativeDropTarget(DropTarget dt);
-
-    native void removeNativeDropTarget(DropTarget dt);
-
-    public GraphicsConfiguration getGraphicsConfiguration() {
-        GraphicsConfiguration ret = graphicsConfig;
-        if (ret == null) {
-            ret = target.getGraphicsConfiguration();
-        }
-        return ret;
-    }
-
-    // Returns true if we are inside begin/endLayout and
-    // are waiting for native painting
-    public boolean isPaintPending() {
-        return paintPending && isLayouting;
-    }
-
-    public boolean handlesWheelScrolling() {
-        return false;
-    }
-
-    /**
-     * The following multibuffering-related methods delegate to our
-     * associated GraphicsConfig (X11 or GLX) to handle the appropriate
-     * native windowing system specific actions.
-     */
-
-    private native long getWindow(long pData);
-
-    public long getContentWindow() {
-        return getWindow(pData);
-    }
-
-    public void createBuffers(int numBuffers, BufferCapabilities caps)
-      throws AWTException
-    {
-        backBuffer = graphicsConfig.createBackBuffer(this, numBuffers, caps);
-        xBackBuffer = graphicsConfig.createBackBufferImage(target,
-                                                           backBuffer);
-    }
-
-    public void flip(BufferCapabilities.FlipContents flipAction) {
-        if (backBuffer == 0) {
-            throw new IllegalStateException("Buffers have not been created");
-        }
-        graphicsConfig.flip(this, target, xBackBuffer, flipAction);
-    }
-
-    public Image getBackBuffer() {
-        if (backBuffer == 0) {
-            throw new IllegalStateException("Buffers have not been created");
-        }
-        return xBackBuffer;
-    }
-
-    public void destroyBuffers() {
-        graphicsConfig.destroyBackBuffer(backBuffer);
-        backBuffer = 0;
-        xBackBuffer = null;
-    }
-
-    /**
-     * @see java.awt.peer.ComponentPeer#isReparentSupported
-     */
-    public boolean isReparentSupported() {
-        return false;
-    }
-
-    /**
-     * @see java.awt.peer.ComponentPeer#reparent
-     */
-    public void reparent(ContainerPeer newNativeParent) {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * Applies the shape to the native component window.
-     * @since 1.7
-     */
-    public void applyShape(Region shape) {
-    }
-
-}
--- a/src/solaris/classes/sun/awt/motif/MCustomCursor.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- * Copyright 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.
- */
-
-package sun.awt.motif;
-
-import sun.awt.X11CustomCursor;
-import sun.awt.CustomCursor;
-import java.awt.*;
-import java.awt.image.*;
-import sun.awt.image.ImageRepresentation;
-
-public class MCustomCursor extends X11CustomCursor {
-
-    public MCustomCursor(Image cursor, Point hotSpot, String name)
-            throws IndexOutOfBoundsException {
-        super(cursor, hotSpot, name);
-    }
-    /**
-     * Returns the supported cursor size
-     */
-    public static Dimension getBestCursorSize(
-        int preferredWidth, int preferredHeight) {
-
-        // Fix for bug 4212593 The Toolkit.createCustomCursor does not
-        //                     check absence of the image of cursor
-        // We use XQueryBestCursor which accepts unsigned ints to obtain
-        // the largest cursor size that could be dislpayed
-        Dimension d = new Dimension(Math.abs(preferredWidth), Math.abs(preferredHeight));
-
-        queryBestCursor(d);
-        return d;
-    }
-
-    private static native void queryBestCursor(Dimension d);
-
-    protected native void createCursor(byte[] xorMask, byte[] andMask,
-                                     int width, int height,
-                                     int fcolor, int bcolor,
-                                     int xHotSpot, int yHotSpot);
-
-    static {
-        cacheInit();
-    }
-
-    private native static void cacheInit();
-}
--- a/src/solaris/classes/sun/awt/motif/MDataTransferer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,386 +0,0 @@
-/*
- * Copyright 2000-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.Image;
-
-import java.awt.datatransfer.DataFlavor;
-
-import java.awt.image.BufferedImage;
-import java.awt.image.ColorModel;
-import java.awt.image.WritableRaster;
-
-import java.io.InputStream;
-import java.io.IOException;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.imageio.ImageIO;
-import javax.imageio.ImageTypeSpecifier;
-import javax.imageio.ImageWriter;
-import javax.imageio.spi.ImageWriterSpi;
-
-import sun.awt.datatransfer.DataTransferer;
-import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
-
-/**
- * Platform-specific support for the data transfer subsystem.
- *
- * @author Roger Brinkley
- * @author Danila Sinopalnikov
- *
- * @since 1.3.1
- */
-public class MDataTransferer extends DataTransferer {
-    private static final long FILE_NAME_ATOM;
-    private static final long DT_NET_FILE_ATOM;
-    private static final long PNG_ATOM;
-    private static final long JFIF_ATOM;
-
-    static {
-        FILE_NAME_ATOM = getAtomForTarget("FILE_NAME");
-        DT_NET_FILE_ATOM = getAtomForTarget("_DT_NETFILE");
-        PNG_ATOM = getAtomForTarget("PNG");
-        JFIF_ATOM = getAtomForTarget("JFIF");
-    }
-
-    /**
-     * Singleton constructor
-     */
-    private MDataTransferer() {
-    }
-
-    private static MDataTransferer transferer;
-
-    static MDataTransferer getInstanceImpl() {
-        if (transferer == null) {
-            synchronized (MDataTransferer.class) {
-                if (transferer == null) {
-                    transferer = new MDataTransferer();
-                }
-            }
-        }
-        return transferer;
-    }
-
-    public String getDefaultUnicodeEncoding() {
-        return "iso-10646-ucs-2";
-    }
-
-    public boolean isLocaleDependentTextFormat(long format) {
-        return false;
-    }
-
-    public boolean isTextFormat(long format) {
-        return super.isTextFormat(format)
-            || isMimeFormat(format, "text");
-    }
-
-    protected String getCharsetForTextFormat(Long lFormat) {
-        long format = lFormat.longValue();
-        if (isMimeFormat(format, "text")) {
-            String nat = getNativeForFormat(format);
-            DataFlavor df = new DataFlavor(nat, null);
-            // Ignore the charset parameter of the MIME type if the subtype
-            // doesn't support charset.
-            if (!DataTransferer.doesSubtypeSupportCharset(df)) {
-                return null;
-            }
-            String charset = df.getParameter("charset");
-            if (charset != null) {
-                return charset;
-            }
-        }
-        return super.getCharsetForTextFormat(lFormat);
-    }
-
-    public boolean isFileFormat(long format) {
-        return format == FILE_NAME_ATOM || format == DT_NET_FILE_ATOM;
-    }
-
-    public boolean isImageFormat(long format) {
-        return format == PNG_ATOM || format == JFIF_ATOM
-            || isMimeFormat(format, "image");
-    }
-
-    protected Long getFormatForNativeAsLong(String str) {
-        // Just get the atom. If it has already been retrived
-        // once, we'll get a copy so this should be very fast.
-        long atom = getAtomForTarget(str);
-        if (atom <= 0) {
-            throw new InternalError("Cannot register a target");
-        }
-        return Long.valueOf(atom);
-    }
-
-    protected String getNativeForFormat(long format) {
-        return getTargetNameForAtom(format);
-    }
-
-    public ToolkitThreadBlockedHandler getToolkitThreadBlockedHandler() {
-        return MToolkitThreadBlockedHandler.getToolkitThreadBlockedHandler();
-    }
-
-    /**
-     * Gets an atom for a format name.
-     */
-    static native long getAtomForTarget(String name);
-
-    /**
-     * Gets an format name for a given format (atom)
-     */
-    private static native String getTargetNameForAtom(long atom);
-
-    protected byte[] imageToPlatformBytes(Image image, long format)
-      throws IOException {
-        String mimeType = null;
-        if (format == PNG_ATOM) {
-            mimeType = "image/png";
-        } else if (format == JFIF_ATOM) {
-            mimeType = "image/jpeg";
-        } else {
-            // Check if an image MIME format.
-            try {
-                String nat = getNativeForFormat(format);
-                DataFlavor df = new DataFlavor(nat);
-                String primaryType = df.getPrimaryType();
-                if ("image".equals(primaryType)) {
-                    mimeType = df.getPrimaryType() + "/" + df.getSubType();
-                }
-            } catch (Exception e) {
-                // Not an image MIME format.
-            }
-        }
-        if (mimeType != null) {
-            return imageToStandardBytes(image, mimeType);
-        } else {
-            String nativeFormat = getNativeForFormat(format);
-            throw new IOException("Translation to " + nativeFormat +
-                                  " is not supported.");
-        }
-    }
-
-    /**
-     * Translates either a byte array or an input stream which contain
-     * platform-specific image data in the given format into an Image.
-     */
-    protected Image platformImageBytesOrStreamToImage(InputStream inputStream,
-                                                      byte[] bytes,
-                                                      long format)
-      throws IOException {
-        String mimeType = null;
-        if (format == PNG_ATOM) {
-            mimeType = "image/png";
-        } else if (format == JFIF_ATOM) {
-            mimeType = "image/jpeg";
-        } else {
-            // Check if an image MIME format.
-            try {
-                String nat = getNativeForFormat(format);
-                DataFlavor df = new DataFlavor(nat);
-                String primaryType = df.getPrimaryType();
-                if ("image".equals(primaryType)) {
-                    mimeType = df.getPrimaryType() + "/" + df.getSubType();
-                }
-            } catch (Exception e) {
-                // Not an image MIME format.
-            }
-        }
-        if (mimeType != null) {
-            return standardImageBytesOrStreamToImage(inputStream, bytes, mimeType);
-        } else {
-            String nativeFormat = getNativeForFormat(format);
-            throw new IOException("Translation from " + nativeFormat +
-                                  " is not supported.");
-        }
-    }
-
-    /**
-     * Returns true if and only if the name of the specified format Atom
-     * constitutes a valid MIME type with the specified primary type.
-     */
-    private boolean isMimeFormat(long format, String primaryType) {
-        String nat = getNativeForFormat(format);
-
-        if (nat == null) {
-            return false;
-        }
-
-        try {
-            DataFlavor df = new DataFlavor(nat);
-            if (primaryType.equals(df.getPrimaryType())) {
-                return true;
-            }
-        } catch (Exception e) {
-            // Not a MIME format.
-        }
-
-        return false;
-    }
-
-    /*
-     * The XDnD protocol prescribes that the Atoms used as targets for data
-     * transfer should have string names that represent the corresponding MIME
-     * types.
-     * To meet this requirement we check if the passed native format constitutes
-     * a valid MIME and return a list of flavors to which the data in this MIME
-     * type can be translated by the Data Transfer subsystem.
-     */
-    public List getPlatformMappingsForNative(String nat) {
-        List flavors = new ArrayList();
-
-        if (nat == null) {
-            return flavors;
-        }
-
-        DataFlavor df = null;
-
-        try {
-            df = new DataFlavor(nat);
-        } catch (Exception e) {
-            // The string doesn't constitute a valid MIME type.
-            return flavors;
-        }
-
-        Object value = df;
-        final String primaryType = df.getPrimaryType();
-        final String baseType = primaryType + "/" + df.getSubType();
-
-        // For text formats we map natives to MIME strings instead of data
-        // flavors to enable dynamic text native-to-flavor mapping generation.
-        // See SystemFlavorMap.getFlavorsForNative() for details.
-        if ("text".equals(primaryType)) {
-            value = primaryType + "/" + df.getSubType();
-        } else if ("image".equals(primaryType)) {
-            Iterator readers = ImageIO.getImageReadersByMIMEType(baseType);
-            if (readers.hasNext()) {
-                flavors.add(DataFlavor.imageFlavor);
-            }
-        }
-
-        flavors.add(value);
-
-        return flavors;
-    }
-
-    private static ImageTypeSpecifier defaultSpecifier = null;
-
-    private ImageTypeSpecifier getDefaultImageTypeSpecifier() {
-        if (defaultSpecifier == null) {
-            ColorModel model = ColorModel.getRGBdefault();
-            WritableRaster raster =
-                model.createCompatibleWritableRaster(10, 10);
-
-            BufferedImage bufferedImage =
-                new BufferedImage(model, raster, model.isAlphaPremultiplied(),
-                                  null);
-
-            defaultSpecifier = new ImageTypeSpecifier(bufferedImage);
-        }
-
-        return defaultSpecifier;
-    }
-
-    /*
-     * The XDnD protocol prescribes that the Atoms used as targets for data
-     * transfer should have string names that represent the corresponding MIME
-     * types.
-     * To meet this requirement we return a list of formats that represent
-     * MIME types to which the data in this flavor can be translated by the Data
-     * Transfer subsystem.
-     */
-    public List getPlatformMappingsForFlavor(DataFlavor df) {
-        List natives = new ArrayList(1);
-
-        if (df == null) {
-            return natives;
-        }
-
-        String charset = df.getParameter("charset");
-        String baseType = df.getPrimaryType() + "/" + df.getSubType();
-        String mimeType = baseType;
-
-        if (charset != null && DataTransferer.isFlavorCharsetTextType(df)) {
-            mimeType += ";charset=" + charset;
-        }
-
-        // Add a mapping to the MIME native whenever the representation class
-        // doesn't require translation.
-        if (df.getRepresentationClass() != null &&
-            (df.isRepresentationClassInputStream() ||
-             df.isRepresentationClassByteBuffer() ||
-             byteArrayClass.equals(df.getRepresentationClass()))) {
-            natives.add(mimeType);
-        }
-
-        if (DataFlavor.imageFlavor.equals(df)) {
-            String[] mimeTypes = ImageIO.getWriterMIMETypes();
-            if (mimeTypes != null) {
-                for (int i = 0; i < mimeTypes.length; i++) {
-                    Iterator writers =
-                        ImageIO.getImageWritersByMIMEType(mimeTypes[i]);
-
-                    while (writers.hasNext()) {
-                        ImageWriter imageWriter = (ImageWriter)writers.next();
-                        ImageWriterSpi writerSpi =
-                            imageWriter.getOriginatingProvider();
-
-                        if (writerSpi != null &&
-                            writerSpi.canEncodeImage(getDefaultImageTypeSpecifier())) {
-                            natives.add(mimeTypes[i]);
-                            break;
-                        }
-                    }
-                }
-            }
-        } else if (DataTransferer.isFlavorCharsetTextType(df)) {
-            final Iterator iter = DataTransferer.standardEncodings();
-
-            // stringFlavor is semantically equivalent to the standard
-            // "text/plain" MIME type.
-            if (DataFlavor.stringFlavor.equals(df)) {
-                baseType = "text/plain";
-            }
-
-            while (iter.hasNext()) {
-                String encoding = (String)iter.next();
-                if (!encoding.equals(charset)) {
-                    natives.add(baseType + ";charset=" + encoding);
-                }
-            }
-
-            // Add a MIME format without specified charset.
-            if (!natives.contains(baseType)) {
-                natives.add(baseType);
-            }
-        }
-
-        return natives;
-    }
-    protected native String[] dragQueryFile(byte[] bytes);
-}
--- a/src/solaris/classes/sun/awt/motif/MDialogPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Copyright 1995-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 sun.awt.motif;
-
-import java.util.Vector;
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.*;
-import sun.awt.motif.MInputMethodControl;
-import sun.awt.im.*;
-
-class MDialogPeer extends MWindowPeer implements DialogPeer, MInputMethodControl {
-
-    static Vector allDialogs = new Vector();
-
-    MDialogPeer(Dialog target) {
-
-        /* create MWindowPeer object */
-        super();
-
-        winAttr.nativeDecor = !target.isUndecorated();
-        winAttr.initialFocus = true;
-        winAttr.isResizable =  target.isResizable();
-        winAttr.initialState = MWindowAttributes.NORMAL;
-        winAttr.title = target.getTitle();
-        winAttr.icon = null;
-        if (winAttr.nativeDecor) {
-            winAttr.decorations = winAttr.AWT_DECOR_ALL |
-                                  winAttr.AWT_DECOR_MINIMIZE |
-                                  winAttr.AWT_DECOR_MAXIMIZE;
-        } else {
-            winAttr.decorations = winAttr.AWT_DECOR_NONE;
-        }
-        /* create and init native component */
-        init(target);
-        allDialogs.addElement(this);
-    }
-
-    public void setTitle(String title) {
-        pSetTitle(title);
-    }
-
-    protected void disposeImpl() {
-        allDialogs.removeElement(this);
-        super.disposeImpl();
-    }
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleMoved(int x, int y) {
-        postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED));
-    }
-
-    public void show() {
-        pShowModal( ((Dialog)target).isModal() );
-        updateAlwaysOnTop(alwaysOnTop);
-    }
-
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleIconify() {
-// Note: These routines are necessary for Coaleseing of native implementations
-//       As Dialogs do not currently send Iconify/DeIconify messages but
-//       Windows/Frames do.  If this should be made consistent...to do so
-//       uncomment the postEvent.
-//       postEvent(new WindowEvent((Window)target, WindowEvent.WINDOW_ICONIFIED));
-    }
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleDeiconify() {
-// Note: These routines are necessary for Coaleseing of native implementations
-//       As Dialogs do not currently send Iconify/DeIconify messages but
-//       Windows/Frames do. If this should be made consistent...to do so
-//       uncomment the postEvent.
-//       postEvent(new WindowEvent((Window)target, WindowEvent.WINDOW_DEICONIFIED));
-    }
-
-    public void blockWindows(java.util.List<Window> toBlock) {
-        // do nothing
-    }
-
-    @Override
-    final boolean isTargetUndecorated() {
-        return ((Dialog)target).isUndecorated();
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MDragSourceContextPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
- * Copyright 1997-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.Component;
-import java.awt.Cursor;
-import java.awt.Image;
-import java.awt.Point;
-
-import java.awt.datatransfer.Transferable;
-
-import java.awt.dnd.DragSourceContext;
-import java.awt.dnd.DragGestureEvent;
-import java.awt.dnd.InvalidDnDOperationException;
-
-import java.awt.event.InputEvent;
-
-import java.awt.peer.ComponentPeer;
-import java.awt.peer.LightweightPeer;
-
-import java.util.Map;
-import sun.awt.SunToolkit;
-import sun.awt.dnd.SunDragSourceContextPeer;
-
-/**
- * <p>
- * TBC
- * </p>
- *
- * @since JDK1.2
- *
- */
-
-final class MDragSourceContextPeer extends SunDragSourceContextPeer {
-
-    private static final MDragSourceContextPeer theInstance =
-        new MDragSourceContextPeer(null);
-
-    /**
-     * construct a new MDragSourceContextPeer
-     */
-
-    private MDragSourceContextPeer(DragGestureEvent dge) {
-        super(dge);
-    }
-
-    static MDragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException {
-        theInstance.setTrigger(dge);
-        return theInstance;
-    }
-
-    protected void startDrag(Transferable transferable,
-                             long[] formats, Map formatMap) {
-        try {
-            long nativeCtxtLocal = startDrag(getTrigger().getComponent(),
-                                             transferable,
-                                             getTrigger().getTriggerEvent(),
-                                             getCursor(),
-                                             getCursor() == null ? 0 : getCursor().getType(),
-                                             getDragSourceContext().getSourceActions(),
-                                             formats,
-                                             formatMap);
-            setNativeContext(nativeCtxtLocal);
-        } catch (Exception e) {
-            throw new InvalidDnDOperationException("failed to create native peer: " + e);
-        }
-
-        if (getNativeContext() == 0) {
-            throw new InvalidDnDOperationException("failed to create native peer");
-        }
-
-        MDropTargetContextPeer.setCurrentJVMLocalSourceTransferable(transferable);
-    }
-
-    /**
-     * downcall into native code
-     */
-
-    private native long startDrag(Component component,
-                                  Transferable transferable,
-                                  InputEvent nativeTrigger,
-                                  Cursor c, int ctype, int actions,
-                                  long[] formats, Map formatMap);
-
-    /**
-     * set cursor
-     */
-
-    public void setCursor(Cursor c) throws InvalidDnDOperationException {
-        SunToolkit.awtLock();
-        super.setCursor(c);
-        SunToolkit.awtUnlock();
-    }
-
-    protected native void setNativeCursor(long nativeCtxt, Cursor c, int cType);
-
-}
--- a/src/solaris/classes/sun/awt/motif/MDropTargetContextPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright 1997-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.UnsupportedFlavorException;
-
-import java.awt.dnd.DnDConstants;
-import java.awt.dnd.InvalidDnDOperationException;
-
-import java.io.InputStream;
-
-import java.util.Map;
-
-import java.io.IOException;
-import sun.awt.dnd.SunDropTargetContextPeer;
-import sun.awt.SunToolkit;
-
-/**
- * <p>
- * The MDropTargetContextPeer class is the class responsible for handling
- * the interaction between the Motif DnD system and Java.
- * </p>
- *
- * @since JDK1.2
- *
- */
-
-final class MDropTargetContextPeer extends SunDropTargetContextPeer {
-
-    private long              nativeDropTransfer;
-
-    long                      nativeDataAvailable = 0;
-    Object                    nativeData          = null;
-
-    /**
-     * create the peer
-     */
-
-    static MDropTargetContextPeer createMDropTargetContextPeer() {
-        return new MDropTargetContextPeer();
-    }
-
-    /**
-     * create the peer
-     */
-
-    private MDropTargetContextPeer() {
-        super();
-    }
-
-    protected Object getNativeData(long format) {
-        SunToolkit.awtLock();
-        if (nativeDropTransfer == 0) {
-            nativeDropTransfer = startTransfer(getNativeDragContext(),
-                                               format);
-        } else {
-            addTransfer (nativeDropTransfer, format);
-        }
-
-        for (nativeDataAvailable = 0;
-             format != nativeDataAvailable;) {
-            try {
-                SunToolkit.awtLockWait();
-            } catch (Throwable e) {
-                e.printStackTrace();
-            }
-        }
-        SunToolkit.awtUnlock();
-
-        return nativeData;
-    }
-
-    /**
-     * signal drop complete
-     */
-
-    protected void doDropDone(boolean success, int dropAction,
-                              boolean isLocal) {
-        dropDone(getNativeDragContext(), nativeDropTransfer, isLocal,
-                 success, dropAction);
-    }
-
-    /**
-     * notify transfer complete
-     */
-
-    private void newData(long format, String type, byte[] data) {
-        nativeDataAvailable = format;
-        nativeData          = data;
-
-        SunToolkit.awtLockNotifyAll();
-    }
-
-    /**
-     * notify transfer failed
-     */
-
-    private void transferFailed(long format) {
-        nativeDataAvailable = format;
-        nativeData          = null;
-
-        SunToolkit.awtLockNotifyAll();
-    }
-
-    /**
-     * schedule a native DnD transfer
-     */
-
-    private native long startTransfer(long nativeDragContext, long format);
-
-    /**
-     * schedule a native DnD data transfer
-     */
-
-    private native void addTransfer(long nativeDropTransfer, long format);
-
-    /**
-     * signal that drop is completed
-     */
-
-    private native void dropDone(long nativeDragContext, long nativeDropTransfer,
-                                 boolean localTx, boolean success, int dropAction);
-}
--- a/src/solaris/classes/sun/awt/motif/MEmbedCanvasPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,584 +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.
- */
-
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.dnd.DropTarget;
-import java.awt.dnd.DropTargetListener;
-import java.awt.event.*;
-import java.awt.image.ColorModel;
-import java.awt.image.ImageObserver;
-import java.awt.image.ImageProducer;
-import java.awt.image.VolatileImage;
-import java.awt.peer.*;
-import sun.awt.*;
-import sun.awt.motif.X11FontMetrics;
-import java.lang.reflect.*;
-import java.util.logging.*;
-import java.util.*;
-
-// FIXME: Add X errors handling
-// FIXME: Add chaining of parameters to XEmbed-client if we are both(accelerators; XDND; focus already automatically)
-public class MEmbedCanvasPeer extends MCanvasPeer implements WindowFocusListener, KeyEventPostProcessor, ModalityListener, WindowIDProvider {
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.motif.xembed.MEmbedCanvasPeer");
-
-    final static int XEMBED_VERSION = 0,
-        XEMBED_MAPPED = (1 << 0);
-/* XEMBED messages */
-    final static int XEMBED_EMBEDDED_NOTIFY     =       0;
-    final static int XEMBED_WINDOW_ACTIVATE  =  1;
-    final static int XEMBED_WINDOW_DEACTIVATE =         2;
-    final static int XEMBED_REQUEST_FOCUS               =3;
-    final static int XEMBED_FOCUS_IN    =       4;
-    final static int XEMBED_FOCUS_OUT   =       5;
-    final static int XEMBED_FOCUS_NEXT  =       6;
-    final static int XEMBED_FOCUS_PREV  =       7;
-/* 8-9 were used for XEMBED_GRAB_KEY/XEMBED_UNGRAB_KEY */
-    final static int XEMBED_GRAB_KEY = 8;
-    final static int XEMBED_UNGRAB_KEY = 9;
-    final static int XEMBED_MODALITY_ON         =       10;
-    final static int XEMBED_MODALITY_OFF        =       11;
-    final static int XEMBED_REGISTER_ACCELERATOR =    12;
-    final static int XEMBED_UNREGISTER_ACCELERATOR=   13;
-    final static int XEMBED_ACTIVATE_ACCELERATOR  =   14;
-
-    final static int NON_STANDARD_XEMBED_GTK_GRAB_KEY = 108;
-    final static int NON_STANDARD_XEMBED_GTK_UNGRAB_KEY = 109;
-
-//     A detail code is required for XEMBED_FOCUS_IN. The following values are valid:
-/* Details for  XEMBED_FOCUS_IN: */
-    final static int XEMBED_FOCUS_CURRENT       =       0;
-    final static int XEMBED_FOCUS_FIRST         =       1;
-    final static int XEMBED_FOCUS_LAST  =       2;
-
-// Modifiers bits
-    final static int XEMBED_MODIFIER_SHIFT   = (1 << 0);
-    final static int XEMBED_MODIFIER_CONTROL = (1 << 1);
-    final static int XEMBED_MODIFIER_ALT     = (1 << 2);
-    final static int XEMBED_MODIFIER_SUPER   = (1 << 3);
-    final static int XEMBED_MODIFIER_HYPER   = (1 << 4);
-
-    boolean applicationActive; // Whether the application is active(has focus)
-    Map<Long, AWTKeyStroke> accelerators = new HashMap<Long, AWTKeyStroke>(); // Maps accelerator ID into AWTKeyStroke
-    Map<AWTKeyStroke, Long> accel_lookup = new HashMap<AWTKeyStroke, Long>(); // Maps AWTKeyStroke into accelerator ID
-    Set<GrabbedKey> grabbed_keys = new HashSet<GrabbedKey>(); // A set of keys grabbed by client
-    Object ACCEL_LOCK = accelerators; // Lock object for working with accelerators;
-    Object GRAB_LOCK = grabbed_keys; // Lock object for working with keys grabbed by client
-
-    MEmbedCanvasPeer() {}
-
-    MEmbedCanvasPeer(Component target) {
-        super(target);
-    }
-
-    void initialize() {
-        super.initialize();
-
-        installActivateListener();
-        installAcceleratorListener();
-        installModalityListener();
-
-        // XEmbed canvas should be non-traversable.
-        // FIXME: Probably should be removed and enforced setting of it by the users
-        target.setFocusTraversalKeysEnabled(false);
-
-        initXEmbedServer();
-    }
-
-    void installModalityListener() {
-        ((SunToolkit)Toolkit.getDefaultToolkit()).addModalityListener(this);
-    }
-
-    void deinstallModalityListener() {
-        ((SunToolkit)Toolkit.getDefaultToolkit()).removeModalityListener(this);
-    }
-
-    void installAcceleratorListener() {
-        KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventPostProcessor(this);
-    }
-
-    void deinstallAcceleratorListener() {
-        KeyboardFocusManager.getCurrentKeyboardFocusManager().removeKeyEventPostProcessor(this);
-    }
-
-    void installActivateListener() {
-        // FIXME: should watch for hierarchy changes
-        Window toplevel = getTopLevel(target);
-        if (toplevel != null) {
-            toplevel.addWindowFocusListener(this);
-            applicationActive = toplevel.isFocused();
-        }
-    }
-
-    void deinstallActivateListener() {
-        Window toplevel = getTopLevel(target);
-        if (toplevel != null) {
-            toplevel.removeWindowFocusListener(this);
-        }
-    }
-
-    native boolean isXEmbedActive();
-
-    boolean isApplicationActive() {
-        return applicationActive;
-    }
-
-    native void initDispatching();
-
-    native void endDispatching();
-
-    native void embedChild(long child);
-
-    native void childDestroyed();
-
-    public void handleEvent(AWTEvent e) {
-        super.handleEvent(e);
-        if (isXEmbedActive()) {
-            switch (e.getID()) {
-              case FocusEvent.FOCUS_GAINED:
-                  canvasFocusGained((FocusEvent)e);
-                  break;
-              case FocusEvent.FOCUS_LOST:
-                  canvasFocusLost((FocusEvent)e);
-                  break;
-              case KeyEvent.KEY_PRESSED:
-              case KeyEvent.KEY_RELEASED:
-                  if (!((InputEvent)e).isConsumed()) {
-                      forwardKeyEvent((KeyEvent)e);
-                  }
-                  break;
-            }
-        }
-    }
-
-    public Dimension getPreferredSize() {
-        if (isXEmbedActive()) {
-            Dimension dim = getEmbedPreferredSize();
-            if (dim == null) {
-                return super.getPreferredSize();
-            } else {
-                return dim;
-            }
-        } else {
-            return super.getPreferredSize();
-        }
-    }
-    native Dimension getEmbedPreferredSize();
-    public Dimension getMinimumSize() {
-        if (isXEmbedActive()) {
-            Dimension dim = getEmbedMinimumSize();
-            if (dim == null) {
-                return super.getMinimumSize();
-            } else {
-                return dim;
-            }
-        } else {
-            return super.getMinimumSize();
-        }
-    }
-    native Dimension getEmbedMinimumSize();
-    protected void disposeImpl() {
-        if (isXEmbedActive()) {
-            detachChild();
-        }
-        deinstallActivateListener();
-        deinstallModalityListener();
-        deinstallAcceleratorListener();
-
-        destroyXEmbedServer();
-        super.disposeImpl();
-    }
-
-    public boolean isFocusable() {
-        return true;
-    }
-
-    Window getTopLevel(Component comp) {
-        while (comp != null && !(comp instanceof Window)) {
-            comp = comp.getParent();
-        }
-        return (Window)comp;
-    }
-
-    native Rectangle getClientBounds();
-
-    void childResized() {
-        if (xembedLog.isLoggable(Level.FINER)) {
-            Rectangle bounds = getClientBounds();
-            xembedLog.finer("Child resized: " + bounds);
-            // It is not required to update embedder's size when client size changes
-            // However, since there is no any means to get client size it seems to be the
-            // only way to provide it. However, it contradicts with Java layout concept -
-            // so it is disabled for now.
-//             Rectangle my_bounds = getBounds();
-//             setBounds(my_bounds.x, my_bounds.y, bounds.width, bounds.height, SET_BOUNDS);
-        }
-        postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_RESIZED));
-    }
-
-    void focusNext() {
-        if (isXEmbedActive()) {
-            xembedLog.fine("Requesting focus for the next component after embedder");
-            postEvent(new InvocationEvent(target, new Runnable() {
-                    public void run() {
-                        KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent(target);
-                    }
-                }));
-        } else {
-            xembedLog.fine("Application is not active - denying focus next");
-        }
-    }
-
-    void focusPrev() {
-        if (isXEmbedActive()) {
-            xembedLog.fine("Requesting focus for the next component after embedder");
-            postEvent(new InvocationEvent(target, new Runnable() {
-                    public void run() {
-                        KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent(target);
-                    }
-                }));
-        } else {
-            xembedLog.fine("Application is not active - denying focus prev");
-        }
-    }
-
-    void requestXEmbedFocus() {
-        if (isXEmbedActive()) {
-            xembedLog.fine("Requesting focus for client");
-            postEvent(new InvocationEvent(target, new Runnable() {
-                    public void run() {
-                        target.requestFocusInWindow();
-                    }
-                }));
-        } else {
-            xembedLog.fine("Application is not active - denying request focus");
-        }
-    }
-
-    native void notifyChildEmbedded();
-
-    native void detachChild();
-
-    public void windowGainedFocus(WindowEvent e) {
-        applicationActive = true;
-        if (isXEmbedActive()) {
-            xembedLog.fine("Sending WINDOW_ACTIVATE");
-            sendMessage(XEMBED_WINDOW_ACTIVATE);
-        }
-    }
-
-    public void windowLostFocus(WindowEvent e) {
-        applicationActive = false;
-        if (isXEmbedActive()) {
-            xembedLog.fine("Sending WINDOW_DEACTIVATE");
-            sendMessage(XEMBED_WINDOW_DEACTIVATE);
-        }
-    }
-
-    void canvasFocusGained(FocusEvent e) {
-        if (isXEmbedActive()) {
-            xembedLog.fine("Forwarding FOCUS_GAINED");
-            int flavor = XEMBED_FOCUS_CURRENT;
-            if (e instanceof CausedFocusEvent) {
-                CausedFocusEvent ce = (CausedFocusEvent)e;
-                if (ce.getCause() == CausedFocusEvent.Cause.TRAVERSAL_FORWARD) {
-                    flavor = XEMBED_FOCUS_FIRST;
-                } else if (ce.getCause() == CausedFocusEvent.Cause.TRAVERSAL_BACKWARD) {
-                    flavor = XEMBED_FOCUS_LAST;
-                }
-            }
-            sendMessage(XEMBED_FOCUS_IN, flavor, 0, 0);
-        }
-    }
-
-    void canvasFocusLost(FocusEvent e) {
-        if (isXEmbedActive() && !e.isTemporary()) {
-            xembedLog.fine("Forwarding FOCUS_LOST");
-            Component opp = e.getOppositeComponent();
-            int num = 0;
-            try {
-                num = Integer.parseInt(opp.getName());
-            } catch (NumberFormatException nfe) {
-            }
-            sendMessage(XEMBED_FOCUS_OUT, num, 0, 0);
-        }
-    }
-
-    native void forwardKeyEvent(KeyEvent e);
-
-    void grabKey(final long keysym, final long modifiers) {
-        postEvent(new InvocationEvent(target, new Runnable() {
-                public void run() {
-                    GrabbedKey grab = new GrabbedKey(keysym, modifiers);
-                    if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Grabbing key: " + grab);
-                    synchronized(GRAB_LOCK) {
-                        grabbed_keys.add(grab);
-                    }
-                }
-            }));
-    }
-
-    void ungrabKey(final long keysym, final long modifiers) {
-        postEvent(new InvocationEvent(target, new Runnable() {
-                public void run() {
-                    GrabbedKey grab = new GrabbedKey(keysym, modifiers);
-                    if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("UnGrabbing key: " + grab);
-                    synchronized(GRAB_LOCK) {
-                        grabbed_keys.remove(grab);
-                    }
-                }
-            }));
-    }
-
-    void registerAccelerator(final long accel_id, final long keysym, final long modifiers) {
-        postEvent(new InvocationEvent(target, new Runnable() {
-                public void run() {
-                    AWTKeyStroke stroke = getKeyStrokeForKeySym(keysym, modifiers);
-                    if (stroke != null) {
-                        if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
-                        synchronized(ACCEL_LOCK) {
-                            accelerators.put(accel_id, stroke);
-                            accel_lookup.put(stroke, accel_id);
-                        }
-                    }
-                    // Propogate accelerators to the another embedder
-                    propogateRegisterAccelerator(stroke);
-                }
-            }));
-    }
-
-    void unregisterAccelerator(final long accel_id) {
-        postEvent(new InvocationEvent(target, new Runnable() {
-                public void run() {
-                    AWTKeyStroke stroke = null;
-                    synchronized(ACCEL_LOCK) {
-                        stroke = accelerators.get(accel_id);
-                        if (stroke != null) {
-                            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id);
-                            accelerators.remove(accel_id);
-                            accel_lookup.remove(stroke); // FIXME: How about several accelerators with the same stroke?
-                        }
-                    }
-                    // Propogate accelerators to the another embedder
-                    propogateUnRegisterAccelerator(stroke);
-                }
-            }));
-    }
-
-    void propogateRegisterAccelerator(AWTKeyStroke stroke) {
-        // Find the top-level and see if it is XEmbed client. If so, ask him to
-        // register the accelerator
-        MWindowPeer parent = getParentWindow();
-        if (parent != null && parent instanceof MEmbeddedFramePeer) {
-            MEmbeddedFramePeer embedded = (MEmbeddedFramePeer)parent;
-            embedded.registerAccelerator(stroke);
-        }
-    }
-
-    void propogateUnRegisterAccelerator(AWTKeyStroke stroke) {
-        // Find the top-level and see if it is XEmbed client. If so, ask him to
-        // register the accelerator
-        MWindowPeer parent = getParentWindow();
-        if (parent != null && parent instanceof MEmbeddedFramePeer) {
-            MEmbeddedFramePeer embedded = (MEmbeddedFramePeer)parent;
-            embedded.unregisterAccelerator(stroke);
-        }
-    }
-
-    public boolean postProcessKeyEvent(KeyEvent e) {
-        // Processing events only if we are in the focused window.
-        MWindowPeer parent = getParentWindow();
-        if (parent == null || !((Window)parent.target).isFocused() || target.isFocusOwner()) {
-            return false;
-        }
-
-        boolean result = false;
-
-        if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Post-processing event " + e);
-
-        // Process ACCELERATORS
-        AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e);
-        long accel_id = 0;
-        boolean exists = false;
-        synchronized(ACCEL_LOCK) {
-            exists = accel_lookup.containsKey(stroke);
-            if (exists) {
-                accel_id = accel_lookup.get(stroke).longValue();
-            }
-        }
-        if (exists) {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Activating accelerator " + accel_id);
-            sendMessage(XEMBED_ACTIVATE_ACCELERATOR, accel_id, 0, 0); // FIXME: How about overloaded?
-            result = true;
-        }
-
-        // Process Grabs, unofficial GTK feature
-        exists = false;
-        GrabbedKey key = new GrabbedKey(e);
-        synchronized(GRAB_LOCK) {
-            exists = grabbed_keys.contains(key);
-        }
-        if (exists) {
-            if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Forwarding grabbed key " + e);
-            forwardKeyEvent(e);
-            result = true;
-        }
-
-        return result;
-    }
-
-    public void modalityPushed(ModalityEvent ev) {
-        sendMessage(XEMBED_MODALITY_ON);
-    }
-
-    public void modalityPopped(ModalityEvent ev) {
-        sendMessage(XEMBED_MODALITY_OFF);
-    }
-
-    int getModifiers(int state) {
-        int mods = 0;
-        if ((state & XEMBED_MODIFIER_SHIFT) != 0) {
-            mods |= InputEvent.SHIFT_DOWN_MASK;
-        }
-        if ((state & XEMBED_MODIFIER_CONTROL) != 0) {
-            mods |= InputEvent.CTRL_DOWN_MASK;
-        }
-        if ((state & XEMBED_MODIFIER_ALT) != 0) {
-            mods |= InputEvent.ALT_DOWN_MASK;
-        }
-        // FIXME: What is super/hyper?
-        // FIXME: Experiments show that SUPER is ALT. So what is Alt then?
-        if ((state & XEMBED_MODIFIER_SUPER) != 0) {
-            mods |= InputEvent.ALT_DOWN_MASK;
-        }
-//         if ((state & XEMBED_MODIFIER_HYPER) != 0) {
-//             mods |= InputEvent.DOWN_MASK;
-//         }
-        return mods;
-    }
-
-    // Shouldn't be called on Toolkit thread.
-    AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) {
-
-        int keycode = getAWTKeyCodeForKeySym((int)keysym);
-        int modifiers = getModifiers((int)state);
-        return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers);
-    }
-    native int getAWTKeyCodeForKeySym(int keysym);
-    native void sendMessage(int msg);
-    native void sendMessage(int msg, long detail, long data1, long data2);
-    MWindowPeer getParentWindow() {
-        Component parent = target.getParent();
-        synchronized(target.getTreeLock()) {
-            while (parent != null && !(parent.getPeer() instanceof MWindowPeer)) {
-                parent = parent.getParent();
-            }
-            return (parent != null)?(MWindowPeer)parent.getPeer():null;
-        }
-    }
-
-    private static class XEmbedDropTarget extends DropTarget {
-        public void addDropTargetListener(DropTargetListener dtl)
-          throws TooManyListenersException {
-            // Drop target listeners registered with this target will never be
-            // notified, since all drag notifications are routed to the XEmbed
-            // client. To avoid confusion we prohibit listeners registration
-            // by throwing TooManyListenersException as if there is a listener
-            // registered with this target already.
-            throw new TooManyListenersException();
-        }
-    }
-
-    public void setXEmbedDropTarget() {
-        // Register a drop site on the top level.
-        Runnable r = new Runnable() {
-                public void run() {
-                    target.setDropTarget(new XEmbedDropTarget());
-                }
-            };
-        SunToolkit.executeOnEventHandlerThread(target, r);
-    }
-
-    public void removeXEmbedDropTarget() {
-        // Unregister a drop site on the top level.
-        Runnable r = new Runnable() {
-                public void run() {
-                    if (target.getDropTarget() instanceof XEmbedDropTarget) {
-                        target.setDropTarget(null);
-                    }
-                }
-            };
-        SunToolkit.executeOnEventHandlerThread(target, r);
-    }
-
-    public boolean processXEmbedDnDEvent(long ctxt, int eventID) {
-        if (target.getDropTarget() instanceof XEmbedDropTarget) {
-            forwardEventToEmbedded(ctxt, eventID);
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    native void forwardEventToEmbedded(long ctxt, int eventID);
-    native void initXEmbedServer();
-    native void destroyXEmbedServer();
-    public native long getWindow();
-}
-class GrabbedKey {
-    long keysym;
-    long modifiers;
-    GrabbedKey(long keysym, long modifiers) {
-        this.keysym = keysym;
-        this.modifiers = modifiers;
-    }
-
-    GrabbedKey(KeyEvent ev) {
-        init(ev);
-    }
-
-    native void initKeySymAndModifiers(KeyEvent e);
-
-    private void init(KeyEvent e) {
-        initKeySymAndModifiers(e);
-    }
-
-    public int hashCode() {
-        return (int)keysym & 0xFFFFFFFF;
-    }
-
-    public boolean equals(Object o) {
-        if (!(o instanceof GrabbedKey)) {
-            return false;
-        }
-        GrabbedKey key = (GrabbedKey)o;
-        return (keysym == key.keysym && modifiers == key.modifiers);
-    }
-
-    public String toString() {
-        return "Key combination[keysym=" + keysym + ", mods=" + modifiers + "]";
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MEmbeddedFrame.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/*
- * Copyright 1996-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.Component;
-import java.awt.peer.FramePeer;
-import sun.awt.EmbeddedFrame;
-import java.awt.peer.ComponentPeer;
-import sun.awt.*;
-import java.awt.*;
-
-public class MEmbeddedFrame extends EmbeddedFrame {
-
-    /**
-     * Widget id of the shell widget
-     */
-    long handle;
-
-    public enum IDKind {
-        WIDGET,
-        WINDOW
-    };
-
-    public MEmbeddedFrame() {
-    }
-
-    /**
-     * Backward-compatible implementation. This constructor takes widget which represents Frame's
-     * shell and uses it as top-level to build hierarchy of top-level widgets upon. It assumes that
-     * no XEmbed support is provided.
-     * @param widget a valid Xt widget pointer.
-     */
-    public MEmbeddedFrame(long widget) {
-        this(widget, IDKind.WIDGET, false);
-    }
-
-    /**
-     * New constructor, gets X Window id and allows to specify whether XEmbed is supported by parent
-     * X window. Creates hierarchy of top-level widgets under supplied window ID.
-     * @param winid a valid X window
-     * @param supportsXEmbed whether the host application supports XEMBED protocol
-     */
-    public MEmbeddedFrame(long winid, boolean supportsXEmbed) {
-        this(winid, IDKind.WINDOW, supportsXEmbed);
-    }
-
-    /**
-     * Creates embedded frame using ID as parent.
-     * @param ID parent ID
-     * @param supportsXEmbed whether the host application supports XEMBED protocol
-     * @param kind if WIDGET, ID represents a valid Xt widget pointer; if WINDOW, ID is a valid X Window
-     * ID
-     */
-    public MEmbeddedFrame(long ID, IDKind kind, boolean supportsXEmbed) {
-        super(supportsXEmbed);
-        if (kind == IDKind.WIDGET) {
-            this.handle = ID;
-        } else {
-            this.handle = getWidget(ID);
-        }
-        MToolkit toolkit = (MToolkit)Toolkit.getDefaultToolkit();
-        setPeer(toolkit.createEmbeddedFrame(this));
-        /*
-         * addNotify() creates a LightweightDispatcher that propagates
-         * SunDropTargetEvents to subcomponents.
-         * NOTE: show() doesn't call addNotify() for embedded frames.
-         */
-        addNotify();
-        show();
-    }
-
-    public void synthesizeWindowActivation(boolean b) {
-        MEmbeddedFramePeer peer = (MEmbeddedFramePeer)getPeer();
-        if (peer != null) {
-            if (peer.supportsXEmbed()) {
-                if (peer.isXEmbedActive()) {
-                    // If XEmbed is active no synthetic focus events are allowed - everything
-                    // should go through XEmbed
-                    if (b) {
-                        peer.requestXEmbedFocus();
-                    }
-                }
-            } else {
-                peer.synthesizeFocusInOut(b);
-            }
-        }
-    }
-
-    public void show() {
-        if (handle != 0) {
-            mapWidget(handle);
-        }
-        super.show();
-    }
-
-    protected boolean traverseOut(boolean direction) {
-        MEmbeddedFramePeer xefp = (MEmbeddedFramePeer) getPeer();
-        xefp.traverseOut(direction);
-        return true;
-    }
-
-    // Native methods to handle widget <-> X Windows mapping
-    //
-    static native long getWidget(long winid);
-    static native int mapWidget(long widget);
-    public void registerAccelerator(AWTKeyStroke stroke) {
-        MEmbeddedFramePeer xefp = (MEmbeddedFramePeer) getPeer();
-        if (xefp != null) {
-            xefp.registerAccelerator(stroke);
-        }
-    }
-    public void unregisterAccelerator(AWTKeyStroke stroke) {
-        MEmbeddedFramePeer xefp = (MEmbeddedFramePeer) getPeer();
-        if (xefp != null) {
-            xefp.unregisterAccelerator(stroke);
-        }
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MEmbeddedFramePeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +0,0 @@
-/*
- * Copyright 1996-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.
- */
-
-package sun.awt.motif;
-
-import sun.awt.EmbeddedFrame;
-import java.util.logging.*;
-import java.awt.Component;
-import java.awt.Point;
-import java.awt.Rectangle;
-import java.awt.Window;
-import java.awt.AWTKeyStroke;
-import java.awt.Component;
-import java.awt.Container;
-import sun.awt.SunToolkit;
-import java.util.LinkedList;
-import java.util.Iterator;
-
-import sun.java2d.SurfaceData;
-
-public class MEmbeddedFramePeer extends MFramePeer {
-    private static final Logger xembedLog = Logger.getLogger("sun.awt.motif.xembed.MEmbeddedFramePeer");
-
-//     A detail code is required for XEMBED_FOCUS_IN. The following values are valid:
-/* Details for  XEMBED_FOCUS_IN: */
-    final static int XEMBED_FOCUS_CURRENT       =       0;
-    final static int XEMBED_FOCUS_FIRST         =       1;
-    final static int XEMBED_FOCUS_LAST  =       2;
-
-    LinkedList<AWTKeyStroke> strokes = new LinkedList<AWTKeyStroke>();
-
-    public MEmbeddedFramePeer(EmbeddedFrame target) {
-        super(target);
-        xembedLog.fine("Creating XEmbed-enabled motif embedded frame, frame supports XEmbed:" + supportsXEmbed());
-    }
-
-    void create(MComponentPeer parent) {
-        NEFcreate(parent, ((MEmbeddedFrame)target).handle);
-    }
-    native void NEFcreate(MComponentPeer parent, long handle);
-    native void pShowImpl();
-    void pShow() {
-        pShowImpl();
-    }
-
-    boolean supportsXEmbed() {
-        EmbeddedFrame frame = (EmbeddedFrame)target;
-        if (frame != null) {
-            return frame.supportsXEmbed();
-        } else {
-            return false;
-        }
-    }
-
-    public void setVisible(boolean vis) {
-        super.setVisible(vis);
-        xembedLog.fine("Peer made visible");
-        if (vis && !supportsXEmbed()) {
-            xembedLog.fine("Synthesizing FocusIn");
-            // Fix for 4878303 - generate WINDOW_GAINED_FOCUS and update if we were focused
-            // since noone will do it for us(WM does it for regular top-levels)
-            synthesizeFocusInOut(true);
-        }
-    }
-    public native void synthesizeFocusInOut(boolean b);
-
-    native boolean isXEmbedActive();
-    native boolean isXEmbedApplicationActive();
-    native void requestXEmbedFocus();
-
-    public boolean requestWindowFocus() {
-        xembedLog.fine("In requestWindowFocus");
-        // Should check for active state of host application
-        if (isXEmbedActive()) {
-            if (isXEmbedApplicationActive()) {
-                xembedLog.fine("Requesting focus from embedding host");
-                requestXEmbedFocus();
-                return true;
-            } else {
-                xembedLog.fine("Host application is not active");
-                return false;
-            }
-        } else {
-            xembedLog.fine("Requesting focus from X");
-            return super.requestWindowFocus();
-        }
-    }
-
-    void registerAccelerator(AWTKeyStroke stroke) {
-//         if (stroke == null) return;
-//         strokes.add(stroke);
-//         if (isXEmbedActive()) {
-//             nativeRegisterAccelerator(stroke, strokes.size()-1);
-//         }
-    }
-
-    void unregisterAccelerator(AWTKeyStroke stroke) {
-//         if (stroke == null) return;
-//         if (isXEmbedActive()) {
-//             int index = strokes.indexOf(stroke);
-//             nativeUnregisterAccelerator(index);
-//         }
-    }
-
-    void notifyStarted() {
-        // Register accelerators
-//         int i = 0;
-//         Iterator<AWTKeyStroke> iter = strokes.iterator();
-//         while (iter.hasNext()) {
-//             nativeRegisterAccelerator(iter.next(), i++);
-//         }
-
-        updateDropTarget();
-    }
-
-    native void traverseOut(boolean direction);
-
-    void handleFocusIn(int detail) {
-        xembedLog.log(Level.FINE, "handleFocusIn {0}", new Object[]{Integer.valueOf(detail)});
-        switch(detail) {
-          case XEMBED_FOCUS_CURRENT:
-              // Do nothing - just restore to the current value
-              break;
-          case XEMBED_FOCUS_FIRST:
-              SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
-                      public void run() {
-                          Component comp = ((Container)target).getFocusTraversalPolicy().getFirstComponent((Container)target);
-                          if (comp != null) {
-                              comp.requestFocusInWindow();
-                          }
-                      }});
-              break;
-          case XEMBED_FOCUS_LAST:
-              SunToolkit.executeOnEventHandlerThread(target, new Runnable() {
-                      public void run() {
-                          Component comp = ((Container)target).getFocusTraversalPolicy().getLastComponent((Container)target);
-                          if (comp != null) {
-                              comp.requestFocusInWindow();
-                          }
-                      }});
-              break;
-        }
-    }
-    public void handleWindowFocusIn() {
-        super.handleWindowFocusIn();
-        xembedLog.fine("windowFocusIn");
-    }
-    public void handleWindowFocusOut(Window oppositeWindow) {
-        super.handleWindowFocusOut(oppositeWindow);
-        xembedLog.fine("windowFocusOut, opposite is null?:" + (oppositeWindow==null));
-    }
-
-    native void pReshapePrivate(int x, int y, int w, int h);
-
-    public void setBoundsPrivate(int x, int y, int width, int height)
-    {
-        if (disposed)
-        {
-            return;
-        }
-
-        // Should set paintPending before reshape to prevent
-        // thread race between PaintEvent and setBounds
-        // This part of the 4267393 fix proved to be unstable under solaris,
-        // dissabled due to regressions 4418155, 4486762, 4490079
-        paintPending = false; //checkNativePaintOnSetBounds(width, height);
-
-        pReshapePrivate(x, y, width, height);
-
-        if ((width != oldWidth) || (height != oldHeight))
-        {
-            SurfaceData oldData = surfaceData;
-            if (oldData != null) {
-                surfaceData = graphicsConfig.createSurfaceData(this);
-                oldData.invalidate();
-            }
-            oldWidth = width;
-            oldHeight = height;
-        }
-        validateSurface(width, height);
-        serialNum++;
-    }
-
-    public native Rectangle getBoundsPrivate();
-
-    @Override
-    Rectangle constrainBounds(int x, int y, int width, int height) {
-        // We don't constrain the bounds of the EmbeddedFrames
-        return new Rectangle(x, y, width, height);
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MFileDialogPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.io.*;
-import java.awt.datatransfer.*;
-import java.util.ArrayList;
-import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
-
-public class MFileDialogPeer extends MDialogPeer implements FileDialogPeer {
-    private FilenameFilter filter;
-    private String[] NativeFilteredFiles;
-    native void create(MComponentPeer parent);
-    void create(MComponentPeer parent, Object arg) {
-        create(parent);
-    }
-    public MFileDialogPeer(FileDialog target) {
-        super(target);
-        FileDialog      fdialog = (FileDialog)target;
-        String          dir = fdialog.getDirectory();
-        String          file = fdialog.getFile();
-        FilenameFilter  filter = fdialog.getFilenameFilter();
-
-        insets = new Insets(0, 0, 0, 0);
-        setDirectory(dir);
-        if (file != null) {
-            setFile(file);
-        }
-            setFilenameFilter(filter);
-    }
-    native void         pReshape(int x, int y, int width, int height);
-    native void         pDispose();
-    native void         pShow();
-    native void         pHide();
-    native void         setFileEntry(String dir, String file, String[] ffiles);
-    native void insertReplaceFileDialogText(String l);
-    public native void  setFont(Font f);
-
-    String getFilteredFile(String file) {
-        if (file == null) {
-            file = ((FileDialog)target).getFile();
-        }
-        String dir = ((FileDialog)target).getDirectory();
-        if (dir == null) {
-            dir = "./";
-        }
-        if (file == null) {
-            file = "";
-        }
-        if (filter != null && !filter.accept(new File(dir), file)) {
-            file = "";
-        }
-        return file;
-    }
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void         handleSelected(final String file) {
-        final FileDialog fileDialog = (FileDialog)target;
-        MToolkit.executeOnEventHandlerThread(fileDialog, new Runnable() {
-            public void run() {
-                int index = file.lastIndexOf(java.io.File.separatorChar);/*2509*//*ibm*/
-                String dir;
-
-                if (index == -1) {
-                    dir = "."+java.io.File.separator;
-                    fileDialog.setFile(file);
-                } else {
-                    dir = file.substring(0, index + 1);
-                    fileDialog.setFile(file.substring(index + 1));
-                }
-                fileDialog.setDirectory(dir);
-                fileDialog.hide();
-            }
-        });
-    } // handleSelected()
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void         handleCancel() {
-        final FileDialog fileDialog = (FileDialog)target;
-        MToolkit.executeOnEventHandlerThread(fileDialog, new Runnable() {
-            public void run() {
-                fileDialog.setFile(null);
-                fileDialog.hide();
-            }
-        });
-    } // handleCancel()
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void         handleQuit() {
-        final FileDialog fileDialog = (FileDialog)target;
-        MToolkit.executeOnEventHandlerThread(fileDialog, new Runnable() {
-            public void run() {
-                fileDialog.hide();
-            }
-        });
-    } // handleQuit()
-
-    public  void setDirectory(String dir) {
-        String file = ((FileDialog)target).getFile();
-        setFileEntry((dir != null) ? dir : "./", (file != null) ? file
-                     : "", null);
-    }
-
-
-    public  void setFile(String file) {
-        String dir = ((FileDialog)target).getDirectory();
-        if (dir == null) {
-            dir = "./";
-        }
-        setFileEntry((dir != null) ? dir : "./", getFilteredFile(null), null);
-    }
-    class DirectoryFilter implements FilenameFilter {
-        FilenameFilter userFilter;
-        DirectoryFilter(FilenameFilter userFilter) {
-            this.userFilter = userFilter;
-        }
-        public boolean accept(File parent, String name) {
-            File toTest = new File(parent, name);
-            if (toTest.isDirectory()) {
-                return false;
-            } else if (userFilter != null) {
-                return userFilter.accept(parent, name);
-            } else {
-                return true;
-            }
-        }
-    }
-    public void doFilter(FilenameFilter filter, String dir) {
-        String d = (dir == null) ? (((FileDialog)target).getDirectory()):(dir);
-        String f = getFilteredFile(null);
-        File df = new File((d != null) ? d : ".");
-        String[] files = df.list(new DirectoryFilter(filter));
-        String[] nffiles = NativeFilteredFiles;
-
-        // At this point we have two file lists.
-        // The first one is a filtered list of files that we retrieve
-        // by using Java code and Java filter.
-        // The second one is a filtered list of files that we retrieve
-        // by using the native code and native pattern.
-        // We should find an intersection of these two lists. The result
-        // will be exactly what we expect to see in setFileEntry.
-        // For more details please see 4784704.
-        if ( files != null ) {
-            ArrayList filearr = new ArrayList();
-            if (nffiles != null) {
-                for (int j = 0; j < files.length; j++) {
-                    for (int n = 0; n < nffiles.length; n++) {
-                        if (files[j].equals(nffiles[n])) {
-                            filearr.add(files[j]);
-                            break;
-                        }
-                    }
-                }
-            }
-            files = new String[filearr.size()];
-            for (int i = 0; i < files.length; i++) {
-                files[i] = (String)filearr.get(i);
-            }
-        }
-        if (files == null || files.length == 0) {
-            files = new String[1];
-            files[0] = "";
-        }
-        setFileEntry((d != null) ? d : ".", (f != null) ? f : "", files);
-    }
-    private boolean proceedFiltering(final String dir, String[] nffiles,
-                                     boolean isPrivileged)
-    {
-        // Transfer the native filtered file list to the doFilter method.
-        NativeFilteredFiles = nffiles;
-        // If we are not on the Toolkit thread we can call doFilter() directly.
-        // If the filter is null no user code will be invoked
-        if (!isPrivileged || filter == null) {
-            try {
-                doFilter(filter, dir);
-                return true;
-            } catch(Exception e) {
-                e.printStackTrace();
-                return false;
-            }
-        }
-        // Otherwise we have to call user code on EvenDispatchThread
-        final ToolkitThreadBlockedHandler priveleged_lock =
-            MToolkitThreadBlockedHandler.getToolkitThreadBlockedHandler();
-        final boolean[] finished = new boolean[1];
-        final boolean[] result = new boolean[1];
-        finished[0] = false;
-        result[0] = false;
-
-
-        // Use the same Toolkit blocking mechanism as in DnD.
-        priveleged_lock.lock();
-
-        MToolkit.executeOnEventHandlerThread((FileDialog)target, new Runnable() {
-            public void run() {
-                priveleged_lock.lock();
-                try {
-                    doFilter(filter, dir);
-                    result[0] = true;
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    result[0] = false;
-                } finally {
-                    finished[0] = true;
-                    priveleged_lock.exit();
-                    priveleged_lock.unlock();
-                }
-            }
-        });
-
-        while (!finished[0]) {
-            priveleged_lock.enter();
-        }
-
-        priveleged_lock.unlock();
-
-        return result[0];
-    }
-
-    public void setFilenameFilter(FilenameFilter filter) {
-        this.filter = filter;
-        FileDialog      fdialog = (FileDialog)target;
-        String          dir = fdialog.getDirectory();
-        String          file = fdialog.getFile();
-        setFile(file);
-        doFilter(filter, null);
-    }
-
-    // Called from native widget when paste key is pressed and we
-    // already own the selection (prevents Motif from hanging while
-    // waiting for the selection)
-    //
-    public void pasteFromClipboard() {
-        Clipboard clipboard = target.getToolkit().getSystemClipboard();
-
-        Transferable content = clipboard.getContents(this);
-        if (content != null) {
-            try {
-                String data = (String)(content.getTransferData(DataFlavor.stringFlavor));
-                insertReplaceFileDialogText(data);
-            } catch (Exception e) {
-            }
-        }
-    }
-
-// CAVEAT:
-// Peer coalescing code turned over the fact that the following functions
-// were being inherited from Dialog and were not implemented in awt_FileDialog.c
-// Five methods decribed by the peer interface are at fault (setResizable, setTitle,
-// toFront, toBack and handleFocusTraversalEvent).  Additionally show has to be overridden
-// as it was necessary to add a show function in MDialogPeer for modality flag passing.
-// As a result we were winding up in  awt_Dialog.c (now coalesced into awt_TopLevel).
-// As Filedialogs are modal and its unclear to me that any of these functions
-// can be called while the FD is on-screen let it go.  RJM.
-    public void show() {
-        // must have our own show or we wind up in pShow for Window. Bad. Very bad.
-        setVisible(true);
-        setFilenameFilter(filter);
-    }
-
-    /**
-     * MFileDialogPeer doesn't have native pData so we don't do restack on it
-     * @see java.awt.peer.ContainerPeer#restack
-     */
-    public void restack() {
-    }
-
-    /**
-     * @see java.awt.peer.ContainerPeer#isRestackSupported
-     */
-    public boolean isRestackSupported() {
-        return false;
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MFramePeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,511 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.util.Vector;
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.*;
-import sun.awt.motif.MInputMethodControl;
-import sun.awt.im.*;
-import java.awt.image.ColorModel;
-import java.awt.image.BufferedImage;
-import java.awt.image.DataBuffer;
-import java.awt.image.DataBufferInt;
-import java.awt.image.DataBufferByte;
-import java.awt.image.DataBufferUShort;
-import java.awt.image.ImageObserver;
-import java.awt.image.WritableRaster;
-import sun.awt.image.ImageRepresentation;
-import sun.awt.image.ToolkitImage;
-
-class MFramePeer extends MWindowPeer implements FramePeer, MInputMethodControl {
-    static Vector allFrames = new Vector();
-
-    // XXX: Stub out for now.  Need to propagate to normal size hints.
-    public void setMaximizedBounds(Rectangle b) {}
-
-    public void create(MComponentPeer parent, Object arg) {
-        super.create( parent );
-    }
-
-    MFramePeer(Frame target) {
-        super();
-        // set the window attributes for this Frame
-        winAttr.nativeDecor = !target.isUndecorated();
-        winAttr.initialFocus = true;
-        winAttr.isResizable =  target.isResizable();
-        winAttr.initialState = target.getState();
-        winAttr.title = target.getTitle();
-        winAttr.icon = target.getIconImage();
-        if (winAttr.nativeDecor) {
-            winAttr.decorations = winAttr.AWT_DECOR_ALL;
-        } else {
-            winAttr.decorations = winAttr.AWT_DECOR_NONE;
-        }
-
-        // for input method windows, use minimal decorations
-        if (target instanceof InputMethodWindow) {
-            winAttr.initialFocus = false;
-            winAttr.decorations = (winAttr.AWT_DECOR_TITLE | winAttr.AWT_DECOR_BORDER);
-        }
-
-        // create and init native component
-        init( target);
-    if (winAttr.icon != null) {
-        setIconImage(winAttr.icon);
-    }
-        allFrames.addElement(this);
-    }
-
-    public void setTitle(String title) {
-        pSetTitle(title);
-    }
-
-    protected void disposeImpl() {
-        allFrames.removeElement(this);
-        super.disposeImpl();
-    }
-
-    public void setMenuBar(MenuBar mb) {
-        MMenuBarPeer mbpeer = (MMenuBarPeer) MToolkit.targetToPeer(mb);
-        pSetMenuBar(mbpeer);
-
-        Rectangle r = target.bounds();
-
-        pReshape(r.x, r.y, r.width, r.height);
-        if (target.isVisible()) {
-            target.validate();
-        }
-    }
-
-    public void setIconImage(Image im) {
-        int width;
-        int height;
-        GraphicsConfiguration defaultGC;
-        if (im != null) {  // 4633887  Avoid Null pointer exception.
-        if (im instanceof ToolkitImage) {
-            ImageRepresentation ir = ((ToolkitImage)im).getImageRep();
-            ir.reconstruct(ImageObserver.ALLBITS);
-            width = ir.getWidth();
-            height = ir.getHeight();
-        }
-        else {
-            width = im.getWidth(null);
-            height = im.getHeight(null);
-        }
-        if (pGetIconSize(width, height)) {
-            //Icons are displayed using the default visual, so create image
-            //using default GraphicsConfiguration
-            defaultGC = getGraphicsConfiguration().getDevice().
-                getDefaultConfiguration();
-            ColorModel model = defaultGC.getColorModel();
-            WritableRaster raster =
-                model.createCompatibleWritableRaster(iconWidth, iconHeight);
-            Image image = new BufferedImage(model, raster,
-                                            model.isAlphaPremultiplied(),
-                                            null);
-
-            // ARGB BufferedImage to hunt for transparent pixels
-            BufferedImage bimage =
-                new BufferedImage(iconWidth, iconHeight,
-                                  BufferedImage.TYPE_INT_ARGB);
-            ColorModel alphaCheck = bimage.getColorModel();
-            Graphics g = image.getGraphics();
-            Graphics big = bimage.getGraphics();
-            try {
-                g.drawImage(im, 0, 0, iconWidth, iconHeight, null);
-                big.drawImage(im, 0, 0, iconWidth, iconHeight, null);
-            } finally {
-                g.dispose();
-                big.dispose();
-            }
-
-            DataBuffer db = ((BufferedImage)image).getRaster().getDataBuffer();
-            DataBuffer bidb = bimage.getRaster().getDataBuffer();
-            byte[] bytedata = null;
-            int[] intdata = null;
-            int bidbLen = bidb.getSize();
-            int imgDataIdx;
-            //Get native RGB value for window background color
-            //Should work for byte as well as int
-            int bgRGB = getNativeColor(SystemColor.window, defaultGC);
-
-            /* My first attempt at a solution to bug 4175560 was to use
-             * the iconMask and iconPixmap attributes of Windows.
-             * This worked fine on CDE/dtwm, however olwm displayed only
-             * single color icons (white on background).  Instead, the
-             * fix gets the default background window color and replaces
-             * transparent pixels in the icon image with this color.  This
-             * solutions works well with dtwm as well as olwm.
-             */
-
-            for (imgDataIdx = 0; imgDataIdx < bidbLen; imgDataIdx++) {
-                if (alphaCheck.getAlpha(bidb.getElem(imgDataIdx)) == 0 ) {
-                    //Assuming single data bank
-                    db.setElem(imgDataIdx, bgRGB);
-                }
-            }
-            short[] ushortdata = null;
-            if (db instanceof DataBufferByte) {
-                // Pseudocolor data
-                bytedata = ((DataBufferByte)db).getData();
-            }
-            else if (db instanceof DataBufferInt) {
-                // Truecolor data
-                intdata = ((DataBufferInt) db).getData();
-            }
-            else if (db instanceof DataBufferUShort) {
-                // Truecolor data
-                ushortdata = ((DataBufferUShort) db).getData();
-            }
-               pSetIconImage(bytedata, intdata, ushortdata,
-                          iconWidth, iconHeight);
-        }
-        }
-    }
-
-    native boolean pGetIconSize(int widthHint, int heightHint);
-
-    // [jk] added ushortData for 16-bpp displays
-    native void pSetIconImage(byte[] byteData,
-                              int[] intData,
-                              short[] ushortData,
-                              int iconWidth, int iconHeight);
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleIconify() {
-        postEvent(new WindowEvent((Window)target, WindowEvent.WINDOW_ICONIFIED));
-    }
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleDeiconify() {
-        postEvent(new WindowEvent((Window)target, WindowEvent.WINDOW_DEICONIFIED));
-    }
-
-
-    /**
-     * Called to inform the Frame that it has moved.
-     */
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleMoved(int x, int y) {
-        postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED));
-    }
-
-    static final int CROSSHAIR_INSET = 5;
-
-    static final int BUTTON_Y = CROSSHAIR_INSET + 1;
-    static final int BUTTON_W = 17;
-    static final int BUTTON_H = 17;
-
-    static final int SYS_MENU_X = CROSSHAIR_INSET + 1;
-    static final int SYS_MENU_CONTAINED_X = SYS_MENU_X + 5;
-    static final int SYS_MENU_CONTAINED_Y = BUTTON_Y + 7;
-    static final int SYS_MENU_CONTAINED_W = 8;
-    static final int SYS_MENU_CONTAINED_H = 3;
-
-    static final int MAXIMIZE_X_DIFF = CROSSHAIR_INSET + BUTTON_W;
-    static final int MAXIMIZE_CONTAINED_X_DIFF = MAXIMIZE_X_DIFF - 5;
-    static final int MAXIMIZE_CONTAINED_Y = BUTTON_Y + 5;
-    static final int MAXIMIZE_CONTAINED_W = 8;
-    static final int MAXIMIZE_CONTAINED_H = 8;
-
-    static final int MINIMIZE_X_DIFF = MAXIMIZE_X_DIFF + BUTTON_W;
-    static final int MINIMIZE_CONTAINED_X_DIFF = MINIMIZE_X_DIFF - 7;
-    static final int MINIMIZE_CONTAINED_Y = BUTTON_Y + 7;
-    static final int MINIMIZE_CONTAINED_W = 3;
-    static final int MINIMIZE_CONTAINED_H = 3;
-
-    static final int TITLE_X = SYS_MENU_X + BUTTON_W;
-    static final int TITLE_W_DIFF = BUTTON_W * 3 + CROSSHAIR_INSET * 2 - 1;
-    static final int TITLE_MID_Y = BUTTON_Y + (BUTTON_H / 2);
-
-    static final int MENUBAR_X = CROSSHAIR_INSET + 1;
-    static final int MENUBAR_Y = BUTTON_Y + BUTTON_H;
-
-    static final int HORIZ_RESIZE_INSET = CROSSHAIR_INSET + BUTTON_H;
-    static final int VERT_RESIZE_INSET = CROSSHAIR_INSET + BUTTON_W;
-
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * We also explicitly print the MenuBar since a MenuBar isn't a subclass
-     * of Component (and thus it has no "print" method which gets called by
-     * default).
-     */
-    public void print(Graphics g) {
-        super.print(g);
-
-        Frame f = (Frame)target;
-        Insets finsets = f.getInsets();
-        Dimension fsize = f.getSize();
-
-        Color bg = f.getBackground();
-        Color fg = f.getForeground();
-        Color highlight = bg.brighter();
-        Color shadow = bg.darker();
-
-        // Well, we could query for the currently running window manager
-        // and base the look on that, or we could just always do dtwm.
-        // aim, tball, and levenson all agree we'll just do dtwm.
-
-        if (hasDecorations(MWindowAttributes.AWT_DECOR_BORDER)) {
-
-            // top outer -- because we'll most likely be drawing on white paper,
-            // for aesthetic reasons, don't make any part of the outer border
-            // pure white
-            if (highlight.equals(Color.white)) {
-                g.setColor(new Color(230, 230, 230));
-            }
-            else {
-                g.setColor(highlight);
-            }
-            g.drawLine(0, 0, fsize.width, 0);
-            g.drawLine(0, 1, fsize.width - 1, 1);
-
-            // left outer
-            // if (highlight.equals(Color.white)) {
-            //     g.setColor(new Color(230, 230, 230));
-            // }
-            // else {
-            //     g.setColor(highlight);
-            // }
-            g.drawLine(0, 0, 0, fsize.height);
-            g.drawLine(1, 0, 1, fsize.height - 1);
-
-            // bottom cross-hair
-            g.setColor(highlight);
-            g.drawLine(CROSSHAIR_INSET + 1, fsize.height - CROSSHAIR_INSET,
-                       fsize.width - CROSSHAIR_INSET,
-                       fsize.height - CROSSHAIR_INSET);
-
-            // right cross-hair
-            // g.setColor(highlight);
-            g.drawLine(fsize.width - CROSSHAIR_INSET, CROSSHAIR_INSET + 1,
-                       fsize.width - CROSSHAIR_INSET,
-                       fsize.height - CROSSHAIR_INSET);
-
-            // bottom outer
-            g.setColor(shadow);
-            g.drawLine(1, fsize.height, fsize.width, fsize.height);
-            g.drawLine(2, fsize.height - 1, fsize.width, fsize.height - 1);
-
-            // right outer
-            // g.setColor(shadow);
-            g.drawLine(fsize.width, 1, fsize.width, fsize.height);
-            g.drawLine(fsize.width - 1, 2, fsize.width - 1, fsize.height);
-
-            // top cross-hair
-            // g.setColor(shadow);
-            g.drawLine(CROSSHAIR_INSET, CROSSHAIR_INSET,
-                       fsize.width - CROSSHAIR_INSET, CROSSHAIR_INSET);
-
-            // left cross-hair
-            // g.setColor(shadow);
-            g.drawLine(CROSSHAIR_INSET, CROSSHAIR_INSET, CROSSHAIR_INSET,
-                   fsize.height - CROSSHAIR_INSET);
-        }
-
-        if (hasDecorations(MWindowAttributes.AWT_DECOR_TITLE)) {
-
-            if (hasDecorations(MWindowAttributes.AWT_DECOR_MENU)) {
-
-                // system menu
-                g.setColor(bg);
-                g.fill3DRect(SYS_MENU_X, BUTTON_Y, BUTTON_W, BUTTON_H, true);
-                g.fill3DRect(SYS_MENU_CONTAINED_X, SYS_MENU_CONTAINED_Y,
-                             SYS_MENU_CONTAINED_W, SYS_MENU_CONTAINED_H, true);
-            }
-
-            // title bar
-            // g.setColor(bg);
-            g.fill3DRect(TITLE_X, BUTTON_Y, fsize.width - TITLE_W_DIFF, BUTTON_H,
-                         true);
-
-            if (hasDecorations(MWindowAttributes.AWT_DECOR_MINIMIZE)) {
-
-                // minimize button
-                // g.setColor(bg);
-                g.fill3DRect(fsize.width - MINIMIZE_X_DIFF, BUTTON_Y, BUTTON_W,
-                             BUTTON_H, true);
-                g.fill3DRect(fsize.width - MINIMIZE_CONTAINED_X_DIFF,
-                             MINIMIZE_CONTAINED_Y, MINIMIZE_CONTAINED_W,
-                             MINIMIZE_CONTAINED_H, true);
-            }
-
-            if (hasDecorations(MWindowAttributes.AWT_DECOR_MAXIMIZE)) {
-
-                // maximize button
-                // g.setColor(bg);
-                g.fill3DRect(fsize.width - MAXIMIZE_X_DIFF, BUTTON_Y, BUTTON_W,
-                             BUTTON_H, true);
-                g.fill3DRect(fsize.width - MAXIMIZE_CONTAINED_X_DIFF,
-                             MAXIMIZE_CONTAINED_Y, MAXIMIZE_CONTAINED_W,
-                             MAXIMIZE_CONTAINED_H, true);
-            }
-
-            // title bar text
-            g.setColor(fg);
-            Font sysfont = new Font(Font.SANS_SERIF, Font.PLAIN, 10);
-            g.setFont(sysfont);
-            FontMetrics sysfm = g.getFontMetrics();
-            String ftitle = f.getTitle();
-            g.drawString(ftitle,
-                         ((TITLE_X + TITLE_X + fsize.width - TITLE_W_DIFF) / 2) -
-                         (sysfm.stringWidth(ftitle) / 2),
-                         TITLE_MID_Y + sysfm.getMaxDescent());
-        }
-
-        if (f.isResizable() &&
-            hasDecorations(MWindowAttributes.AWT_DECOR_RESIZEH)) {
-
-            // add resize cross hairs
-
-            // upper-left horiz (shadow)
-            g.setColor(shadow);
-            g.drawLine(1, HORIZ_RESIZE_INSET, CROSSHAIR_INSET,
-                       HORIZ_RESIZE_INSET);
-            // upper-left vert (shadow)
-            // g.setColor(shadow);
-            g.drawLine(VERT_RESIZE_INSET, 1, VERT_RESIZE_INSET, CROSSHAIR_INSET);
-            // upper-right horiz (shadow)
-            // g.setColor(shadow);
-            g.drawLine(fsize.width - CROSSHAIR_INSET + 1, HORIZ_RESIZE_INSET,
-                       fsize.width, HORIZ_RESIZE_INSET);
-            // upper-right vert (shadow)
-            // g.setColor(shadow);
-            g.drawLine(fsize.width - VERT_RESIZE_INSET - 1, 2,
-                       fsize.width - VERT_RESIZE_INSET - 1, CROSSHAIR_INSET + 1);
-            // lower-left horiz (shadow)
-            // g.setColor(shadow);
-            g.drawLine(1, fsize.height - HORIZ_RESIZE_INSET - 1,
-                       CROSSHAIR_INSET, fsize.height - HORIZ_RESIZE_INSET - 1);
-            // lower-left vert (shadow)
-            // g.setColor(shadow);
-            g.drawLine(VERT_RESIZE_INSET, fsize.height - CROSSHAIR_INSET + 1,
-                       VERT_RESIZE_INSET, fsize.height);
-            // lower-right horiz (shadow)
-            // g.setColor(shadow);
-            g.drawLine(fsize.width - CROSSHAIR_INSET + 1,
-                       fsize.height - HORIZ_RESIZE_INSET - 1, fsize.width,
-                       fsize.height - HORIZ_RESIZE_INSET - 1);
-            // lower-right vert (shadow)
-            // g.setColor(shadow);
-            g.drawLine(fsize.width - VERT_RESIZE_INSET - 1,
-                       fsize.height - CROSSHAIR_INSET + 1,
-                       fsize.width - VERT_RESIZE_INSET - 1, fsize.height);
-
-            // upper-left horiz (highlight)
-            g.setColor(highlight);
-            g.drawLine(2, HORIZ_RESIZE_INSET + 1, CROSSHAIR_INSET,
-                       HORIZ_RESIZE_INSET + 1);
-            // upper-left vert (highlight)
-            // g.setColor(highlight);
-            g.drawLine(VERT_RESIZE_INSET + 1, 2, VERT_RESIZE_INSET + 1,
-                       CROSSHAIR_INSET);
-            // upper-right horiz (highlight)
-            // g.setColor(highlight);
-            g.drawLine(fsize.width - CROSSHAIR_INSET + 1,
-                       HORIZ_RESIZE_INSET + 1, fsize.width - 1,
-                       HORIZ_RESIZE_INSET + 1);
-            // upper-right vert (highlight)
-            // g.setColor(highlight);
-            g.drawLine(fsize.width - VERT_RESIZE_INSET, 2,
-                       fsize.width - VERT_RESIZE_INSET, CROSSHAIR_INSET);
-            // lower-left horiz (highlight)
-            // g.setColor(highlight);
-            g.drawLine(2, fsize.height - HORIZ_RESIZE_INSET, CROSSHAIR_INSET,
-                       fsize.height - HORIZ_RESIZE_INSET);
-            // lower-left vert (highlight)
-            // g.setColor(highlight);
-            g.drawLine(VERT_RESIZE_INSET + 1,
-                       fsize.height - CROSSHAIR_INSET + 1,
-                       VERT_RESIZE_INSET + 1, fsize.height - 1);
-            // lower-right horiz (highlight)
-            // g.setColor(highlight);
-            g.drawLine(fsize.width - CROSSHAIR_INSET + 1,
-                       fsize.height - HORIZ_RESIZE_INSET, fsize.width - 1,
-                       fsize.height - HORIZ_RESIZE_INSET);
-            // lower-right vert (highlight)
-            // g.setColor(highlight);
-            g.drawLine(fsize.width - VERT_RESIZE_INSET,
-                       fsize.height - CROSSHAIR_INSET + 1,
-                       fsize.width - VERT_RESIZE_INSET, fsize.height - 1);
-        }
-
-        MenuBar mb = f.getMenuBar();
-        if (mb != null) {
-            MMenuBarPeer peer = (MMenuBarPeer) MToolkit.targetToPeer(mb);
-            if (peer != null) {
-                Insets insets = getInsets();
-                Graphics ng = g.create();
-                int menubarX = 0;
-                int menubarY = 0;
-                if (hasDecorations(MWindowAttributes.AWT_DECOR_BORDER)) {
-                    menubarX += CROSSHAIR_INSET + 1;
-                    menubarY += CROSSHAIR_INSET + 1;
-                }
-                if (hasDecorations(MWindowAttributes.AWT_DECOR_TITLE)) {
-                    menubarY += BUTTON_H;
-                }
-                try {
-                    ng.translate(menubarX, menubarY);
-                    peer.print(ng);
-                } finally {
-                    ng.dispose();
-                }
-            }
-        }
-    }
-
-    // Saveunders are not done by Frame.
-    void setSaveUnder(boolean state) {}
-
-    /* Returns the native paint should be posted after setting new size
-     */
-    public boolean checkNativePaintOnSetBounds(int width, int height) {
-        // Fix for 4418155. Undecorated Frame does not repaint
-        // automticaly if shrinking. Should not wait for Expose
-        return ((Frame)target).isUndecorated() ?
-            ((width > oldWidth) || (height > oldHeight)):
-            ((width != oldWidth) || (height != oldHeight));
-    }
-
-    public void setBoundsPrivate(int x, int y, int width, int height) {
-        setBounds(x, y, width, height);
-    }
-
-    public Rectangle getBoundsPrivate() {
-        return getBounds();
-    }
-
-    @Override
-    final boolean isTargetUndecorated() {
-        return ((Frame)target).isUndecorated();
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MGlobalCursorManager.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
- * Copyright 1999-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.*;
-import sun.awt.GlobalCursorManager;
-import sun.awt.GlobalCursorManager.*;
-
-public final class MGlobalCursorManager extends GlobalCursorManager {
-
-    static {
-        cacheInit();
-    }
-
-    private native static void cacheInit();
-
-    // cached nativeContainer
-    private Component nativeContainer;
-
-
-    /**
-     * The MGlobalCursorManager is a singleton.
-     */
-    private static MGlobalCursorManager manager;
-
-
-    static GlobalCursorManager getCursorManager() {
-        if (manager == null) {
-            manager = new MGlobalCursorManager();
-        }
-        return manager;
-    }
-
-    /**
-     * Should be called in response to a native mouse enter or native mouse
-     * button released message. Should not be called during a mouse drag.
-     */
-    static void nativeUpdateCursor(Component heavy) {
-        MGlobalCursorManager.getCursorManager().updateCursorLater(heavy);
-    }
-
-
-    protected void setCursor(Component comp, Cursor cursor, boolean useCache) {
-        if (comp == null) {
-            return;
-        }
-
-        Cursor cur = useCache ? cursor : getCapableCursor(comp);
-
-        Component nc = useCache ? nativeContainer : getNativeContainer(comp);
-
-        // System.out.println(" set cursor="+cursor+"  on "+comp+"  new curs="+cur);
-        if (nc != null && nc.isDisplayable()) {
-            nativeContainer = nc;
-            ((MComponentPeer)nc.getPeer()).pSetCursor(cur);
-        }
-    }
-
-    private Component getNativeContainer(Component comp) {
-        while (comp != null && comp.isLightweight()) {
-            comp = comp.getParent();
-        }
-        return comp;
-    }
-
-    protected native void getCursorPos(Point p);
-    protected native Component findHeavyweightUnderCursor();
-
-    /*
-     * two native methods to call corresponding methods in Container and
-     * Component
-     */
-    protected native Component findComponentAt(Container con, int x, int y);
-    protected native Point getLocationOnScreen(Component com);
-
-    protected Component findHeavyweightUnderCursor(boolean useCache) {
-        return findHeavyweightUnderCursor();
-    }
-
-    private Cursor getCapableCursor(Component comp) {
-        Component c = comp;
-        while ((c != null) && !(c instanceof Window) &&
-               c.isEnabled() && c.isVisible() && c.isDisplayable()) {
-            c = c.getParent();
-        }
-        if (c instanceof Window) {
-            return (c.isEnabled() && c.isVisible() && c.isDisplayable() && comp.isEnabled()) ?
-                    comp.getCursor() :
-                    Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
-        } else if (c == null) {
-            return null;
-        }
-        return getCapableCursor(c.getParent());
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MInputMethod.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +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.
- */
-
-package sun.awt.motif;
-
-import java.awt.AWTException;
-import java.awt.Component;
-import java.awt.Container;
-import java.awt.Window;
-import java.awt.peer.ComponentPeer;
-import sun.awt.X11InputMethod;
-import sun.awt.SunToolkit;
-
-/**
- * Input Method Adapter for XIM (with Motif)
- *
- * @author JavaSoft International
- */
-public class MInputMethod extends X11InputMethod {
-
-    public MInputMethod() throws AWTException {
-        super();
-    }
-
-    protected boolean openXIM() {
-        return openXIMNative();
-    }
-
-    protected boolean createXIC() {
-        MComponentPeer peer = (MComponentPeer)getPeer(clientComponentWindow);
-        if (peer == null) {
-            return false;
-        }
-        MComponentPeer tc = null;
-        if (peer instanceof MInputMethodControl) {
-            tc = ((MInputMethodControl)peer).getTextComponent();
-        }
-        if (!createXICNative(peer, tc)) {
-            return false;
-        }
-        if (peer instanceof MInputMethodControl) {
-            ((MInputMethodControl)peer).addInputMethod(this);
-        }
-        return true;
-    }
-
-    protected void setXICFocus(ComponentPeer peer,
-                                    boolean value, boolean active) {
-        setXICFocusNative((MComponentPeer)peer, value, active);
-    }
-
-    protected Container getParent(Component client) {
-        // SECURITY: Use _NoClientCode(), because this thread may
-        //           be privileged
-        return MComponentPeer.getParent_NoClientCode(client);
-    }
-
-    /**
-     * Returns peer of the given client component. If the given client component
-     * doesn't have peer, peer of the native container of the client is returned.
-     */
-    protected ComponentPeer getPeer(Component client) {
-        MComponentPeer peer = (MComponentPeer)MToolkit.targetToPeer(client);
-        if (peer != null)
-            return peer;
-
-        Container nativeContainer = MToolkit.getNativeContainer(client);
-        peer = (MComponentPeer)MToolkit.targetToPeer(nativeContainer);
-        return peer;
-    }
-
-    /**
-     * Changes the status area configuration that is to be requested
-     * by Frame or Dialog.
-     */
-    void configureStatus() {
-        if (isDisposed()) {
-            return;
-        }
-
-        MComponentPeer peer = (MComponentPeer)getPeer((Window) clientComponentWindow);
-        MComponentPeer tc = ((MInputMethodControl)peer).getTextComponent();
-        if (tc != null) {
-            configureStatusAreaNative(tc);
-        }
-    }
-
-    /*
-     * Subclasses should override disposeImpl() instead of dispose(). Client
-     * code should always invoke dispose(), never disposeImpl().
-     */
-    protected synchronized void disposeImpl() {
-        if (clientComponentWindow != null) {
-            MComponentPeer peer = (MComponentPeer)getPeer(clientComponentWindow);
-            if (peer instanceof MInputMethodControl)
-                ((MInputMethodControl)peer).removeInputMethod(this);
-            clientComponentWindow = null;
-        }
-
-        super.disposeImpl();
-    }
-
-    /**
-     * @see java.awt.im.spi.InputMethod#removeNotify
-     */
-    public synchronized void removeNotify() {
-        if (MToolkit.targetToPeer(getClientComponent()) != null) {
-            dispose();
-        } else {
-            // We do not have to dispose XICs in case of lightweight component.
-            resetXIC();
-        }
-    }
-
-    /**
-     * Changes the internal XIC configurations. This is required the
-     * case that addition or elimination of text components has
-     * happened in the containment hierarchy. This method is invoked
-     * by Frame or Dialog.
-     */
-    synchronized void reconfigureXIC(MInputMethodControl control) {
-        if (!isDisposed()) {
-            // Some IM servers require to reset XIC before destroying
-            // the XIC. I.e., Destroying XIC doesn't reset the internal
-            // state of the IM server. endComposition() takes care of
-            // resetting XIC and preedit synchronization. However,
-            // there is no client at this point. It is assumed that
-            // the previous client is still available for dispatching
-            // committed text which maintains client's composition
-            // context.
-            endComposition();
-            resetXICifneeded();
-            reconfigureXICNative((MComponentPeer) control, control.getTextComponent());
-        }
-    }
-
-    protected void awtLock() {
-        SunToolkit.awtLock();
-    }
-
-    protected void awtUnlock() {
-        SunToolkit.awtUnlock();
-    }
-
-    /*
-     * Native methods
-     */
-    private native boolean openXIMNative();
-    private native boolean createXICNative(MComponentPeer peer, MComponentPeer tc);
-    private native void reconfigureXICNative(MComponentPeer peer,
-                                            MComponentPeer tc);
-    private native void configureStatusAreaNative(MComponentPeer tc);
-    private native void setXICFocusNative(MComponentPeer peer,
-                                    boolean value, boolean active);
-}
--- a/src/solaris/classes/sun/awt/motif/MInputMethodControl.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright 1997-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.
- */
-
-package sun.awt.motif;
-
-import sun.awt.motif.MComponentPeer;
-import sun.awt.motif.MInputMethod;
-
-/**
- * An interface for controlling containment hierarchy configuration to
- * keep track of existence of any TextArea or TextField and to manage
- * input method status area.
- *
- * @auther      JavaSoft International
- */
-interface MInputMethodControl {
-
-    /**
-     * Informs Frame or Dialog that a text component has been added to
-     * the hierarchy.
-     * @param   textComponentPeer       peer of the text component
-     */
-    void addTextComponent(MComponentPeer textComponentPeer);
-
-    /**
-     * Informs Frame or Dialog that a text component has been removed
-     * from the hierarchy.
-     * @param textComponentPeer peer of the text component
-     */
-    void removeTextComponent(MComponentPeer textComponentPeer);
-
-    /**
-     * Returns a text component peer in the containment hierarchy
-     * to obtain the Motif status area information
-     */
-    MComponentPeer getTextComponent();
-
-    /**
-     * Inform Frame or Dialog that an MInputMethod has been
-     * constructed so that Frame and Dialog can invoke the method in
-     * MInputMethod to reconfigure XICs.
-     * @param   inputMethod     an MInputMethod instance
-     */
-    void addInputMethod(MInputMethod inputMethod);
-
-    /**
-     * Inform Frame or Dialog that an X11InputMethod is being destroyed.
-     * @param   inputMethod     an X11InputMethod instance
-     */
-    void removeInputMethod(MInputMethod inputMethod);
-}
--- a/src/solaris/classes/sun/awt/motif/MInputMethodDescriptor.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright 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.
- */
-
-
-package sun.awt.motif;
-
-import java.awt.im.spi.InputMethod;
-import sun.awt.X11InputMethodDescriptor;
-
-/**
- * Provides sufficient information about an input method
- * to enable selection and loading of that input method.
- * The input method itself is only loaded when it is actually used.
- *
- * @since JDK1.3
- */
-
-class MInputMethodDescriptor extends X11InputMethodDescriptor {
-
-    /**
-     * @see java.awt.im.spi.InputMethodDescriptor#createInputMethod
-     */
-    public InputMethod createInputMethod() throws Exception {
-        return new MInputMethod();
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MLabelPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * Copyright 1995-1996 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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-
-class MLabelPeer extends MComponentPeer implements LabelPeer {
-    native void create(MComponentPeer parent);
-
-    public void initialize() {
-        Label   l = (Label)target;
-        String  txt;
-        int     align;
-
-        if ((txt = l.getText()) != null) {
-            setText(l.getText());
-        }
-        if ((align = l.getAlignment()) != Label.LEFT) {
-            setAlignment(align);
-        }
-        super.initialize();
-    }
-
-    MLabelPeer(Label target) {
-        super(target);
-    }
-
-    public Dimension getMinimumSize() {
-        FontMetrics fm = getFontMetrics(target.getFont());
-        String label = ((Label)target).getText();
-        if (label == null) label = "";
-        return new Dimension(fm.stringWidth(label) + 14,
-                             fm.getHeight() + 8);
-    }
-
-    public native void setText(String label);
-    public native void setAlignment(int alignment);
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     */
-    public void print(Graphics g) {
-        Label l = (Label)target;
-        Dimension d = l.size();
-        Color bg = l.getBackground();
-        Color fg = l.getForeground();
-
-        g.setColor(bg);
-        g.fillRect(1, 1, d.width - 2, d.height - 2);
-
-        g.setColor(fg);
-        g.setFont(l.getFont());
-        FontMetrics fm = g.getFontMetrics();
-        String lbl = l.getText();
-
-        switch (l.getAlignment()) {
-          case Label.LEFT:
-            g.drawString(lbl, 2,
-                         (d.height + fm.getMaxAscent() - fm.getMaxDescent()) / 2);
-            break;
-          case Label.RIGHT:
-            g.drawString(lbl, d.width - (fm.stringWidth(lbl) + 2),
-                         (d.height + fm.getMaxAscent() - fm.getMaxDescent()) / 2);
-            break;
-          case Label.CENTER:
-            g.drawString(lbl, (d.width - fm.stringWidth(lbl)) / 2,
-                         (d.height + fm.getMaxAscent() - fm.getMaxDescent()) / 2);
-            break;
-        }
-
-        target.print(g);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
-}
--- a/src/solaris/classes/sun/awt/motif/MListPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.ItemEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseWheelEvent;
-
-class MListPeer extends MComponentPeer implements ListPeer {
-    native void create(MComponentPeer parent);
-
-    void initialize() {
-        List li = (List)target;
-
-        /* add any items that were already inserted in the target. */
-        int  nitems = li.countItems();
-        for (int i = 0; i < nitems; i++) {
-            addItem(li.getItem(i), -1);
-        }
-
-        /* set whether this list should allow multiple selections. */
-        setMultipleSelections(li.allowsMultipleSelections());
-
-        /* make the visible position visible. */
-        int index = li.getVisibleIndex();
-        if (index >= 0) {
-            makeVisible(index);
-        }
-
-        /* select the item if necessary. */
-        int sel[] = li.getSelectedIndexes();
-        for (int i = 0 ; i < sel.length ; i++) {
-            select(sel[i]);
-        }
-
-        /* BugID 4060345 to avoid showing scrollbar in empty List */
-        if (nitems == 0) {
-            addItem(" ", 0);
-            delItems(0, 0);
-        }
-        super.pSetScrollbarBackground(getParent_NoClientCode(li).getBackground());
-
-        if (!target.isBackgroundSet()) {
-            target.setBackground(SystemColor.text);
-        }
-        if (!target.isForegroundSet()) {
-            target.setForeground(SystemColor.textText);
-        }
-
-        super.initialize();
-    }
-
-    MListPeer(List target) {
-        super(target);
-    }
-
-    /* New method name for 1.1 */
-    public void add(String item, int index) {
-        addItem(item, index);
-    }
-
-    /* New method name for 1.1 */
-    public void removeAll() {
-        clear();
-    }
-
-    /* New method name for 1.1 */
-    public void setMultipleMode (boolean b) {
-        setMultipleSelections(b);
-    }
-
-    /* New method name for 1.1 */
-    public Dimension getPreferredSize(int rows) {
-        return preferredSize(rows);
-    }
-
-    /* New method name for 1.1 */
-    public Dimension getMinimumSize(int rows) {
-        return minimumSize(rows);
-    }
-
-    public void setForeground(Color c) {
-        pSetInnerForeground(c);
-    }
-
-    public native void setBackground(Color c);
-    public native void setMultipleSelections(boolean v);
-    public native boolean isSelected(int index);
-    public native void addItem(String item, int index);
-    public native void delItems(int start, int end);
-    public native void select(int index);
-    public native void deselect(int index);
-    public native void makeVisible(int index);
-
-    public void clear() {
-        List l = (List)target;
-        int count = l.countItems();
-        if (count > 0) {
-            delItems(0, count-1);
-        }
-    }
-
-    public int[] getSelectedIndexes() {
-        List l = (List)target;
-        int len = l.countItems();
-        int sel[] = new int[len];
-        int nsel = 0;
-        for (int i = 0 ; i < len ; i++) {
-            if (isSelected(i)) {
-                sel[nsel++] = i;
-            }
-        }
-        int selected[] = new int[nsel];
-        System.arraycopy(sel, 0, selected, 0, nsel);
-        return selected;
-    }
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void action(int index, final long when, final int modifiers) {
-        final List list = (List)target;
-        final int selectIndex = index;
-
-        MToolkit.executeOnEventHandlerThread(list, new Runnable() {
-            public void run() {
-                list.select(selectIndex);
-                postEvent(new ActionEvent(target, ActionEvent.ACTION_PERFORMED,
-                                          list.getItem(selectIndex), when,
-                                          modifiers));
-            }
-        });
-    } // action()
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void handleListChanged(int index) {
-        final MListPeer listPeer = this;
-        final List list = (List)target;
-        final int listIndex = index;
-
-        MToolkit.executeOnEventHandlerThread(list, new Runnable() {
-            public void run() {
-                int selected[] = listPeer.getSelectedIndexes();
-                boolean isSelected = false;
-
-                for (int i=0; i < selected.length; i++) {
-                    if (listIndex == selected[i]) {
-                        isSelected = true;
-                        break;
-                    }
-                }
-                postEvent(new ItemEvent(list, ItemEvent.ITEM_STATE_CHANGED,
-                                Integer.valueOf(listIndex),
-                                isSelected? ItemEvent.SELECTED : ItemEvent.DESELECTED));
-
-            }
-        });
-    } // handleListChanged()
-
-    public Dimension minimumSize() {
-        return minimumSize(4);
-    }
-
-    public Dimension preferredSize(int v) {
-        return minimumSize(v);
-    }
-
-    public Dimension minimumSize(int v) {
-        FontMetrics fm = getFontMetrics(((List)target).getFont());
-        return new Dimension(SCROLLBAR + 2*MARGIN +
-                             fm.stringWidth("0123456789abcde"),
-                             ((fm.getHeight()+2*SPACE) * v) +
-                             2*MARGIN);
-    }
-
-    public boolean isFocusable() {
-        return true;
-    }
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information, selected items, and item offset.
-     */
-    final static int    MARGIN = 2;
-    final static int    SPACE = 1;
-    final static int    SCROLLBAR = 16;
-    int fontHeight;
-    int fontAscent;
-    int fontLeading;
-    int vval;
-    int hval;
-    int vmax;
-    int hmax;
-
-    public void print(Graphics g) {
-        List l = (List)target;
-        Dimension d = l.size();
-        Color bg = l.getBackground();
-        Color fg = l.getForeground();
-        int numItems = l.getItemCount();
-        FontMetrics fm = getFontMetrics(l.getFont());
-        int w, h;
-        int vvis, hvis, vmin, hmin;
-        int max = 0;
-
-        for (int i = 0; i < numItems; i++) {
-            int len = fm.stringWidth(l.getItem(i));
-            max = Math.max(max, len);
-        }
-
-        fontHeight = fm.getHeight();
-        fontAscent = fm.getAscent();
-        fontLeading = fm.getLeading();
-
-        hmin = vmin = 0;
-
-        vvis = itemsInWindow(true);
-        vmax = Math.max(numItems - vvis, 0);
-        h = d.height - SCROLLBAR;
-
-        if (vmax != 0) {
-            w = d.width - SCROLLBAR;
-            hvis = w - ((2 * SPACE) + (2 * MARGIN));
-            hmax = Math.max(max - hvis, 0);
-        } else {
-            w = d.width;
-            hvis = w - ((2 * SPACE) + (2 * MARGIN));
-            hmax = Math.max(max - hvis, 0);
-        }
-        if (hmax == 0) {
-            h = d.height;
-            vvis = itemsInWindow(false);
-            vmax = Math.max(numItems - vvis, 0);
-        }
-        if (vmax == 0) {
-            w = d.width;
-            hvis = w - ((2 * SPACE) + (2 * MARGIN));
-            hmax = Math.max(max - hvis, 0);
-        }
-
-        hval = 0;
-        vval = 0;
-        /*
-System.out.println("print List: "+d.width+"x"+d.height+" numItems="+numItems+
-"max="+max+" vsb=("+vmin+".."+vmax+","+vval+","+vvis+
-") hsb=("+hmin+".."+hmax+","+hval+","+hvis+")");
-*/
-
-        g.setColor(bg);
-        g.fillRect(0, 0, w, h);
-
-        if (hmax != 0) {
-            int sbw = d.width - ((vmax == 0) ? 0 : SCROLLBAR);
-            g.fillRect(1, d.height - SCROLLBAR - 3, sbw - 1, SCROLLBAR - 3);
-            Graphics ng = g.create();
-            try {
-                ng.translate(0, d.height - (SCROLLBAR - 2));
-                drawScrollbar(ng, bg, SCROLLBAR - 2, sbw,
-                               hmin, hmax, hval, hvis, true);
-            } finally {
-                ng.dispose();
-            }
-        }
-        if (vmax != 0) {
-            int sbh = d.height - ((hmax == 0) ? 0 : SCROLLBAR);
-            g.fillRect(d.width - SCROLLBAR - 3, 1, SCROLLBAR - 3, sbh - 1);
-            Graphics ng = g.create();
-            try {
-                ng.translate(d.width - (SCROLLBAR - 2), 0);
-                drawScrollbar(ng, bg, SCROLLBAR - 2, sbh,
-                               vmin, vmax, vval, vvis, false);
-            } finally {
-                ng.dispose();
-            }
-        }
-
-        draw3DRect(g, bg, 0, 0, w - 1, h - 1, false);
-
-        if (numItems > 0) {
-            int n = itemsInWindow(hmax != 0);
-            int e = Math.min(numItems - 1, (vval + n) - 1);
-            paintItems(g, bg, fg, vval, e);
-        }
-
-        target.print(g);
-    }
-
-    int itemsInWindow(boolean scrollbarVisible) {
-        Dimension d = target.size();
-        int h;
-        if (scrollbarVisible) {
-            h = d.height - ((2 * MARGIN) + SCROLLBAR);
-        } else {
-            h = d.height - 2*MARGIN;
-        }
-        int i = fontHeight - fontLeading;
-        return h / (i + (2 * SPACE));
-    }
-
-    void paintItem(Graphics g, Color bg, Color fg, int index, boolean isSelected) {
-        List l = (List)target;
-        Dimension d = l.size();
-        int numItems = l.getItemCount();
-        Color shadow = bg.darker();
-
-        if ((index < vval) || (index >= (vval + itemsInWindow(hmax != 0)))) {
-            return;
-        }
-        int w = d.width - ((2 * MARGIN) + ((vmax != 0)? SCROLLBAR : 0));
-        int h = (fontHeight - fontLeading);
-        int htotal = h + (2 * SPACE);
-        int index2y = MARGIN + (index * htotal) + SPACE;
-        int y = index2y - (vval * htotal);
-        int x = MARGIN + SPACE;
-        Graphics ng = g.create();
-        try {
-            if (index > numItems - 1) {
-                ng.setColor(bg);
-                ng.fillRect(x - 2, y - 2, w, h + 4);
-                return;
-            }
-            if (isSelected) {
-                ng.setColor(shadow);
-                ng.fillRect(x - 1, y - 1, w - 2, h + 2);
-            } else {
-                ng.setColor(bg);
-                ng.fillRect(x - 1, y - 1, w - 2, h + 2);
-            }
-            ng.setColor(bg);
-
-            ng.drawRect(x - 2, y - 2, w - 1, h + 3);
-            ng.setColor(fg);
-            String str = (String)l.getItem(index);
-            ng.clipRect(x, y, w - (2 * SPACE), h);
-            ng.drawString(str, x - hval, y + fontAscent);
-        } finally {
-            ng.dispose();
-        }
-    }
-
-    void paintItems(Graphics g, Color bg, Color fg, int s, int e) {
-        for (int i = s ; i <= e ; i++) {
-          paintItem(g, bg, fg, i, false);
-        }
-    }
-
-    public boolean handlesWheelScrolling() {return true;}
-
-    public void handleEvent(AWTEvent e) {
-        if (e.getID() == MouseEvent.MOUSE_WHEEL) {
-            MouseWheelEvent mwe = (MouseWheelEvent)e;
-            nativeHandleMouseWheel(mwe.getScrollType(),
-                                   mwe.getScrollAmount(),
-                                   mwe.getWheelRotation());
-        }
-        else {
-            super.handleEvent(e);
-        }
-    }
-
-    native void nativeHandleMouseWheel(int scrollType,
-                                       int scrollAmount,
-                                       int wheelRotation);
-}
--- a/src/solaris/classes/sun/awt/motif/MMenuBarPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import sun.awt.*;
-
-public class MMenuBarPeer implements MenuBarPeer {
-    long        pData;
-    MenuBar     target;
-    private X11GraphicsConfig   graphicsConfig=null;
-
-    private boolean disposed = false;
-
-    static {
-        initIDs();
-    }
-
-     /**
-     * Initialize JNI field and method IDs for fields that may be accessed
-       from C.
-     */
-    private static native void initIDs();
-
-    native void create(MFramePeer f);
-
-    public MMenuBarPeer(MenuBar target) {
-        this.target = target;
-        MFramePeer parent = (MFramePeer) MToolkit.targetToPeer(MMenuItemPeer.getParent_NoClientCode(target));
-        create(parent);
-    }
-
-    protected void finalize() throws Throwable {
-        dispose();
-        super.finalize();
-    }
-
-    /*
-     * Subclasses should override disposeImpl() instead of dispose(). Client
-     * code should always invoke dispose(), never disposeImpl().
-     */
-    private native void pDispose();
-    protected void disposeImpl() {
-        MToolkit.targetDisposedPeer(target, this);
-        pDispose();
-    }
-    public final void dispose() {
-        boolean call_disposeImpl = false;
-
-        if (!disposed) {
-            synchronized (this) {
-                if (!disposed) {
-                    disposed = call_disposeImpl = true;
-                }
-            }
-        }
-
-        if (call_disposeImpl) {
-            disposeImpl();
-        }
-    }
-    public void addMenu(Menu m) {
-    }
-    public void delMenu(int index) {
-    }
-    public void addHelpMenu(Menu m) {
-    }
-
-    static final int GAP = 10;
-    static final int W_DIFF = (MFramePeer.CROSSHAIR_INSET + 1) * 2;
-    static final int H_DIFF = MFramePeer.BUTTON_Y + MFramePeer.BUTTON_H;
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more appropriate size and
-     * color information.
-     */
-    void print(Graphics g) {
-        MenuBar mb = (MenuBar)target;
-        Frame f = (Frame)MMenuItemPeer.getParent_NoClientCode(target);
-        Dimension fd = f.size();
-        Insets insets = f.insets();
-
-        /* Calculate menubar dimension. */
-        int width = fd.width;
-        int height = insets.top;
-        if (f.getPeer() instanceof MFramePeer) {
-            MFramePeer fpeer = (MFramePeer)f.getPeer();
-            if (fpeer.hasDecorations(MWindowAttributes.AWT_DECOR_BORDER)) {
-                width -= W_DIFF;
-                height -= MFramePeer.BUTTON_Y;
-            }
-            if (fpeer.hasDecorations(MWindowAttributes.AWT_DECOR_MENU)) {
-                height -= MFramePeer.BUTTON_H;
-            }
-        }
-        Dimension d = new Dimension(width, height);
-
-        Shape oldClipArea = g.getClip();
-        g.clipRect(0, 0, d.width, d.height);
-
-        Color bg = f.getBackground();
-        Color fg = f.getForeground();
-        Color highlight = bg.brighter();
-        Color shadow = bg.darker();
-
-        // because we'll most likely be drawing on white paper,
-        // for aesthetic reasons, don't make any part of the outer border
-        // pure white
-        if (highlight.equals(Color.white)) {
-            g.setColor(new Color(230, 230, 230));
-        }
-        else {
-            g.setColor(highlight);
-        }
-        g.drawLine(0, 0, d.width, 0);
-        g.drawLine(1, 1, d.width - 1, 1);
-        g.drawLine(0, 0, 0, d.height);
-        g.drawLine(1, 1, 1, d.height - 1);
-        g.setColor(shadow);
-        g.drawLine(d.width, 1, d.width, d.height);
-        g.drawLine(d.width - 1, 2, d.width - 1, d.height);
-        g.drawLine(1, d.height, d.width, d.height);
-        g.drawLine(2, d.height - 1, d.width, d.height - 1);
-
-        int x = GAP;
-        int nitems = mb.countMenus();
-
-        Menu helpMenu = target.getHelpMenu();
-
-        for (int i = 0 ; i < nitems ; i++) {
-            Menu mn = target.getMenu(i);
-            String item = mn.getLabel();
-            if (item == null) {
-                item = "";
-            }
-            Font menuFont = mn.getFont();
-            g.setFont(menuFont);
-            FontMetrics menuMetrics = g.getFontMetrics();
-            int y = (d.height / 2) + menuMetrics.getMaxDescent();
-            int w = menuMetrics.stringWidth(item) + GAP * 2;
-
-            if (x >= d.width) {
-                break;
-            }
-            if (mn.isEnabled()) {
-                g.setColor(fg);
-            }
-            else {
-                  // draw text as grayed out
-                g.setColor(shadow);
-            }
-
-            if (helpMenu == mn) {
-                g.drawString(item, d.width - w + GAP, y);
-            }
-            else {
-                g.drawString(item, x, y);
-                x += w;
-            }
-        }
-
-        g.setClip(oldClipArea);
-    }
-
-    // Needed for MenuComponentPeer.
-    public void setFont(Font f) {
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MMenuItemPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.ActionEvent;
-import sun.awt.AppContext;
-
-class MMenuItemPeer implements MenuItemPeer {
-    long        pData;
-    long        jniGlobalRef;
-    boolean     isCheckbox = false;
-    MenuItem    target;
-    boolean     nativeCreated = false;
-
-    private boolean disposed = false;
-
-    static {
-        initIDs();
-    }
-
-    /**
-     * Initialize JNI field and method IDs
-     */
-    private static native void initIDs();
-
-    native void createMenuItem(MMenuPeer parent);
-
-    void create(MMenuPeer parent) {
-        if (parent.nativeCreated) {
-            createMenuItem(parent);
-            nativeCreated = true;
-            setEnabled(target.isEnabled());
-        }
-    }
-
-    protected MMenuItemPeer() {
-    }
-
-    MMenuItemPeer(MenuItem target) {
-        this.target = target;
-        MMenuPeer parent = (MMenuPeer) MToolkit.targetToPeer(getParent_NoClientCode(target));
-        create(parent);
-    }
-
-    static native MenuContainer getParent_NoClientCode(MenuComponent menuComponent);
-
-    protected void finalize() throws Throwable {
-        dispose();
-        super.finalize();
-    }
-
-    public void setEnabled(boolean b) {
-        if (b) {
-            enable();
-        } else {
-            disable();
-        }
-    }
-
-    public void setLabel(String label) {
-        if (!nativeCreated) {
-            return;
-        }
-        pSetLabel(label);
-        // Fix for bug 4234266 AWT component : MenuItem  throw NullPointer exception.
-        MenuShortcut sc = target.getShortcut();
-        setShortcut(sc != null ? sc.toString() : null );
-    }
-
-    public void setShortcut(String shortCut) {
-        if (!nativeCreated) {
-            return;
-        }
-        pSetShortcut(shortCut);
-    }
-
-    native void pSetLabel(String label);
-    native void pSetShortcut(String shortCut);
-
-    /**
-     * DEPRECATED but, for now, called by setEnabled(boolean).
-     */
-    public void enable() {
-        if (!nativeCreated) {
-            return;
-        }
-        pEnable();
-    }
-    native void pEnable();
-
-    /**
-     * DEPRECATED but, for now, called by setEnabled(boolean).
-     */
-    public void disable() {
-        if (!nativeCreated) {
-            return;
-        }
-        pDisable();
-    }
-    native void pDisable();
-
-    private void destroyNativeWidgetImpl() {
-        if (nativeCreated) {
-            pDispose();
-            nativeCreated = false;
-        }
-    }
-
-    void destroyNativeWidget() {
-        // We do not need to synchronize this method because the caller
-        // always holds the tree lock
-
-        destroyNativeWidgetImpl();
-    }
-
-    /*
-     * Subclasses should override disposeImpl() instead of dispose(). Client
-     * code should always invoke dispose(), never disposeImpl().
-     */
-    protected void disposeImpl() {
-        // Don't call destroyNativeWidget() because on a Menu, this will
-        // cause a traversal of all the menu's MenuItems. This traversal was
-        // already done once by java.awt.Menu.removeNotify().
-
-        destroyNativeWidgetImpl();
-        MToolkit.targetDisposedPeer(target, this);
-    }
-    public final void dispose() {
-        boolean call_disposeImpl = false;
-
-        if (!disposed) {
-            synchronized (this) {
-                if (!disposed) {
-                    disposed = call_disposeImpl = true;
-                }
-            }
-        }
-
-        if (call_disposeImpl) {
-            disposeImpl();
-        }
-    }
-
-    native void pDispose();
-
-    void postEvent(AWTEvent event) {
-        MToolkit.postEvent(MToolkit.targetToAppContext(target), event);
-    }
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void action(final long when, final int modifiers) {
-
-        MToolkit.executeOnEventHandlerThread(target, new Runnable() {
-            public void run() {
-                postEvent(new ActionEvent(target, ActionEvent.ACTION_PERFORMED,
-                                          target.getActionCommand(), when,
-                                          modifiers));
-            }
-        });
-    }
-
-    // Needed for MenuComponentPeer.
-    public void setFont(Font f) {
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MMenuPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright 1995-1999 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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-
-public class MMenuPeer extends MMenuItemPeer implements MenuPeer {
-    native void createMenu(MMenuBarPeer parent);
-    native void createSubMenu(MMenuPeer parent);
-
-    void create(MMenuPeer parent) {
-        if (parent.nativeCreated) {
-            createSubMenu(parent);
-            nativeCreated = true;
-        }
-    }
-
-    protected MMenuPeer() {
-    }
-
-    public MMenuPeer(Menu target) {
-        this.target = target;
-        MenuContainer parent = getParent_NoClientCode(target);
-
-        if (parent instanceof MenuBar) {
-            MMenuBarPeer mb = (MMenuBarPeer) MToolkit.targetToPeer(parent);
-            createMenu(mb);
-            nativeCreated = true;
-        } else if (parent instanceof Menu) {
-            MMenuPeer m = (MMenuPeer) MToolkit.targetToPeer(parent);
-            create(m);
-        } else {
-            throw new IllegalArgumentException("unknown menu container class");
-        }
-    }
-
-    public void addSeparator() {
-    }
-    public void addItem(MenuItem item) {
-    }
-    public void delItem(int index) {
-    }
-
-    void destroyNativeWidget() {
-        // We do not need to synchronize this method because the caller
-        // always holds the tree lock
-
-        if (nativeCreated) {
-            Menu menu = (Menu) target;
-            int nitems = menu.getItemCount();
-            for (int i = 0 ; i < nitems ; i++) {
-                MMenuItemPeer mipeer =
-                    (MMenuItemPeer) MToolkit.targetToPeer(menu.getItem(i));
-                mipeer.destroyNativeWidget();
-            }
-            super.destroyNativeWidget();
-        }
-    }
-    native void pDispose();
-}
--- a/src/solaris/classes/sun/awt/motif/MMouseDragGestureRecognizer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,233 +0,0 @@
-/*
- * Copyright 1998-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.Toolkit;
-import java.awt.Component;
-
-import java.awt.Point;
-import java.awt.dnd.DnDConstants;
-import java.awt.dnd.DragSource;
-import java.awt.dnd.MouseDragGestureRecognizer;
-import java.awt.dnd.DragGestureListener;
-
-import java.awt.event.InputEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.MouseMotionListener;
-
-import java.lang.reflect.*;
-
-import sun.awt.dnd.SunDragSourceContextPeer;
-
-/**
- * <p>
- * This subclass of MouseDragGestureRecognizer defines a DragGestureRecognizer
- * for Mouse based gestures on OSF/Motif.
- * </p>
- *
- * @author Laurence P. G. Cable
- *
- * @see java.awt.dnd.DragGestureListener
- * @see java.awt.dnd.DragGestureEvent
- * @see java.awt.dnd.DragSource
- */
-
-class MMouseDragGestureRecognizer extends MouseDragGestureRecognizer {
-
-    private static final long serialVersionUID = -841711780352520383L;
-
-    /*
-     * constant for number of pixels hysterisis before drag is determined
-     * to have started
-     */
-
-    protected static int motionThreshold;
-
-
-    protected static final int ButtonMask = InputEvent.BUTTON1_DOWN_MASK |
-                                            InputEvent.BUTTON2_DOWN_MASK |
-                                            InputEvent.BUTTON3_DOWN_MASK;
-
-    /**
-     * construct a new MMouseDragGestureRecognizer
-     *
-     * @param ds  The DragSource for the Component c
-     * @param c   The Component to observe
-     * @param act The actions permitted for this Drag
-     * @param dgl The DragGestureRecognizer to notify when a gesture is detected
-     *
-     */
-
-    protected MMouseDragGestureRecognizer(DragSource ds, Component c, int act, DragGestureListener dgl) {
-        super(ds, c, act, dgl);
-    }
-
-    /**
-     * construct a new MMouseDragGestureRecognizer
-     *
-     * @param ds  The DragSource for the Component c
-     * @param c   The Component to observe
-     * @param act The actions permitted for this Drag
-     */
-
-    protected MMouseDragGestureRecognizer(DragSource ds, Component c, int act) {
-        this(ds, c, act, null);
-    }
-
-    /**
-     * construct a new MMouseDragGestureRecognizer
-     *
-     * @param ds  The DragSource for the Component c
-     * @param c   The Component to observe
-     */
-
-    protected MMouseDragGestureRecognizer(DragSource ds, Component c) {
-        this(ds, c, DnDConstants.ACTION_NONE);
-    }
-
-    /**
-     * construct a new MMouseDragGestureRecognizer
-     *
-     * @param ds  The DragSource for the Component c
-     */
-
-    protected MMouseDragGestureRecognizer(DragSource ds) {
-        this(ds, null);
-    }
-
-    /**
-     * determine the drop action from the event
-     */
-
-    protected int mapDragOperationFromModifiers(MouseEvent e) {
-        int mods = e.getModifiersEx();
-        int btns = mods & ButtonMask;
-
-        // Do not allow right mouse button drag since Motif DnD does not
-        // terminate drag operation on right mouse button release.
-        if (!(btns == InputEvent.BUTTON1_DOWN_MASK ||
-              btns == InputEvent.BUTTON2_DOWN_MASK)) {
-            return DnDConstants.ACTION_NONE;
-        }
-
-        return
-            SunDragSourceContextPeer.convertModifiersToDropAction(mods,
-                                                                  getSourceActions());
-    }
-
-    /**
-     * Invoked when the mouse has been clicked on a component.
-     */
-
-    public void mouseClicked(MouseEvent e) {
-        // do nothing
-    }
-
-    /**
-     * Invoked when a mouse button has been pressed on a component.
-     */
-
-    public void mousePressed(MouseEvent e) {
-        events.clear();
-
-        if (mapDragOperationFromModifiers(e) != DnDConstants.ACTION_NONE) {
-            try {
-                motionThreshold = DragSource.getDragThreshold();
-            } catch (Exception exc) {
-                motionThreshold = 5;
-            }
-            appendEvent(e);
-        }
-    }
-
-    /**
-     * Invoked when a mouse button has been released on a component.
-     */
-
-    public void mouseReleased(MouseEvent e) {
-        events.clear();
-    }
-
-    /**
-     * Invoked when the mouse enters a component.
-     */
-
-    public void mouseEntered(MouseEvent e) {
-        events.clear();
-    }
-
-    /**
-     * Invoked when the mouse exits a component.
-     */
-
-    public void mouseExited(MouseEvent e) {
-        if (!events.isEmpty()) { // gesture pending
-            int dragAction = mapDragOperationFromModifiers(e);
-
-            if (dragAction == DnDConstants.ACTION_NONE) {
-                events.clear();
-            }
-        }
-    }
-
-    /**
-     * Invoked when a mouse button is pressed on a component.
-     */
-
-    public void mouseDragged(MouseEvent e) {
-        if (!events.isEmpty()) { // gesture pending
-            int dop = mapDragOperationFromModifiers(e);
-
-
-            if (dop == DnDConstants.ACTION_NONE) {
-                return;
-            }
-
-            MouseEvent trigger = (MouseEvent)events.get(0);
-
-            Point      origin  = trigger.getPoint();
-            Point      current = e.getPoint();
-
-            int        dx      = Math.abs(origin.x - current.x);
-            int        dy      = Math.abs(origin.y - current.y);
-
-            if (dx > motionThreshold || dy > motionThreshold) {
-                fireDragGestureRecognized(dop, ((MouseEvent)getTriggerEvent()).getPoint());
-            } else
-                appendEvent(e);
-        }
-    }
-
-    /**
-     * Invoked when the mouse button has been moved on a component
-     * (with no buttons no down).
-     */
-
-    public void mouseMoved(MouseEvent e) {
-        // do nothing
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MPanelPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-
-import sun.awt.SunGraphicsCallback;
-
-class MPanelPeer extends MCanvasPeer implements PanelPeer {
-
-    MPanelPeer() {}
-
-    MPanelPeer(Component target) {
-        super(target);
-    }
-
-    MPanelPeer(Component target, Object arg) {
-        super(target, arg);
-    }
-
-    public Insets getInsets() {
-        return new Insets(0, 0, 0, 0);
-    }
-
-    public void paint(Graphics g) {
-        super.paint(g);
-        SunGraphicsCallback.PaintHeavyweightComponentsCallback.getInstance().
-            runComponents(((Container)target).getComponents(), g,
-                          SunGraphicsCallback.LIGHTWEIGHTS |
-                          SunGraphicsCallback.HEAVYWEIGHTS);
-    }
-    public void print(Graphics g) {
-        super.print(g);
-        SunGraphicsCallback.PrintHeavyweightComponentsCallback.getInstance().
-            runComponents(((Container)target).getComponents(), g,
-                          SunGraphicsCallback.LIGHTWEIGHTS |
-                          SunGraphicsCallback.HEAVYWEIGHTS);
-    }
-
-    public void setBackground(Color c) {
-        Component comp;
-        int i;
-
-        Container cont = (Container) target;
-        synchronized(target.getTreeLock()) {
-            int n = cont.getComponentCount();
-            for(i=0; i < n; i++) {
-                comp = cont.getComponent(i);
-                MComponentPeer peer = (MComponentPeer) MToolkit.targetToPeer(comp);
-                if (peer != null) {
-                    Color color = comp.getBackground();
-                    if (color == null || color.equals(c)) {
-                        peer.setBackground(c);
-                        peer.pSetBackground(c);
-                    }
-                    if ((comp instanceof java.awt.List) ||
-                           (comp instanceof java.awt.TextArea) ||
-                           (comp instanceof java.awt.ScrollPane)) {
-                        peer.pSetScrollbarBackground(c);
-                    }
-                }
-            }
-        }
-        pSetBackground(c);
-    }
-
-    public void setForeground(Color c) {
-        Component comp;
-        int i;
-
-        Container cont = (Container) target;
-        synchronized(target.getTreeLock()) {
-            int n = cont.getComponentCount();
-            for(i=0; i < n; i++) {
-                comp = cont.getComponent(i);
-                MComponentPeer peer = (MComponentPeer) MToolkit.targetToPeer(comp);
-                if (peer != null) {
-                    Color color = comp.getForeground();
-                    if (color == null || color.equals(c)) {
-                        peer.setForeground(c);
-                        peer.pSetForeground(c);
-                    }
-                    if ((comp instanceof java.awt.List) ||
-                           (comp instanceof java.awt.TextArea) ||
-                           (comp instanceof java.awt.ScrollPane)) {
-                        peer.pSetInnerForeground(c);
-                    }
-                }
-            }
-        }
-        pSetForeground(c);
-    }
-
-    /**
-     * DEPRECATED:  Replaced by getInsets().
-     */
-    public Insets insets() {
-        return getInsets();
-    }
-
-    /**
-     * Recursive method that handles the propagation of the displayChanged
-     * event into the entire hierarchy of peers.
-     * Unlike on win32, on X we don't worry about handling on-the-fly
-     * display settings changes, only windows being dragged across Xinerama
-     * screens.  Thus, we only need to tell MCanvasPeers, not all
-     * MComponentPeers.
-     */
-     private void recursiveDisplayChanged(Component c, int screenNum) {
-        if (c instanceof Container) {
-            Component children[] = ((Container)c).getComponents();
-            for (int i = 0; i < children.length; ++i) {
-                recursiveDisplayChanged(children[i], screenNum);
-            }
-        }
-        ComponentPeer peer = c.getPeer();
-        if (peer != null && peer instanceof MCanvasPeer) {
-            MCanvasPeer mPeer = (MCanvasPeer)peer;
-            mPeer.displayChanged(screenNum);
-        }
-    }
-
-    /*
-     * Often up-called from a MWindowPeer instance.
-     * Calls displayChanged() on all child canvas' peers.
-     * Recurses into Container children to ensure all canvases
-     * get the message.
-     */
-    public void displayChanged(int screenNum) {
-       // Don't do super call because MWindowPeer has already updated its GC
-
-       Component children[] = ((Container)target).getComponents();
-
-       for (int i = 0; i < children.length; i++) {
-           recursiveDisplayChanged(children[i], screenNum);
-       }
-   }
-
-    protected boolean shouldFocusOnClick() {
-        // Return false if this container has children so in that case it won't
-        // be focused. Return true otherwise.
-        return ((Container)target).getComponentCount() == 0;
-    }
-
-    private native void pEnsureIndex(ComponentPeer child, int index);
-    private native void pRestack();
-
-    private int restack(Container cont, int ind) {
-        for (int i = 0; i < cont.getComponentCount(); i++) {
-            Component comp = cont.getComponent(i);
-            if (!comp.isLightweight()) {
-                if (comp.getPeer() != null) {
-                    pEnsureIndex(comp.getPeer(), ind++);
-                }
-            }
-            if (comp.isLightweight() && comp instanceof Container) {
-                ind = restack((Container)comp, ind);
-            }
-        }
-        return ind;
-    }
-
-    /**
-     * @see java.awt.peer.ContainerPeer#restack
-     */
-    public void restack() {
-        Container cont = (Container)target;
-        restack(cont, 0);
-        pRestack();
-    }
-
-    /**
-     * @see java.awt.peer.ContainerPeer#isRestackSupported
-     */
-    public boolean isRestackSupported() {
-        return true;
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MPopupMenuPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
- * Copyright 1996-1998 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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-
-public class MPopupMenuPeer extends MMenuPeer implements PopupMenuPeer {
-
-    static {
-        initIDs();
-    }
-
-    /* initialize the methodIDs of methods that may be accessed from C */
-    private native static void initIDs();
-
-    native void createMenu(MComponentPeer parent);
-
-    void createPopupMenu() {
-        if (MMenuItemPeer.getParent_NoClientCode(target) instanceof Component) {
-            Component parent = (Component)getParent_NoClientCode(target);
-            MComponentPeer parentPeer = (MComponentPeer) MToolkit.targetToPeer(parent);
-            if (parentPeer == null) {
-                // because the menu isn't a component (sigh) we first have to wait
-                // for a failure to map the peer which should only happen for a
-                // lightweight container, then find the actual native parent from
-                // that component.
-                parent = MToolkit.getNativeContainer(parent);
-                parentPeer = (MComponentPeer) MToolkit.targetToPeer(parent);
-            }
-            createMenu(parentPeer);
-            nativeCreated = true;
-            createItems((Menu)target);
-
-        } else {
-            throw new IllegalArgumentException("illegal popup menu container class");
-        }
-    }
-
-    void createItems(Menu target) {
-        int nitems = target.getItemCount();
-        MMenuPeer parent = (MMenuPeer)MToolkit.targetToPeer(target);
-        for (int i = 0 ; i < nitems ; i++) {
-            MenuItem mitem = target.getItem(i);
-            MMenuItemPeer mipeer = (MMenuItemPeer)MToolkit.targetToPeer(mitem);
-            mipeer.create(parent);
-            if (mitem instanceof Menu) {
-                createItems((Menu)mitem);
-            }
-        }
-    }
-
-    public MPopupMenuPeer(PopupMenu target) {
-        // Do NOT instantiate native widget until just before showing the
-        // menu, else right mouse click will cause display to lock up
-        // (because of passive grab in Motif)
-        //
-        this.target = target;
-    }
-
-    native void pShow(Event evt, int x, int y, MComponentPeer origin);
-
-    public void show(Event evt) {
-
-        if (!nativeCreated)
-            createPopupMenu();
-
-        Component origin = (Component)evt.target;
-        MComponentPeer peer = (MComponentPeer) MToolkit.targetToPeer(origin);
-        int x = evt.x;
-        int y = evt.y;
-        if (peer == null) {
-            // A failure to map the peer should only happen for a
-            // lightweight component, then find the actual native parent from
-            // that component.  The event coorinates are going to have to be
-            Component nativeOrigin = MToolkit.getNativeContainer(origin);
-            peer = (MComponentPeer) MToolkit.targetToPeer(nativeOrigin);
-
-            // remove the event coordinates
-            for (Component c = origin; c != nativeOrigin;
-                              c = MComponentPeer.getParent_NoClientCode(c)) {
-                Point p = c.getLocation();
-                x += p.x;
-                y += p.y;
-            }
-        }
-        pShow(evt, x, y, peer);
-    }
-
-    /**
-     * This is the callback function called on the Motif thread by
-     * Popup_popdownCB(Widget, XtPointer, XtPointer) in awt_PopupMenu.c.
-     */
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    private void destroyNativeWidgetAfterGettingTreeLock() {
-
-        MToolkit.executeOnEventHandlerThread(target, new Runnable() {
-            public void run() {
-
-                Object treeLock = new Button().getTreeLock();
-                synchronized (treeLock) {
-                    destroyNativeWidget();
-                }
-            }
-        });
-    }
-
-    native void pDispose();
-} // class MPopupMenuPeer
--- a/src/solaris/classes/sun/awt/motif/MRobotPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
- * Copyright 1999-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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.security.*;
-import sun.awt.X11GraphicsConfig;
-
-class MRobotPeer implements RobotPeer {
-    private X11GraphicsConfig   xgc = null;
-    /*
-     * native implementation uses some static shared data (pipes, processes)
-     * so use a class lock to synchronize native method calls
-     */
-    static Object robotLock = new Object();
-
-    MRobotPeer(GraphicsConfiguration gc) {
-        this.xgc = (X11GraphicsConfig)gc;
-        setup();
-    }
-
-    public void dispose() {
-        // does nothing
-    }
-
-    public void mouseMove(int x, int y) {
-        mouseMoveImpl(xgc, x, y);
-    }
-
-    public void mousePress(int buttons) {
-        mousePressImpl(buttons);
-    }
-
-    public void mouseRelease(int buttons) {
-        mouseReleaseImpl(buttons);
-    }
-
-    public void mouseWheel(int wheelAmt) {
-    mouseWheelImpl(wheelAmt);
-    }
-
-    public void keyPress(int keycode) {
-        keyPressImpl(keycode);
-    }
-
-    public void keyRelease(int keycode) {
-        keyReleaseImpl(keycode);
-    }
-
-    public int getRGBPixel(int x, int y) {
-        int pixelArray[] = new int[1];
-        getRGBPixelsImpl(xgc, x, y, 1, 1, pixelArray);
-        return pixelArray[0];
-    }
-
-    public int [] getRGBPixels(Rectangle bounds) {
-        int pixelArray[] = new int[bounds.width*bounds.height];
-        getRGBPixelsImpl(xgc, bounds.x, bounds.y, bounds.width, bounds.height, pixelArray);
-        return pixelArray;
-    }
-
-    private static native synchronized void setup();
-
-    private static native synchronized void mouseMoveImpl(X11GraphicsConfig xgc, int x, int y);
-    private static native synchronized void mousePressImpl(int buttons);
-    private static native synchronized void mouseReleaseImpl(int buttons);
-    private static native synchronized void mouseWheelImpl(int wheelAmt);
-
-    private static native synchronized void keyPressImpl(int keycode);
-    private static native synchronized void keyReleaseImpl(int keycode);
-
-    private static native synchronized void getRGBPixelsImpl(X11GraphicsConfig xgc, int x, int y, int width, int height, int pixelArray[]);
-}
--- a/src/solaris/classes/sun/awt/motif/MScrollPanePeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,411 +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.
- */
-
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.event.AdjustmentEvent;
-import java.awt.peer.ScrollPanePeer;
-
-import java.util.logging.*;
-
-import sun.awt.PeerEvent;
-
-class MScrollPanePeer extends MPanelPeer implements ScrollPanePeer {
-
-    private static final Logger log = Logger.getLogger("sun.awt.motif.MScrollPanePeer");
-
-    final static int UNIT_INCREMENT = 0;
-    final static int BLOCK_INCREMENT = 1;
-
-    boolean ignore;
-
-    native void create(MComponentPeer parent);
-
-    static {
-        initIDs();
-    }
-
-    /**
-     * Initialize JNI field and method IDs
-     */
-    private static native void initIDs();
-
-    MScrollPanePeer(Component target) {
-        init(target);
-        scrollPaneInit();
-    }
-
-    MScrollPanePeer(Component target, Object arg) {
-        init(target, arg);
-        scrollPaneInit();
-    }
-
-    void scrollPaneInit() {
-        ignore = false;
-        ScrollPane sp = (ScrollPane)target;
-        Adjustable vadj, hadj;
-        if ((vadj = sp.getVAdjustable()) != null) {
-            pSetIncrement(Adjustable.VERTICAL, UNIT_INCREMENT, vadj.getUnitIncrement());
-        }
-        if ((hadj = sp.getHAdjustable()) != null) {
-            pSetIncrement(Adjustable.HORIZONTAL, UNIT_INCREMENT, hadj.getUnitIncrement());
-        }
-        super.pSetScrollbarBackground(sp.getBackground());
-    }
-
-    public void setScrollChild(MComponentPeer child) {
-        pSetScrollChild(child);
-    }
-
-    public void setBackground(Color c) {
-        super.setBackground(c);
-        pSetScrollbarBackground(c);
-    }
-
-    public void setForeground(Color c) {
-        super.setForeground(c);
-        pSetInnerForeground(c);
-    }
-
-    native void pSetScrollChild(MComponentPeer child);
-    native void pSetIncrement(int orient, int type, int incr);
-    native int pGetScrollbarSpace(int orient);
-    native int pGetBlockIncrement(int orient);
-    native Insets pInsets(int w, int h, int childw, int childh);
-    native int pGetShadow();
-
-    public int getHScrollbarHeight() {
-        ScrollPane sp = (ScrollPane)target;
-        if (sp.getScrollbarDisplayPolicy() == ScrollPane.SCROLLBARS_NEVER) {
-            return 0;
-        } else {
-            return pGetScrollbarSpace(Adjustable.HORIZONTAL);
-        }
-    }
-
-    public int getVScrollbarWidth() {
-        ScrollPane sp = (ScrollPane)target;
-        if (sp.getScrollbarDisplayPolicy() == ScrollPane.SCROLLBARS_NEVER) {
-            return 0;
-        } else {
-            return pGetScrollbarSpace(Adjustable.VERTICAL);
-        }
-    }
-
-    public Insets insets() {
-        ScrollPane sp = (ScrollPane)target;
-        Dimension d = sp.size();
-        Dimension cd;
-        Component c = getScrollChild();
-        if (c != null) {
-            cd = c.size();
-        } else {
-            cd = new Dimension(0, 0);
-        }
-        return pInsets(d.width, d.height, cd.width, cd.height);
-    }
-
-    public void setUnitIncrement(Adjustable adj, int u) {
-        ScrollPane sp = (ScrollPane)target;
-        if (sp.getScrollbarDisplayPolicy() != ScrollPane.SCROLLBARS_NEVER) {
-            pSetIncrement(adj.getOrientation(), UNIT_INCREMENT, u);
-        }
-    }
-
-    public void setValue(Adjustable adj, int v) {
-        if (! ignore) {
-            Point p;
-            Component c = getScrollChild();
-            if (c == null) {
-                return;
-            }
-            p = c.getLocation();
-            switch(adj.getOrientation()) {
-            case Adjustable.VERTICAL:
-                setScrollPosition(-(p.x), v);
-                break;
-            case Adjustable.HORIZONTAL:
-                setScrollPosition(v, -(p.y));
-                break;
-            }
-        }
-    }
-
-    public native void setScrollPosition(int x, int y);
-
-    public void childResized(int w, int h) {
-        // REMIND AIM:  May need to revisit this...
-        if (((ScrollPane)target).getScrollbarDisplayPolicy() != ScrollPane.SCROLLBARS_NEVER) {
-            ScrollPane sp = (ScrollPane)target;
-            Adjustable vAdj = sp.getVAdjustable();
-            Adjustable hAdj = sp.getHAdjustable();
-            pSetIncrement(Scrollbar.VERTICAL, UNIT_INCREMENT, vAdj.getUnitIncrement());
-            pSetIncrement(Scrollbar.HORIZONTAL, UNIT_INCREMENT, hAdj.getUnitIncrement());
-            pSetIncrement(Scrollbar.VERTICAL, BLOCK_INCREMENT, vAdj.getBlockIncrement());
-            pSetIncrement(Scrollbar.HORIZONTAL, BLOCK_INCREMENT, hAdj.getBlockIncrement());
-        }
-
-    }
-
-    // NOTE: This method may be called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    private void postScrollEvent(int orient, int type,
-                                 int pos, boolean isAdjusting)
-    {
-        Runnable adjustor = new Adjustor(orient, type, pos, isAdjusting);
-        MToolkit.executeOnEventHandlerThread(new ScrollEvent(target, adjustor));
-    }
-
-    /**
-     * This is used to change the adjustable on dispatch thread to
-     * represent a change made in the native scrollbar.  Since the
-     * change was reflected immediately at the native level,
-     * notification from the adjustable is temporarily ignored.
-     */
-    class ScrollEvent extends PeerEvent {
-        ScrollEvent(Object source, Runnable runnable) {
-            super(source, runnable, 0L);
-        }
-
-        public PeerEvent coalesceEvents(PeerEvent newEvent) {
-            if (log.isLoggable(Level.FINEST)) {
-                log.log(Level.FINEST, "ScrollEvent coalesced " + newEvent);
-            }
-            if (newEvent instanceof ScrollEvent) {
-                return newEvent;
-            }
-            return null;
-        }
-    }
-
-    native void setTypedValue(ScrollPaneAdjustable adjustable, int value, int type);
-
-    /**
-     * Runnable for the ScrollEvent that performs the adjustment.
-     */
-    class Adjustor implements Runnable {
-        int orient;             // selects scrollbar
-        int type;               // adjustment type
-        int pos;                // new position (only used for absolute)
-        boolean isAdjusting;    // isAdjusting status
-
-        Adjustor(int orient, int type, int pos, boolean isAdjusting) {
-            this.orient = orient;
-            this.type = type;
-            this.pos = pos;
-            this.isAdjusting = isAdjusting;
-        }
-
-        public void run() {
-            ScrollPane sp = (ScrollPane)MScrollPanePeer.this.target;
-            ScrollPaneAdjustable adj = null;
-
-            // ScrollPaneAdjustable made public in 1.4, but
-            // get[HV]Adjustable can't be declared to return
-            // ScrollPaneAdjustable because it would break backward
-            // compatibility -- hence the cast
-
-            if (orient == Adjustable.VERTICAL) {
-                adj = (ScrollPaneAdjustable)sp.getVAdjustable();
-            } else if (orient == Adjustable.HORIZONTAL) {
-                adj = (ScrollPaneAdjustable)sp.getHAdjustable();
-            } else {
-                if (log.isLoggable(Level.FINE)) {
-                    log.log(Level.FINE, "Assertion failed: unknown orient");
-                }
-            }
-
-            if (adj == null) {
-                return;
-            }
-
-            int newpos = adj.getValue();
-            switch (type) {
-              case AdjustmentEvent.UNIT_DECREMENT:
-                  newpos -= adj.getUnitIncrement();
-                  break;
-              case AdjustmentEvent.UNIT_INCREMENT:
-                  newpos += adj.getUnitIncrement();
-                  break;
-              case AdjustmentEvent.BLOCK_DECREMENT:
-                  newpos -= adj.getBlockIncrement();
-                  break;
-              case AdjustmentEvent.BLOCK_INCREMENT:
-                  newpos += adj.getBlockIncrement();
-                  break;
-              case AdjustmentEvent.TRACK:
-                  newpos = this.pos;
-                  break;
-              default:
-                  if (log.isLoggable(Level.FINE)) {
-                      log.log(Level.FINE, "Assertion failed: unknown type");
-                  }
-                  return;
-            }
-
-            // keep scroll position in acceptable range
-            newpos = Math.max(adj.getMinimum(), newpos);
-            newpos = Math.min(adj.getMaximum(), newpos);
-
-            // set value; this will synchronously fire an AdjustmentEvent
-            try {
-                MScrollPanePeer.this.ignore = true;
-                adj.setValueIsAdjusting(isAdjusting);
-
-                // Fix for 4075484 - consider type information when creating AdjustmentEvent
-                // We can't just call adj.setValue() because it creates AdjustmentEvent with type=TRACK
-                // Instead, we call private method setTypedValue of ScrollPaneAdjustable.
-                // Because ScrollPaneAdjustable is in another package we should call it through native code.
-                setTypedValue(adj, newpos, type);
-            } finally {
-                MScrollPanePeer.this.ignore = false;
-            }
-        }
-    } // class Adjustor
-
-
-    private Component getScrollChild() {
-        ScrollPane sp = (ScrollPane)target;
-        Component child = null;
-        try {
-            child = sp.getComponent(0);
-        } catch (ArrayIndexOutOfBoundsException e) {
-            // do nothing.  in this case we return null
-        }
-        return child;
-    }
-
-    final static int    MARGIN = 1;
-    final static int    SCROLLBAR = 16;
-    int hsbSpace;
-    int vsbSpace;
-    int vval;
-    int hval;
-    int vmax;
-    int hmax;
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information.
-     */
-    public void print(Graphics g) {
-        ScrollPane sp = (ScrollPane)target;
-        Dimension d = sp.size();
-        Color bg = sp.getBackground();
-        Color fg = sp.getForeground();
-        Point p = sp.getScrollPosition();
-        Component c = getScrollChild();
-        Dimension cd;
-        if (c != null) {
-            cd = c.size();
-        } else {
-            cd = new Dimension(0, 0);
-        }
-        int sbDisplay = sp.getScrollbarDisplayPolicy();
-        int vvis, hvis, vmin, hmin, vmax, hmax, vval, hval;
-
-        switch (sbDisplay) {
-          case ScrollPane.SCROLLBARS_NEVER:
-            hsbSpace = vsbSpace = 0;
-            break;
-          case ScrollPane.SCROLLBARS_ALWAYS:
-            hsbSpace = vsbSpace = SCROLLBAR;
-            break;
-          case ScrollPane.SCROLLBARS_AS_NEEDED:
-            hsbSpace = (cd.width <= (d.width - 2*MARGIN)? 0 : SCROLLBAR);
-            vsbSpace = (cd.height <= (d.height - 2*MARGIN)? 0 : SCROLLBAR);
-
-            if (hsbSpace == 0 && vsbSpace != 0) {
-                hsbSpace = (cd.width <= (d.width - SCROLLBAR - 2*MARGIN)? 0 : SCROLLBAR);
-            }
-            if (vsbSpace == 0 && hsbSpace != 0) {
-                vsbSpace = (cd.height <= (d.height - SCROLLBAR - 2*MARGIN)? 0 : SCROLLBAR);
-            }
-        }
-
-        vvis = hvis = vmin = hmin = vmax = hmax = vval = hval = 0;
-
-        if (vsbSpace > 0) {
-            vmin = 0;
-            vvis = d.height - (2*MARGIN) - hsbSpace;
-            vmax = Math.max(cd.height - vvis, 0);
-            vval = p.y;
-        }
-        if (hsbSpace > 0) {
-            hmin = 0;
-            hvis = d.width - (2*MARGIN) - vsbSpace;
-            hmax = Math.max(cd.width - hvis, 0);
-            hval = p.x;
-        }
-
-        // need to be careful to add the margins back in here because
-        // we're drawing the margin border, after all!
-        int w = d.width - vsbSpace;
-        int h = d.height - hsbSpace;
-
-        g.setColor(bg);
-        g.fillRect(0, 0, d.width, d.height);
-
-        if (hsbSpace > 0) {
-            int sbw = d.width - vsbSpace;
-            g.fillRect(1, d.height - SCROLLBAR - 3, sbw - 1, SCROLLBAR - 3);
-            Graphics ng = g.create();
-            try {
-                ng.translate(0, d.height - (SCROLLBAR - 2));
-                drawScrollbar(ng, bg, SCROLLBAR - 2, sbw,
-                               hmin, hmax, hval, hvis, true);
-            } finally {
-                ng.dispose();
-            }
-        }
-        if (vsbSpace > 0) {
-            int sbh = d.height - hsbSpace;
-            g.fillRect(d.width - SCROLLBAR - 3, 1, SCROLLBAR - 3, sbh - 1);
-            Graphics ng = g.create();
-            try {
-                ng.translate(d.width - (SCROLLBAR - 2), 0);
-                drawScrollbar(ng, bg, SCROLLBAR - 2, sbh,
-                               vmin, vmax, vval, vvis, false);
-            } finally {
-                ng.dispose();
-            }
-        }
-
-        draw3DRect(g, bg, 0, 0, w - 1, h - 1, false);
-
-        target.print(g);
-        sp.printComponents(g);
-    }
-
-    /**
-     * @see ContainerPeer#restack
-     */
-    public void restack() {
-        // Since ScrollPane can only have one child its restacking does nothing.
-        // Also, it is dangerous, since SP child is actually not a child of SP widget
-        // but the child of SP content widget.
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MScrollbarPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
- * Copyright 1995-2002 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 sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.AdjustmentEvent;
-
-class MScrollbarPeer extends MComponentPeer implements ScrollbarPeer {
-    static {
-        initIDs();
-    }
-
-    private boolean inUpCall = false;
-
-    native void create(MComponentPeer parent);
-
-    MScrollbarPeer(Scrollbar target) {
-        super(target);
-    }
-
-    // Initialize JNI field and method IDs
-    private static native void initIDs();
-
-    public native void pSetValues(int value, int visible, int minimum, int maximum);
-    public native void setLineIncrement(int l);
-    public native void setPageIncrement(int l);
-
-    /**
-     * Returns default size of Motif scrollbar on the platform
-     * Currently uses hardcoded values
-     */
-    int getDefaultDimension() {
-        if (System.getProperty("os.name").equals("Linux")) {
-            return 15;
-        } else {
-            return 19;
-        }
-    }
-
-    public Dimension getMinimumSize() {
-        if (((Scrollbar)target).getOrientation() == Scrollbar.VERTICAL) {
-            return new Dimension(getDefaultDimension(), 50);
-        } else {
-            return new Dimension(50, getDefaultDimension());
-        }
-    }
-
-    // NOTE: Callback methods are called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-
-    private void postAdjustmentEvent(final int type, final int value,
-                                     final boolean isAdjusting)
-    {
-        final Scrollbar sb = (Scrollbar)target;
-        MToolkit.executeOnEventHandlerThread(sb, new Runnable() {
-            public void run() {
-                inUpCall = true;
-                sb.setValueIsAdjusting(isAdjusting);
-                sb.setValue(value);
-                postEvent(new AdjustmentEvent(sb,
-                                AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
-                                type, value, isAdjusting));
-                inUpCall = false;
-            }
-        });
-    }
-
-    void lineUp(int value) {
-        postAdjustmentEvent(AdjustmentEvent.UNIT_DECREMENT, value, false);
-    }
-
-    void lineDown(int value) {
-        postAdjustmentEvent(AdjustmentEvent.UNIT_INCREMENT, value, false);
-    }
-
-    void pageUp(int value) {
-        postAdjustmentEvent(AdjustmentEvent.BLOCK_DECREMENT, value, false);
-    }
-
-    void pageDown(int value) {
-        postAdjustmentEvent(AdjustmentEvent.BLOCK_INCREMENT, value, false);
-    }
-
-    // SB_TOP/BOTTOM are mapped to tracking
-    void warp(int value) {
-        postAdjustmentEvent(AdjustmentEvent.TRACK, value, false);
-    }
-
-    private boolean dragInProgress = false;
-
-    void drag(final int value) {
-        if (!dragInProgress) {
-            dragInProgress = true;
-        }
-        postAdjustmentEvent(AdjustmentEvent.TRACK, value, true);
-    }
-
-    void dragEnd(final int value) {
-        final Scrollbar sb = (Scrollbar)target;
-
-        if (!dragInProgress) {
-            return;
-        }
-
-        dragInProgress = false;
-        MToolkit.executeOnEventHandlerThread(sb, new Runnable() {
-            public void run() {
-                // NB: notification only, no sb.setValue()
-                // last TRACK event will have done it already
-                inUpCall = true;
-                sb.setValueIsAdjusting(false);
-                postEvent(new AdjustmentEvent(sb,
-                                AdjustmentEvent.ADJUSTMENT_VALUE_CHANGED,
-                                AdjustmentEvent.TRACK, value, false));
-                inUpCall = false;
-            }
-        });
-    }
-
-    /**
-     * Set the value of the slider in the ScrollBar.
-     */
-    public void setValues(int value, int visible, int minimum, int maximum) {
-        // Fix for BugTraq ID 4048060.  Prevent unnecessary redrawing
-        // of the slider, when the slider is already in the correct
-        // position.  Since the ScrollBar widget now receives the
-        // ButtonRelease X event before the Java Adjustor event is
-        // handled, the slider is already in the correct position and
-        // does not need to be set again and redrawn, when processing
-        // the Adjustor event.
-        if (!inUpCall) {
-            pSetValues(value, visible, minimum, maximum);
-        }
-    }
-
-    public void print(Graphics g) {
-        Scrollbar sb = (Scrollbar)target;
-        Dimension d = sb.size();
-        Color bg = sb.getBackground();
-
-        boolean horiz = (sb.getOrientation() == Scrollbar.HORIZONTAL);
-
-        drawScrollbar(g, bg, horiz? d.height : d.width,
-                          horiz? d.width : d.height,
-                          sb.getMinimum(), sb.getMaximum(),
-                          sb.getValue(), sb.getVisible(),
-                          horiz);
-
-        target.print(g);
-    }
-
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-            return getMinimumSize();
-    }
-
-    protected boolean shouldFocusOnClick() {
-        // Changed in 1.4 - scroll bars are made focusable by mouse clicks.
-        return true;
-    }
-}
--- a/src/solaris/classes/sun/awt/motif/MTextAreaPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,555 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.event.TextEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseWheelEvent;
-import java.awt.datatransfer.*;
-import java.io.BufferedReader;
-import java.io.StringReader;
-import java.io.IOException;
-import java.util.Vector;
-import java.awt.im.InputMethodRequests;
-
-
-public class MTextAreaPeer extends MComponentPeer implements TextAreaPeer {
-    native void pCreate(MComponentPeer parent);
-
-    private boolean firstChangeSkipped;
-
-    /**
-     * Initialize JNI field and method IDs
-     */
-    private static native void initIDs();
-
-    static {
-        initIDs();
-    }
-
-    void create(MComponentPeer parent) {
-        firstChangeSkipped = false;
-        pCreate(parent);
-    }
-
-    void initialize() {
-        int start, end;
-
-        TextArea txt = (TextArea)target;
-        String  text;
-
-        if ((text = txt.getText()) != null) {
-            setText(text);
-        }
-
-        start = txt.getSelectionStart();
-        end = txt.getSelectionEnd();
-
-        if (end > start) {
-            select(start, end);
-        } else {
-            setCaretPosition(start);
-        }
-
-        super.pSetScrollbarBackground(getParent_NoClientCode(target).getBackground());
-
-        if (!target.isBackgroundSet()) {
-            // This is a way to set the background color of the TextArea
-            // without calling setBackground - go through native C code
-            setTargetBackground(SystemColor.text);
-        }
-        if (!target.isForegroundSet()) {
-            target.setForeground(SystemColor.textText);
-        }
-
-        setEditable(txt.isEditable());
-
-//      oldSelectionStart = -1; // accessibility support
-//      oldSelectionEnd = -1;   // accessibility support
-
-        super.initialize();
-    }
-
-    public MTextAreaPeer(TextArea target) {
-        super(target);
-    }
-
-    public void setEditable(boolean editable) {
-        pSetEditable(editable);
-
-        /* 4136955 - Calling setBackground() here works around an Xt
-         * bug by forcing Xt to flush an internal widget cache
-         */
-        setBackground(target.getBackground());
-    }
-    public void setBackground(Color c) {
-        setTextBackground(c);
-    }
-    public void setForeground(Color c) {
-        pSetInnerForeground(c);
-    }
-
-    native int getExtraWidth();
-    native int getExtraHeight();
-    public native void setTextBackground(Color c);
-    public native void pSetEditable(boolean e);
-    public native void select(int selStart, int selEnd);
-    public native int getSelectionStart();
-    public native int getSelectionEnd();
-    public native void setText(String txt);
-    public native String getText();
-    public native void insert(String txt, int pos);
-    public native void replaceRange(String txt, int start, int end);
-    public native void setFont(Font f);
-    public native void setCaretPosition(int pos);
-    public native int getCaretPosition();
-    public native void pSetCursor(Cursor c);
-    native void pShow2();
-    native void pMakeCursorVisible();
-
-
-    public Dimension getMinimumSize() {
-        return getMinimumSize(10, 60);
-    }
-    public Dimension getPreferredSize(int rows, int cols) {
-        return getMinimumSize(rows, cols);
-    }
-    public Dimension getMinimumSize(int rows, int cols) {
-        FontMetrics fm = getFontMetrics(target.getFont());
-
-        /* Calculate proper size for text area plus scrollbars.
-         *   - Motif allows NO leading in its text areas ...
-         *   - extra width and height counts everything outside the
-         *     usable text space.
-         * (bug 4103248, 4120310):
-         *   - Motif uses maxAscent + maxDescent, not ascent + descent.
-         */
-        int colWidth = fm.charWidth('0');
-        int rowHeight = fm.getMaxAscent() + fm.getMaxDescent();
-        return new Dimension(cols * colWidth + getExtraWidth(),
-                             rows * rowHeight + getExtraHeight());
-    }
-    public boolean isFocusable() {
-        return true;
-    }
-
-    // Called from native widget when paste key is pressed and we
-    // already own the selection (prevents Motif from hanging while
-    // waiting for the selection)
-    //
-    public void pasteFromClipboard() {
-        Clipboard clipboard = target.getToolkit().getSystemClipboard();
-
-        Transferable content = clipboard.getContents(this);
-        if (content != null) {
-            try {
-                String data = (String)(content.getTransferData(DataFlavor.stringFlavor));
-                // fix for 4401853: to clear TextArea selection if null is pasted
-                data = (data == null ? "" : data);
-                replaceRange(data, getSelectionStart(), getSelectionEnd());
-
-            } catch (Exception e) {
-            }
-        }
-    }
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information, the top/left text offsets, and selected text.
-     */
-    static final int MARGIN = 2;
-    static final int BORDER = 1;
-    static final int SCROLLBAR = 16;
-    int fontHeight;
-    int fontAscent;
-    int fontLeading;
-    int topLine = 0;
-    int numLines = 0;
-    int textLength = 0;
-    Vector lines;
-    int selStart = 0;
-    int selEnd = 0;
-    int movedRight = 0;
-
-    // the following vars are assigned in print() method
-    transient boolean hscrollbar;
-    transient boolean vscrollbar;
-
-    public void print(Graphics g) {
-        TextArea area = (TextArea)target;
-        Dimension d = area.size();
-        Color bg = area.getBackground();
-        Color fg = area.getForeground();
-        FontMetrics fm = getFontMetrics(area.getFont());
-        int vmin, vmax, vval, vvis;
-        int hmin, hmax, hval, hvis;
-        int max = 0;
-
-        /*
-          Doesn't work right yet.
-        selStart = area.getSelectionStart();
-        selEnd = area.getSelectionEnd();
-        */
-
-        // Figure out number of lines and max line length
-        String text = area.getText();
-        textLength = text.length();
-        BufferedReader is = new BufferedReader(new StringReader(text));
-        String line;
-        int pos = 0;
-        lines = new Vector();
-        int sv = ((TextArea)target).getScrollbarVisibility();
-        vscrollbar = (sv == TextArea.SCROLLBARS_BOTH ||
-                sv == TextArea.SCROLLBARS_VERTICAL_ONLY);
-        hscrollbar = (sv == TextArea.SCROLLBARS_BOTH ||
-                sv == TextArea.SCROLLBARS_HORIZONTAL_ONLY);
-        boolean wrap = !hscrollbar;
-        int w = d.width - (vscrollbar ? SCROLLBAR : 0);
-        int h = d.height - (hscrollbar ? SCROLLBAR : 0);
-
-        try {
-            numLines = 0;
-            while((line = is.readLine()) != null) {
-                int len = fm.stringWidth(line);
-                if (len > w && wrap) {
-                   // need to do line wrapping
-                   int start = 0;
-                   int end = 0;
-                   int string_length = line.length();
-                   while (true) {
-                       int line_width = 0;
-                       end = start + 1; // at least one character per line
-                       while (end < string_length) {
-                               char c = line.charAt(end);
-                               int cw = fm.charWidth(c);
-                               if (line_width + cw + 10 > w) // +10?
-                                       break;
-                               line_width += cw;
-                               end++;
-                       }
-                       // form a line from start to end (not including end)
-                       String substr = line.substring(start, end);
-                       // System.out.println("wrap line: " + substr);
-                       TextLine tline = new TextLine();
-                       tline.text = substr;
-                       tline.pos = pos + start;
-                       lines.addElement(tline);
-                       start = end;
-                       max = Math.max(max, len);
-                       numLines ++;
-                       if (end == string_length) {
-                           // we have processed the whole string
-                           pos += line.length() + 1; // +1 for the ending \n ?
-                           break;
-                       }
-                   }
-                } else {
-                TextLine tline = new TextLine();
-                tline.text = line;
-                tline.pos = pos;
-                lines.addElement(tline);
-                pos += line.length() + 1;
-
-                max = Math.max(max, len);
-                numLines++;
-                }
-            }
-            is.close();
-
-        } catch (IOException e) {
-        }
-
-
-        fontHeight = fm.getHeight();
-        fontAscent = fm.getAscent();
-        fontLeading = fm.getLeading();
-
-        hmin = vmin = 0;
-
-        vvis = linesInWindow(true);
-        vmax = Math.max(numLines - vvis, 0);
-        vval = 0;
-
-        hvis = w - (2 * MARGIN);
-        hmax = Math.max(max - hvis, 0);
-        hval = 0;
-
-        g.setColor(bg);
-        g.fillRect(BORDER, BORDER, w, h);
-        if (vscrollbar)
-        {
-            int sbh = d.height - (hscrollbar ? SCROLLBAR : 0);
-            g.fillRect(d.width - SCROLLBAR - 3, 1, SCROLLBAR - 3, sbh - 1);
-            Graphics ng = g.create();
-            try {
-                ng.translate(d.width - (SCROLLBAR - 2), 0);
-                drawScrollbar(ng, bg, SCROLLBAR - 2, sbh,
-                              vmin, vmax, vval, vvis, false);
-            } finally {
-                ng.dispose();
-            }
-        }
-        if (hscrollbar)
-        {
-            int sbw = d.width - (vscrollbar ? SCROLLBAR : 0);
-            g.fillRect(1, d.height - SCROLLBAR - 3, sbw - 1, SCROLLBAR - 3);
-            Graphics ng = g.create();
-            try {
-                ng.translate(0, d.height - (SCROLLBAR - 2));
-                drawScrollbar(ng, bg, SCROLLBAR - 2, sbw,
-                              hmin, hmax, hval, hvis, true);
-            } finally {
-                ng.dispose();
-            }
-        }
-
-        draw3DRect(g, bg, 0, 0, w - 1, h - 1, false);
-
-        if (text != null) {
-            int l = linesInWindow(true);
-            h = d.height - ((2 * MARGIN) + SCROLLBAR);
-            int e = Math.min(numLines - 1, (topLine + l) - 1);
-            paintLines(g, bg, fg, topLine, e);
-        }
-
-
-        target.print(g);
-    }
-
-    int linesInWindow(boolean horizScrollbar) {
-        Dimension d = target.size();
-        int htotal = d.height - ((2 * MARGIN) + (horizScrollbar? SCROLLBAR : 0));
-        return htotal / fontHeight;
-    }
-
-    void paintLines(Graphics g, Color bg, Color fg, int s, int e) {
-        Dimension d = target.size();
-        int w = d.width - ((2 * BORDER) + (vscrollbar ? SCROLLBAR : 0));
-        int h = d.height - ((2 * BORDER) + (hscrollbar ? SCROLLBAR : 0));
-        int lm = linesInWindow(true) + topLine;
-        s = Math.max(topLine, s);
-        e = Math.min(e, lm - 1);
-        Graphics ng = g.create();
-        try {
-            ng.clipRect(BORDER + MARGIN, MARGIN + BORDER, w - (2*MARGIN),
-                        h - (2*MARGIN));
-            ng.setFont(target.getFont());
-            for (int i = s ; i <= e; i++) {
-                paintLine(ng, bg, fg, i);
-            }
-        } finally {
-            ng.dispose();
-        }
-    }
-
-    void paintLine(Graphics g, Color bg, Color fg, int lnr) {
-        Dimension d = target.size();
-        int l = linesInWindow(true);
-
-        if((lnr < topLine) || (lnr >= l + topLine)) {
-            return;
-        }
-        int w = d.width - ((2 * BORDER) + (hscrollbar ? SCROLLBAR : 0));
-        int y = MARGIN + fontLeading + ((lnr - topLine) * fontHeight);
-        String text = ((TextLine)lines.elementAt(lnr)).text;
-        int len = text.length();
-
-        if (lnr > numLines - 1) {
-            g.setColor(bg);
-            g.fillRect(BORDER, y - fontLeading, w, fontHeight);
-            return;
-        }
-        int s = 0;
-        int e = (lnr < numLines - 1) ? len : textLength;
-        int xs = pos2x(selStart) - movedRight;
-        int xe = pos2x(selEnd) - movedRight;
-
-        Color highlight = bg.brighter();
-        if ((selStart < s) && (selEnd > e)) {
-            g.setColor(highlight);
-            g.fillRect(BORDER, y - fontLeading, w, fontHeight);
-        } else {
-            g.setColor(bg);
-            g.fillRect(BORDER, y - fontLeading, w, fontHeight);
-
-            if ((selStart >= s) && (selStart <= e)) {
-                g.setColor(highlight);
-
-                if (selEnd > e) {
-                    g.fillRect(xs, y - fontLeading, (w + BORDER) - xs, fontHeight);
-                } else if (selStart == selEnd) {
-                  //g.fillRect(xs, y - fontLeading, 1, fontHeight);
-                } else {
-                    g.fillRect(xs, y - fontLeading, xe - xs, fontHeight);
-                }
-            } else if ((selEnd >= s) && (selEnd <= e)) {
-                g.setColor(highlight);
-                g.fillRect(BORDER, y - fontLeading, xe - BORDER, fontHeight);
-            }
-        }
-        g.setColor(fg);
-        g.drawString(text, MARGIN - movedRight, y + fontAscent);
-    }
-
-    int pos2x(int pos) {
-        FontMetrics fm = getFontMetrics(target.getFont());
-        int widths[] = fm.getWidths();
-        TextLine tl1 = (TextLine)lines.elementAt(0);
-        TextLine tl2;
-        int l = 0;
-        for (int i = 0; i < lines.size() - 1; i++) {
-            tl2 = (TextLine)lines.elementAt(i+1);
-            if (pos >= tl1.pos && pos < tl2.pos) {
-                l = i;
-                break;
-            }
-            tl1 = tl2;
-        }
-        int x = MARGIN;
-        for (int i = 0 ; i < (pos - tl1.pos - 1) ; i++) {
-            x += widths[tl1.text.charAt(i)];
-        }
-        return x;
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public void insertText(String txt, int pos) {
-        insert(txt, pos);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public void replaceText(String txt, int start, int end) {
-        replaceRange(txt, start, end);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension preferredSize(int rows, int cols) {
-        return getPreferredSize(rows, cols);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int rows, int cols) {
-        return getMinimumSize(rows, cols);
-    }
-
-    /*
-     * Post a new TextEvent when the value of a text component changes.
-     */
-    public void valueChanged() {
-        postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
-    }
-
-    void pShow(){
-      pShow2();
-      notifyTextComponentChange(true);
-    }
-
-    void pHide(){
-      notifyTextComponentChange(false);
-      super.pHide();
-    }
-
-    void pDispose(){
-      notifyTextComponentChange(false);
-      super.pDispose();
-    }
-
-    public boolean handlesWheelScrolling() {return true;}
-
-    public void handleEvent(AWTEvent e) {
-        if (e.getID() == MouseEvent.MOUSE_WHEEL) {
-            MouseWheelEvent mwe = (MouseWheelEvent)e;
-            nativeHandleMouseWheel(mwe.getScrollType(),
-                                   mwe.getScrollAmount(),
-                                   mwe.getWheelRotation());
-        }
-        else {
-            super.handleEvent(e);
-        }
-    }
-
-     public InputMethodRequests getInputMethodRequests() {
-            return null;
-      }
-
-
-
-    native void nativeHandleMouseWheel(int scrollType,
-                                       int scrollAmount,
-                                       int wheelRotation);
-
-    //
-    // Accessibility support
-    //
-
-
-    // stub functions: to be fully implemented in a future release
-    public int getIndexAtPoint(int x, int y) { return -1; }
-    public Rectangle getCharacterBounds(int i) { return null; }
-    public long filterEvents(long mask) { return 0; }
-
-/*  To be fully implemented in a future release
-
-    int oldSelectionStart;
-    int oldSelectionEnd;
-
-    public native int getIndexAtPoint(int x, int y);
-    public native Rectangle getCharacterBounds(int i);
-    public native long filterEvents(long mask);
-
-    /**
-     * Handle a change in the text selection endpoints
-     * (Note: could be simply a change in the caret location)
-     *
-    public void selectionValuesChanged(int start, int end) {
-        return;  // Need to write implementation of this.
-    }
-*/
-}
-
-
-class TextLine {
-    String text;
-    int pos;
-}
--- a/src/solaris/classes/sun/awt/motif/MTextFieldPeer.java	Wed Jun 18 19:27:59 2008 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
- * Copyright 1995-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.
- */
-
-package sun.awt.motif;
-
-import java.awt.*;
-import java.awt.peer.*;
-import java.awt.datatransfer.*;
-import java.awt.event.ActionEvent;
-import java.awt.event.TextEvent;
-import java.awt.im.InputMethodRequests;
-
-
-public class MTextFieldPeer extends MComponentPeer implements TextFieldPeer {
-    native void pCreate(MComponentPeer parent);
-
-    private boolean firstChangeSkipped;
-
-    /**
-     * Initialize JNI field and method IDs
-     */
-    private static native void initIDs();
-
-    static {
-        initIDs();
-    }
-
-    void create(MComponentPeer parent) {
-        firstChangeSkipped = false;
-        pCreate(parent);
-    }
-
-    void initialize() {
-        int start, end;
-
-        TextField txt = (TextField)target;
-
-        setText(txt.getText());
-        if (txt.echoCharIsSet()) {
-            setEchoChar(txt.getEchoChar());
-        }
-
-        start = txt.getSelectionStart();
-        end = txt.getSelectionEnd();
-
-        if (end > start) {
-            select(start, end);
-        } else {
-            setCaretPosition(start);
-        }
-
-        if (!target.isBackgroundSet()) {
-            // This is a way to set the background color of the TextArea
-            // without calling setBackground - go through native C code
-            setTargetBackground(SystemColor.text);
-        }
-        if (!target.isForegroundSet()) {
-            target.setForeground(SystemColor.textText);
-        }
-
-        setEditable(txt.isEditable());
-
-//      oldSelectionStart = -1; // accessibility support
-//      oldSelectionEnd = -1;   // accessibility support
-
-        super.initialize();
-    }
-
-    public MTextFieldPeer(TextField target) {
-        super(target);
-    }
-
-    public void setEditable(boolean editable) {
-        pSetEditable(editable);
-
-        /* 4136955 - Calling setBackground() here works around an Xt
-         * bug by forcing Xt to flush an internal widget cache
-         */
-        setBackground(target.getBackground());
-    }
-
-    public native void pSetEditable(boolean editable);
-    public native void select(int selStart, int selEnd);
-    public native int getSelectionStart();
-    public native int getSelectionEnd();
-    public native void setText(String l);
-    public native void insertReplaceText(String l);
-    public native void preDispose();
-    public native String getText();
-    public native void setEchoChar(char c);
-    public native void setFont(Font f);
-    public native void setCaretPosition(int pos);
-    public native int getCaretPosition();
-
-    // CDE/Motif defaults: margin=5, shadow=2, highlight=1 -- times 2.
-    // Should have asked the widgets for correct values (see MTextAreaPeer).
-    private static final int padding = 16;
-
-    public Dimension getMinimumSize() {
-        FontMetrics fm = getFontMetrics(target.getFont());
-        return new Dimension(fm.stringWidth(((TextField)target).getText())+20,
-                             fm.getMaxDescent() + fm.getMaxAscent() + padding);
-    }
-
-    public Dimension getPreferredSize(int cols) {
-        return getMinimumSize(cols);
-    }
-
-    public Dimension getMinimumSize(int cols) {
-        FontMetrics fm = getFontMetrics(target.getFont());
-        return new Dimension(fm.charWidth('0') * cols + 20,
-                             fm.getMaxDescent() + fm.getMaxAscent() + padding);
-    }
-
-    public boolean isFocusable() {
-        return true;
-    }
-
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void action(final long when, final int modifiers) {
-        MToolkit.executeOnEventHandlerThread(target, new Runnable() {
-            public void run() {
-                postEvent(new ActionEvent(target, ActionEvent.ACTION_PERFORMED,
-                                          ((TextField)target).getText(), when,
-                                          modifiers));
-            }
-        });
-    }
-
-    protected void disposeImpl() {
-        preDispose();
-        super.disposeImpl();
-    }
-
-    /*
-     * Post a new TextEvent when the value of a text component changes.
-     */
-    public void valueChanged() {
-        postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
-    }
-
-    // Called from native widget when paste key is pressed and we
-    // already own the selection (prevents Motif from hanging while
-    // waiting for the selection)
-    //
-    // NOTE: This method is called by privileged threads.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
-    public void pasteFromClipboard() {
-        Clipboard clipboard = target.getToolkit().getSystemClipboard();
-
-        Transferable content = clipboard.getContents(this);
-        if (content != null) {
-            try {
-                String data = (String)(content.getTransferData(DataFlavor.stringFlavor));
-                insertReplaceText(data);
-
-            } catch (Exception e) {
-            }
-        }
-    }
-
-    /*
-     * Print the native component by rendering the Motif look ourselves.
-     * ToDo(aim): needs to query native motif for more accurate size and
-     * color information, left text offset, and selected text.
-     */
-    public final static int BORDER = 2;
-    public final static int MARGIN = 4;
-
-    public void print(Graphics g) {
-        TextField txt = (TextField)target;
-        Dimension d = txt.size();
-        int w = d.width - (2 * BORDER);
-        int h = d.height - (2 * BORDER);
-        Color bg = txt.getBackground();
-        Color fg = txt.getForeground();
-        Color highlight = bg.brighter();
-        String text = txt.getText();
-        int moved = 0;
-        int selStart = 0;
-        int selEnd = 0;
-
-        g.setFont(txt.getFont());
-        g.setColor(txt.isEditable() ? highlight : bg);
-        g.fillRect(BORDER, BORDER, w, h);
-
-        g.setColor(bg);
-        //g.drawRect(0, 0, d.width-1, d.height-1);
-        draw3DRect(g, bg, 1, 1, d.width-3, d.height-3, false);
-
-        if (text != null) {
-            g.clipRect(BORDER, MARGIN, w, d.height - (2 * MARGIN));
-            FontMetrics fm = g.getFontMetrics();
-
-            w = d.width - BORDER;
-            h = d.height - (2 * MARGIN);
-            int xs = pos2x(selStart) - moved;
-            int xe = pos2x(selEnd) - moved;
-
-            if ((xs < MARGIN) && (xe > w)) {
-                g.setColor(highlight);
-                g.fillRect(BORDER, MARGIN, w - BORDER, h);
-            } else {
-                g.setColor(bg);
-                //g.fillRect(BORDER, MARGIN, w - BORDER, h);
-
-                if ((xs >= MARGIN) && (xs <= w)) {
-                    g.setColor(highlight); // selected text
-
-                    if (xe > w) {
-                        g.fillRect(xs, MARGIN, w - xs, h);
-                    } else if (xs == xe) {
-                      //g.fillRect(xs, MARGIN, 1, h);
-                    } else {
-                        g.fillRect(xs, MARGIN, xe - xs, h);
-                    }
-                } else if ((xe >= MARGIN) && (xe <= w)) {
-                    g.setColor(highlight);
-                    g.fillRect(BORDER, MARGIN, xe - BORDER, h);
-                }
-            }
-           g.setColor(fg);
-           int x = MARGIN - moved;
-           char echoChar = txt.getEchoChar();
-           if (echoChar == 0) {
-               g.drawString(text, x, BORDER + MARGIN + fm.getMaxAscent());
-           } else {
-               char data[] = new char[text.length()];
-               for (int i = 0 ; i < data.length ; i++) {
-                   data[i] = echoChar;
-               }
-               g.drawChars(data, 0, data.length, x,
-                           BORDER + MARGIN + fm.getMaxAscent());
-
-           }
-        }
-
-        target.print(g);
-    }
-
-    int pos2x(int pos) {
-        TextField txt = (TextField)target;
-        FontMetrics fm = getFontMetrics(txt.getFont());
-        int x = MARGIN, widths[] = fm.getWidths();
-        String text = txt.getText();
-        char echoChar = txt.getEchoChar();
-        if (echoChar == 0) {
-            for (int i = 0 ; i < pos ; i++) {
-                x += widths[text.charAt(i)];
-            }
-        } else {
-            x += widths[echoChar] * pos;
-        }
-        return x;
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public void setEchoCharacter(char c) {
-        setEchoChar(c);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize() {
-        return getMinimumSize();
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension minimumSize(int cols) {
-        return getMinimumSize(cols);
-    }
-
-    /**
-     * DEPRECATED
-     */
-    public Dimension preferredSize(int cols) {
-        return getPreferredSize(cols);
-    }
-    void pShow(){
-      super.pShow();
-      notifyTextComponentChange(true);
-    }
-
-    void pHide(){
-      notifyTextComponentChange(false);
-      super.pHide();
-    }
-
-    void pDispose(){
-      notifyTextComponentChange(false);
-      super.pDispose();
-    }
-
-     public InputMethodRequests getInputMethodRequests() {
-            return null;
-      }
-
-
-
-    //
-    // Accessibility support
-    //
-
-    // stub functions: to be fully implemented in a future release
-    public int getIndexAtPoint(int x, int y) { return -1; }
-    public Rectangle getCharacterBounds(int i) { return null; }
-    public long filterEvents(long mask) { return 0; }
-
-
-/*  To be fully implemented in a future release
-
-    int oldSelectionStart;
-    int oldSelectionEnd;
-
-    public native int getIndexAtPoint(int x, int y);
-    public native Rectangle getCharacterBounds(int i);
-    public native long filterEvents(long mask);
-
-    /**
-     * Handle a change in the text selection endpoints
-     * (Note: could be simply a change in the caret location)
-     *
-    public void selectionValuesChanged(int start, int end) {
-        return;  // Need to write implemetation of this.
-    }
-*/
-
-}
--- a/src/solaris/classes/sun/awt/motif/MToolkit.java	Wed Jun 18 19:27:59 2008 +0400
+++ b/src/solaris/classes/sun/awt/motif/MToolkit.java	Thu Jun 19 11:26:54 2008 +0400
@@ -60,12 +60,12 @@
 import java.awt.dnd.InvalidDnDOperationException;
 import java.awt.dnd.peer.DragSourceContextPeer;
 
-import sun.awt.motif.MInputMethod;
+//import sun.awt.motif.MInputMethod;
 import sun.awt.X11GraphicsConfig;
 import sun.awt.X11GraphicsEnvironment;
 import sun.awt.XSettings;
 
-import sun.awt.motif.MDragSourceContextPeer;
+//import sun.awt.motif.MDragSourceContextPeer;
 
 import sun.print.PrintJob2D;
 
@@ -79,9 +79,9 @@
     private static final Logger log = Logger.getLogger("sun.awt.motif.MToolkit");
 
     // the system clipboard - CLIPBOARD selection
-    X11Clipboard clipboard;
+    //X11Clipboard clipboard;
     // the system selection - PRIMARY selection
-    X11Clipboard selection;
+    //X11Clipboard selection;
 
     // Dynamic Layout Resize client code setting
     protected static boolean dynamicLayoutSetting = false;
@@ -130,7 +130,7 @@
             new GetBooleanAction("awt.dnd.motifdnd"))).booleanValue();
     }
 
-    public static final String DATA_TRANSFERER_CLASS_NAME = "sun.awt.motif.MDataTransferer";
+    //public static final String DATA_TRANSFERER_CLASS_NAME = "sun.awt.motif.MDataTransferer";
 
     public MToolkit() {
         super();
@@ -150,7 +150,7 @@
             }
 
             init(mainClassName);
-            SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME);
+            //SunToolkit.setDataTransfererClassName(DATA_TRANSFERER_CLASS_NAME);
 
             Thread toolkitThread = new Thread(this, "AWT-Motif");
             toolkitThread.setPriority(Thread.NORM_PRIORITY + 1);
@@ -197,131 +197,152 @@
      */
 
     public ButtonPeer createButton(Button target) {
-        ButtonPeer peer = new MButtonPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //ButtonPeer peer = new MButtonPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public TextFieldPeer createTextField(TextField target) {
-        TextFieldPeer peer = new MTextFieldPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //TextFieldPeer peer = new MTextFieldPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public LabelPeer createLabel(Label target) {
-        LabelPeer peer = new MLabelPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //LabelPeer peer = new MLabelPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public ListPeer createList(List target) {
-        ListPeer peer = new MListPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //ListPeer peer = new MListPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public CheckboxPeer createCheckbox(Checkbox target) {
-        CheckboxPeer peer = new MCheckboxPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //CheckboxPeer peer = new MCheckboxPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public ScrollbarPeer createScrollbar(Scrollbar target) {
-        ScrollbarPeer peer = new MScrollbarPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //ScrollbarPeer peer = new MScrollbarPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public ScrollPanePeer createScrollPane(ScrollPane target) {
-        ScrollPanePeer peer = new MScrollPanePeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //ScrollPanePeer peer = new MScrollPanePeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public TextAreaPeer createTextArea(TextArea target) {
-        TextAreaPeer peer = new MTextAreaPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //TextAreaPeer peer = new MTextAreaPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public ChoicePeer createChoice(Choice target) {
-        ChoicePeer peer = new MChoicePeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //ChoicePeer peer = new MChoicePeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public FramePeer  createFrame(Frame target) {
-        FramePeer peer = new MFramePeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //FramePeer peer = new MFramePeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public CanvasPeer createCanvas(Canvas target) {
-        CanvasPeer peer = (isXEmbedServerRequested() ? new MEmbedCanvasPeer(target) : new MCanvasPeer(target));
-        targetCreatedPeer(target, peer);
-        return peer;
+        //CanvasPeer peer = (isXEmbedServerRequested() ? new MEmbedCanvasPeer(target) : new MCanvasPeer(target));
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public PanelPeer createPanel(Panel target) {
-        PanelPeer peer = new MPanelPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //PanelPeer peer = new MPanelPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public WindowPeer createWindow(Window target) {
-        WindowPeer peer = new MWindowPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //WindowPeer peer = new MWindowPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public DialogPeer createDialog(Dialog target) {
-        DialogPeer peer = new MDialogPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //DialogPeer peer = new MDialogPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public FileDialogPeer createFileDialog(FileDialog target) {
-        FileDialogPeer peer = new MFileDialogPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //FileDialogPeer peer = new MFileDialogPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public MenuBarPeer createMenuBar(MenuBar target) {
-        MenuBarPeer peer = new MMenuBarPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //MenuBarPeer peer = new MMenuBarPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public MenuPeer createMenu(Menu target) {
-        MenuPeer peer = new MMenuPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //MenuPeer peer = new MMenuPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public PopupMenuPeer createPopupMenu(PopupMenu target) {
-        PopupMenuPeer peer = new MPopupMenuPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //PopupMenuPeer peer = new MPopupMenuPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public MenuItemPeer createMenuItem(MenuItem target) {
-        MenuItemPeer peer = new MMenuItemPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //MenuItemPeer peer = new MMenuItemPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
     public CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target) {
-        CheckboxMenuItemPeer peer = new MCheckboxMenuItemPeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
+        //CheckboxMenuItemPeer peer = new MCheckboxMenuItemPeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+        return null;
     }
 
-    public MEmbeddedFramePeer createEmbeddedFrame(MEmbeddedFrame target)
-    {
-        MEmbeddedFramePeer peer = new MEmbeddedFramePeer(target);
-        targetCreatedPeer(target, peer);
-        return peer;
-    }
+    //public MEmbeddedFramePeer createEmbeddedFrame(MEmbeddedFrame target)
+    //{
+        //MEmbeddedFramePeer peer = new MEmbeddedFramePeer(target);
+        //targetCreatedPeer(target, peer);
+        //return peer;
+    //    return null;
+    //}
 
 
     public FontPeer getFontPeer(String name, int style){
@@ -438,29 +459,31 @@
     public native void beep();
 
     public  Clipboard getSystemClipboard() {
-        SecurityManager security = System.getSecurityManager();
-        if (security != null) {
-          security.checkSystemClipboardAccess();
-        }
-        synchronized (this) {
-            if (clipboard == null) {
-                clipboard = new X11Clipboard("System", "CLIPBOARD");
-            }
-        }
-        return clipboard;
+        //SecurityManager security = System.getSecurityManager();
+        //if (security != null) {
+        //  security.checkSystemClipboardAccess();
+        //}
+        //synchronized (this) {
+        //    if (clipboard == null) {
+        //        clipboard = new X11Clipboard("System", "CLIPBOARD");
+        //    }
+        //}
+        //return clipboard;
+        return null;
     }
 
     public Clipboard getSystemSelection() {
-        SecurityManager security = System.getSecurityManager();
-        if (security != null) {
-            security.checkSystemClipboardAccess();
-        }
-        synchronized (this) {
-            if (selection == null) {
-                selection = new X11Clipboard("Selection", "PRIMARY");
-            }
-        }
-        return selection;
+        //SecurityManager security = System.getSecurityManager();
+        //if (security != null) {
+        //    security.checkSystemClipboardAccess();
+        //}
+        //synchronized (this) {
+        //    if (selection == null) {
+        //        selection = new X11Clipboard("Selection", "PRIMARY");
+        //    }
+        //}
+        //return selection;
+        return null;
     }
 
     public boolean getLockingKeyState(int key) {
@@ -492,11 +515,12 @@
     }
 
     public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException {
-        if (MToolkit.useMotifDnD()) {
-            return MDragSourceContextPeer.createDragSourceContextPeer(dge);
-        } else {